From b93464db656fe017fe434b0fc917921ded88a12c Mon Sep 17 00:00:00 2001
From: admin There are seven preferences you can set to control various aspects of the calendar. Preferences are set using an initialization
-function similar to other classes. Here is an example:
+ There are seven preferences you can set to control various aspects of the calendar. Preferences are set by passing an
+array of preferences in the second parameter of the loading function. Here is an example:Setting Display Preferences
-$this->load->library('calendar');
-
+
$prefs = array (
@@ -166,6 +165,30 @@ regarding preferences below.
'start_day' => 'saturday',
'month_type' => 'long',
'day_type' => 'short'
);
-$this->calendar->initialize($prefs);
+$this->load->library('calendar', $prefs);
echo $this->calendar->generate();
To allow your calendar to dynamically increment/decrement via the next/previous links requires that you set up your calendar +code similar to this example:
+ + +$this->load->library('calendar');
+
+$prefs = array (
+ 'show_next_prev' => TRUE,
+ 'next_prev_url' => 'http://www.your-site.com/index.php/calendar/show/'
+ );
+
+echo $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4), $prefs);
+
+You'll notice a few things about the above example:
+ +$this->load->library('calendar');
+
$prefs['template'] = '
{table_open}<table border="0" cellpadding="0" cellspacing="0">{/table_open}
@@ -206,39 +229,12 @@ $prefs['template'] = '
{table_close}</table>{/table_close}
';
-$this->calendar->initialize($prefs);
+$this->load->library('calendar', $prefs);
echo $this->calendar->generate();
-Showing Next/Previous Month Links
-
-To allow your calendar to dynamically increment/decrement via the next/previous links requires that you set up your calendar
-code similar to this example:
-
-
-$this->load->library('calendar');
-
-$prefs = array (
- 'show_next_prev' => TRUE,
- 'next_prev_url' => 'http://www.your-site.com/index.php/calendar/show/'
- );
-
-$this->calendar->initialize($prefs);
-
-echo $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4));
-
-You'll notice a few things about the above example:
-
-
-- You must set the "show_next_prev" to TRUE.
-- You must supply the URL to the controller containing your calendar in the "next_prev_url" preference.
-- You must supply the "year" and "month" to the calendar generating function via the URI segments where they appear (Note: The calendar class automatically adds the year/month to the base URL you provide.).
-
-
-
-
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html
index 6a2317da1..1fa93bf17 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -171,7 +171,7 @@ class Upload extends Controller {
$config['max_width'] = '1024';
$config['max_height'] = '768';
- $this->upload->initialize($config);
+ $this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
@@ -230,6 +230,9 @@ $config['max_size'] = '100';
$config['max_width'] = '1024';
$config['max_height'] = '768';
+$this->load->library('ftp', $config);
+
+// Alternately you can set preferences by calling the initialize function. Useful if you auto-load the class:
$this->upload->initialize($config);
The above preferences should be fairly self-explanatory. Below is a table describing all available preferences.
-- cgit v1.2.3-24-g4f1b