From 37f4b9caa02783e06dd7c5318200113409a0deb1 Mon Sep 17 00:00:00 2001
From: Derek Jones Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If
-a value exists it is returned. If a value does not exist it returns FALSE, or whatever you've specified as the default value via the third parameter. Example: Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If
+a value exists it is returned. If a value does not exist it returns FALSE, or whatever you've specified as the default value via the third parameter. Example: Takes an array as input and returns a random element from it. Usage example: Takes an array as input and returns a random element from it. Usage example: Lets you fetch a number of items from an array. The function tests whether each of the array indices is set. If an index does not exist
-it is set to FALSE, or whatever you've specified as the default value via the third parameter. Example: Lets you fetch a number of items from an array. The function tests whether each of the array indices is set. If an index does not exist
+it is set to FALSE, or whatever you've specified as the default value via the third parameter. Example: This is useful when sending the $_POST array to one of your Models. This prevents users from
+ This is useful when sending the $_POST array to one of your Models. This prevents users from
sending additional POST data to be entered into your tables:element()
-
$array = array('color' => 'red', 'shape' => 'round', 'size' => '');
@@ -86,7 +86,7 @@ echo element('size', $array, NULL);
random_element()
-$quotes = array(
"I find that the harder I work, the more luck I seem to have. - Thomas Jefferson",
@@ -102,8 +102,8 @@ echo random_element($quotes);elements()
-
$array = array(
-
@@ -142,7 +142,7 @@ array(
);
diff --git a/user_guide/helpers/captcha_helper.html b/user_guide/helpers/captcha_helper.html
index 3c6fa1188..2fd5a5549 100644
--- a/user_guide/helpers/captcha_helper.html
+++ b/user_guide/helpers/captcha_helper.html
@@ -83,7 +83,7 @@ CAPTCHA Helper
<img src="http://example.com/captcha/12345.jpg" width="140" height="50" />
The "time" is the micro timestamp used as the image name without the file - extension. It will be a number like this: 1139612155.3422
+ extension. It will be a number like this: 1139612155.3422The "word" is the word that appears in the captcha image, which if not supplied to the function, will be a random string.
@@ -109,13 +109,13 @@ echo $cap['image'];Here is an example of usage with a database. On the page where the CAPTCHA will be shown you'll have something like this:
+Here is an example of usage with a database. On the page where the CAPTCHA will be shown you'll have something like this:
$this->load->helper('captcha');
$vals = array(
diff --git a/user_guide/helpers/cookie_helper.html b/user_guide/helpers/cookie_helper.html
index 9879653c1..34faadbcc 100644
--- a/user_guide/helpers/cookie_helper.html
+++ b/user_guide/helpers/cookie_helper.html
@@ -70,20 +70,20 @@ Cookie Helper
set_cookie()
-This helper function gives you view file friendly syntax to set browser cookies. Refer to the Input class for a description of use, as this function is an alias to $this->input->set_cookie().
+This helper function gives you view file friendly syntax to set browser cookies. Refer to the Input class for a description of use, as this function is an alias to $this->input->set_cookie().
get_cookie()
-This helper function gives you view file friendly syntax to get browser cookies. Refer to the Input class for a description of use, as this function is an alias to $this->input->cookie().
+This helper function gives you view file friendly syntax to get browser cookies. Refer to the Input class for a description of use, as this function is an alias to $this->input->cookie().
delete_cookie()
-Lets you delete a cookie. Unless you've set a custom path or other values, only the name of the cookie is needed:
+Lets you delete a cookie. Unless you've set a custom path or other values, only the name of the cookie is needed:
delete_cookie("name");
-This function is otherwise identical to set_cookie(), except that it does not have the value and expiration parameters. You can submit an array
+
This function is otherwise identical to set_cookie(), except that it does not have the value and expiration parameters. You can submit an array
of values in the first parameter or you can set discrete parameters.
delete_cookie($name, $domain, $path, $prefix)
diff --git a/user_guide/helpers/date_helper.html b/user_guide/helpers/date_helper.html
index a2933420c..44096ff46 100644
--- a/user_guide/helpers/date_helper.html
+++ b/user_guide/helpers/date_helper.html
@@ -72,7 +72,7 @@ Date Helper
now()
Returns the current time as a Unix timestamp, referenced either to your server's local time or GMT, based on the "time reference"
-setting in your config file. If you do not intend to set your master time reference to GMT (which you'll typically do if you
+setting in your config file. If you do not intend to set your master time reference to GMT (which you'll typically do if you
run a site that lets each user set their own timezone settings) there is no benefit to using this function over PHP's time() function.
@@ -82,10 +82,10 @@ run a site that lets each user set their own timezone settings) there is no bene
mdate()
This function is identical to PHPs date() function, except that it lets you
-use MySQL style date codes, where each code letter is preceded with a percent sign: %Y %m %d etc.
+use MySQL style date codes, where each code letter is preceded with a percent sign: %Y %m %d etc.
The benefit of doing dates this way is that you don't have to worry about escaping any characters that
-are not date codes, as you would normally have to do with the date() function. Example:
+are not date codes, as you would normally have to do with the date() function. Example:
$datestring = "Year: %Y Month: %m Day: %d - %h:%i %a";
$time = time();
@@ -149,7 +149,7 @@ echo standard_date($format, $time);
DATE_RFC1123
RFC 1123
- Sun, 14 Aug 2005 16:13:03 UTC
+ Sun, 14 Aug 2005 16:13:03 UTC
DATE_RFC2822
@@ -170,7 +170,7 @@ echo standard_date($format, $time);
local_to_gmt()
-Takes a Unix timestamp as input and returns it as GMT. Example:
+Takes a Unix timestamp as input and returns it as GMT. Example:
$now = time();
@@ -180,11 +180,11 @@ $gmt = local_to_gmt($now);
gmt_to_local()
Takes a Unix timestamp (referenced to GMT) as input, and converts it to a localized timestamp based on the
-timezone and Daylight Saving time submitted. Example:
+timezone and Daylight Saving time submitted. Example:
$timestamp = '1140153693';
-$timezone = 'UM8';
+$timezone = 'UM8';
$daylight_saving = TRUE;
echo gmt_to_local($timestamp, $timezone, $daylight_saving);
@@ -208,7 +208,7 @@ $unix = mysql_to_unix($mysql);
This can be useful if you need to display a date in a form field for submission.
-The time can be formatted with or without seconds, and it can be set to European or US format. If only
+
The time can be formatted with or without seconds, and it can be set to European or US format. If only
the timestamp is submitted it will return the time without seconds formatted for the U.S. Examples:
$now = time();
@@ -222,9 +222,9 @@ echo unix_to_human($now, TRUE, 'eu'); // Euro time with seconds
human_to_unix()
-The opposite of the above function. Takes a "human" time as input and returns it as Unix. This function is
-useful if you accept "human" formatted dates submitted via a form. Returns FALSE (boolean) if
-the date string passed to it is not formatted as indicated above. Example:
+The opposite of the above function. Takes a "human" time as input and returns it as Unix. This function is
+useful if you accept "human" formatted dates submitted via a form. Returns FALSE (boolean) if
+the date string passed to it is not formatted as indicated above. Example:
$now = time();
@@ -242,9 +242,9 @@ $unix = human_to_unix($human);
1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes
-The first parameter must contain a Unix timestamp. The second parameter must contain a
-timestamp that is greater that the first timestamp. If the second parameter empty, the current time will be used. The most common purpose
-for this function is to show how much time has elapsed from some point in time in the past to now. Example:
+The first parameter must contain a Unix timestamp. The second parameter must contain a
+timestamp that is greater that the first timestamp. If the second parameter empty, the current time will be used. The most common purpose
+for this function is to show how much time has elapsed from some point in time in the past to now. Example:
$post_date = '1079621429';
$now = time();
@@ -256,7 +256,7 @@ echo timespan($post_date, $now);
days_in_month()
-Returns the number of days in a given month/year. Takes leap years into account. Example:
+Returns the number of days in a given month/year. Takes leap years into account. Example:
echo days_in_month(06, 2005);
If the second parameter is empty, the current year will be used.
@@ -304,7 +304,7 @@ echo timespan($post_date, $now);
This menu is useful if you run a membership site in which your users are allowed to set their local timezone value.
-The first parameter lets you set the "selected" state of the menu. For example, to set Pacific time as the default you will do this:
+The first parameter lets you set the "selected" state of the menu. For example, to set Pacific time as the default you will do this:
echo timezone_menu('UM8');
diff --git a/user_guide/helpers/directory_helper.html b/user_guide/helpers/directory_helper.html
index 2086fe1f3..1a2f28d7d 100644
--- a/user_guide/helpers/directory_helper.html
+++ b/user_guide/helpers/directory_helper.html
@@ -78,12 +78,12 @@ and builds an array representation of it and all its contained files. Example:
Note: Paths are almost always relative to your main index.php file.
-Sub-folders contained within the directory will be mapped as well. If you wish to control the recursion depth,
+
Sub-folders contained within the directory will be mapped as well. If you wish to control the recursion depth,
you can do so using the second parameter (integer). A depth of 1 will only map the top level directory:
$map = directory_map('./mydirectory/', 1);
-By default, hidden files will not be included in the returned array. To override this behavior,
+
By default, hidden files will not be included in the returned array. To override this behavior,
you may set a third parameter to true (boolean):
$map = directory_map('./mydirectory/', FALSE, TRUE);
diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html
index 2d06fa25b..c37235424 100644
--- a/user_guide/helpers/file_helper.html
+++ b/user_guide/helpers/file_helper.html
@@ -69,11 +69,11 @@ File Helper
read_file('path')
-Returns the data contained in the file specified in the path. Example:
+Returns the data contained in the file specified in the path. Example:
$string = read_file('./path/to/file.php');
-The path can be a relative or full server path. Returns FALSE (boolean) on failure.
+The path can be a relative or full server path. Returns FALSE (boolean) on failure.
Note: The path is relative to your main site index.php file, NOT your controller or view files.
CodeIgniter uses a front controller so paths are always relative to the main site index.
@@ -83,7 +83,7 @@ might not work if you are trying to access a file above the calling script.
write_file('path', $data)
-Writes data to the file specified in the path. If the file does not exist the function will create it. Example:
+Writes data to the file specified in the path. If the file does not exist the function will create it. Example:
$data = 'Some file data';
@@ -101,7 +101,7 @@ else
write_file('./path/to/file.php', $data, 'r+');
-The default mode is wb. Please see the PHP user guide for mode options.
+The default mode is wb. Please see the PHP user guide for mode options.
Note: In order for this function to write data to a file its file permissions must be set such that it is writable (666, 777, etc.).
If the file does not already exist, the directory containing it must be writable.
@@ -111,7 +111,7 @@ CodeIgniter uses a front controller so paths are always relative to the main sit
delete_files('path')
-Deletes ALL files contained in the supplied path. Example:
+Deletes ALL files contained in the supplied path. Example:
delete_files('./path/to/directory/');
If the second parameter is set to true, any directories contained within the supplied root path will be deleted as well. Example:
@@ -127,12 +127,12 @@ can optionally be added to the file names by setting the second parameter to TRU
get_dir_file_info('path/to/directory/', $top_level_only = TRUE)
-Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced
+
Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced
by sending the second parameter, $top_level_only to FALSE, as this can be an intensive operation.
get_file_info('path/to/file', $file_information)
-Given a file and path, returns the name, path, size, date modified. Second parameter allows you to explicitly declare what information you want returned; options are: name, server_path, size, date, readable, writable, executable, fileperms. Returns FALSE if the file cannot be found.
+Given a file and path, returns the name, path, size, date modified. Second parameter allows you to explicitly declare what information you want returned; options are: name, server_path, size, date, readable, writable, executable, fileperms. Returns FALSE if the file cannot be found.
Note: The "writable" uses the PHP function is_writable() which is known to have issues on the IIS webserver. Consider using fileperms instead, which returns information from PHP's fileperms() function.
get_mime_by_extension('file')
@@ -142,7 +142,7 @@ can optionally be added to the file names by setting the second parameter to TRU
$file = "somefile.png";
echo $file . ' is has a mime type of ' . get_mime_by_extension($file);
-Note: This is not an accurate way of determining file mime types, and is here strictly as a convenience. It should not be used for security.
+Note: This is not an accurate way of determining file mime types, and is here strictly as a convenience. It should not be used for security.
symbolic_permissions($perms)
diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html
index b4a5730f2..87e3c28b0 100644
--- a/user_guide/helpers/form_helper.html
+++ b/user_guide/helpers/form_helper.html
@@ -72,7 +72,7 @@ Form Helper
form_open()
-Creates an opening form tag with a base URL built from your config preferences. It will optionally let you
+
Creates an opening form tag with a base URL built from your config preferences. It will optionally let you
add form attributes and hidden input fields, and will always add the attribute accept-charset based on the charset value in your config file.
The main benefit of using this tag rather than hard coding your own HTML is that it permits your site to be more portable
@@ -122,7 +122,7 @@ which is necessary if you would like to use the form to upload files with.
form_hidden()
-Lets you generate hidden input fields. You can either submit a name/value string to create one field:
+Lets you generate hidden input fields. You can either submit a name/value string to create one field:
form_hidden('username', 'johndoe');
@@ -149,7 +149,7 @@ echo form_hidden($data);
form_input()
-Lets you generate a standard text input field. You can minimally pass the field name and value in the first
+
Lets you generate a standard text input field. You can minimally pass the field name and value in the first
and second parameter:
echo form_input('username', 'johndoe');
@@ -196,9 +196,9 @@ example, you will instead specify "rows" and "cols".
form_dropdown()
-Lets you create a standard drop-down field. The first parameter will contain the name of the field,
+
Lets you create a standard drop-down field. The first parameter will contain the name of the field,
the second parameter will contain an associative array of options, and the third parameter will contain the
-value you wish to be selected. You can also pass an array of multiple items through the third parameter, and CodeIgniter will create a multiple select for you. Example:
+value you wish to be selected. You can also pass an array of multiple items through the third parameter, and CodeIgniter will create a multiple select for you. Example:
$options = array(
'small' => 'Small Shirt',
@@ -215,7 +215,7 @@ echo form_dropdown('shirts', $options, 'large');
<select name="shirts">
<option value="small">Small Shirt</option>
-<option value="med">Medium Shirt</option>
+<option value="med">Medium Shirt</option>
<option value="large" selected="selected">Large Shirt</option>
<option value="xlarge">Extra Large Shirt</option>
</select>
@@ -226,7 +226,7 @@ echo form_dropdown('shirts', $options, $shirts_on_sale);
<select name="shirts" multiple="multiple">
<option value="small" selected="selected">Small Shirt</option>
-<option value="med">Medium Shirt</option>
+<option value="med">Medium Shirt</option>
<option value="large" selected="selected">Large Shirt</option>
<option value="xlarge">Extra Large Shirt</option>
</select>
@@ -243,9 +243,9 @@ echo form_dropdown('shirts', $options, 'large', $js);
form_multiselect()
-Lets you create a standard multiselect field. The first parameter will contain the name of the field,
+
Lets you create a standard multiselect field. The first parameter will contain the name of the field,
the second parameter will contain an associative array of options, and the third parameter will contain the
-value or values you wish to be selected. The parameter usage is identical to using form_dropdown() above,
+value or values you wish to be selected. The parameter usage is identical to using form_dropdown() above,
except of course that the name of the field will need to use POST array syntax, e.g. foo[].
@@ -267,7 +267,7 @@ echo form_fieldset_close();
</fieldset>
Similar to other functions, you can submit an associative array in the second parameter if you prefer to set additional attributes.
$attributes = array('id' => 'address_info', 'class' => 'address_info');
- echo form_fieldset('Address Information', $attributes);
+ echo form_fieldset('Address Information', $attributes);
echo "<p>fieldset content here</p>\n";
echo form_fieldset_close();
@@ -277,8 +277,8 @@ echo form_fieldset_close();
<p>form content here</p>
</fieldset>
form_fieldset_close()
-Produces a closing </fieldset> tag. The only advantage to using this function is it permits you to pass data to it
- which will be added below the tag. For example:
+Produces a closing </fieldset> tag. The only advantage to using this function is it permits you to pass data to it
+ which will be added below the tag. For example:
$string = "</div></div>";
echo form_fieldset_close($string);
@@ -309,7 +309,7 @@ echo form_checkbox($data);
// Would produce:
<input type="checkbox" name="newsletter" id="newsletter" value="accept" checked="checked" style="margin:10px" />
-As with other functions, if you would like the tag to contain additional data, like JavaScript, you can pass it as a string in the
+
As with other functions, if you would like the tag to contain additional data, like JavaScript, you can pass it as a string in the
fourth parameter:
$js = 'onClick="some_function()"';
@@ -330,7 +330,7 @@ fourth parameter:
<input type="submit" name="mysubmit" value="Submit Post!" />
Similar to other functions, you can submit an associative array in the first parameter if you prefer to set your own attributes.
- The third parameter lets you add extra data to your form, like JavaScript.
+ The third parameter lets you add extra data to your form, like JavaScript.
form_label()
Lets you generate a <label>. Simple example:
echo form_label('What is your Name', 'username');
@@ -338,13 +338,13 @@ fourth parameter:
// Would produce:
<label for="username">What is your Name</label>
-Similar to other functions, you can submit an associative array in the third parameter if you prefer to set additional attributes.
+Similar to other functions, you can submit an associative array in the third parameter if you prefer to set additional attributes.
$attributes = array(
'class' => 'mycustomclass',
'style' => 'color: #000;',
);
- echo form_label('What is your Name', 'username', $attributes);
-
+ echo form_label('What is your Name', 'username', $attributes);
+
// Would produce:
<label for="username" class="mycustomclass" style="color: #000;">What is your Name</label>
form_reset()
@@ -386,8 +386,8 @@ echo form_button('mybutton', 'Click Me', $js);
form_close()
-Produces a closing </form> tag. The only advantage to using this function is it permits you to pass data to it
-which will be added below the tag. For example:
+Produces a closing </form> tag. The only advantage to using this function is it permits you to pass data to it
+which will be added below the tag. For example:
$string = "</div></div>";
@@ -404,7 +404,7 @@ echo form_close($string);
form_prep()
-Allows you to safely use HTML and characters such as quotes within form elements without breaking out of the form. Consider this example:
+Allows you to safely use HTML and characters such as quotes within form elements without breaking out of the form. Consider this example:
$string = 'Here is a string containing "quoted" text.';
@@ -431,7 +431,7 @@ The second (optional) parameter allows you to set a default value for the form.
set_select()
-If you use a <select> menu, this function permits you to display the menu item that was selected. The first parameter
+
If you use a <select> menu, this function permits you to display the menu item that was selected. The first parameter
must contain the name of the select menu, the second parameter must contain the value of
each item, and the third (optional) parameter lets you set an item as the default (use boolean TRUE/FALSE).
@@ -439,16 +439,16 @@ each item, and the third (optional) parameter lets you set an item as the defaul
<select name="myselect">
-<option value="one" <?php echo set_select('myselect', 'one', TRUE); ?> >One</option>
-<option value="two" <?php echo set_select('myselect', 'two'); ?> >Two</option>
-<option value="three" <?php echo set_select('myselect', 'three'); ?> >Three</option>
+<option value="one" <?php echo set_select('myselect', 'one', TRUE); ?> >One</option>
+<option value="two" <?php echo set_select('myselect', 'two'); ?> >Two</option>
+<option value="three" <?php echo set_select('myselect', 'three'); ?> >Three</option>
</select>
set_checkbox()
-Permits you to display a checkbox in the state it was submitted. The first parameter
+
Permits you to display a checkbox in the state it was submitted. The first parameter
must contain the name of the checkbox, the second parameter must contain its value, and the third (optional) parameter lets you set an item as the default (use boolean TRUE/FALSE). Example:
<input type="checkbox" name="mycheck" value="1" <?php echo set_checkbox('mycheck', '1'); ?> />
@@ -459,8 +459,8 @@ must contain the name of the checkbox, the second parameter must contain its val
Permits you to display radio buttons in the state they were submitted. This function is identical to the set_checkbox() function above.
-<input type="radio" name="myradio" value="1" <?php echo set_radio('myradio', '1', TRUE); ?> />
-<input type="radio" name="myradio" value="2" <?php echo set_radio('myradio', '2'); ?> />
+<input type="radio" name="myradio" value="1" <?php echo set_radio('myradio', '1', TRUE); ?> />
+<input type="radio" name="myradio" value="2" <?php echo set_radio('myradio', '2'); ?> />
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html
index 665081fb6..308013d51 100644
--- a/user_guide/helpers/html_helper.html
+++ b/user_guide/helpers/html_helper.html
@@ -84,10 +84,10 @@ HTML Helper
The above would produce: <br /><br /><br />
heading()
-Lets you create HTML <h1> tags. The first parameter will contain the data, the
-second the size of the heading. Example:
+Lets you create HTML <h1> tags. The first parameter will contain the data, the
+second the size of the heading. Example:
echo heading('Welcome!', 3);
-The above would produce: <h3>Welcome!</h3>
+The above would produce: <h3>Welcome!</h3>
Additionally, in order to add attributes to the heading tag such as HTML classes, ids or inline styles, a third parameter is available.
echo heading('Welcome!', 3, 'class="pink"')
@@ -95,7 +95,7 @@ second the size of the heading. Example:
img()
-Lets you create HTML <img /> tags. The first parameter contains the image source. Example:
+Lets you create HTML <img /> tags. The first parameter contains the image source. Example:
echo img('images/picture.jpg');
// gives <img src="http://site.com/images/picture.jpg" />
There is an optional second parameter that is a TRUE/FALSE value that specifics if the src should have the page specified by $config['index_page'] added to the address it creates. Presumably, this would be if you were using a media controller.
@@ -116,7 +116,7 @@ second the size of the heading. Example:
// <img src="http://site.com/index.php/images/picture.jpg" alt="Me, demonstrating how to eat 4 slices of pizza at one time" class="post_images" width="200" height="200" title="That was quite a night" rel="lightbox" />
link_tag()
-Lets you create HTML <link /> tags. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates.
+Lets you create HTML <link /> tags. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates.
echo link_tag('css/mystyles.css');
// gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" />
Further examples:
@@ -271,20 +271,20 @@ echo ul($list, $attributes);
meta()
-Helps you generate meta tags. You can pass strings to the function, or simple arrays, or multidimensional ones. Examples:
+Helps you generate meta tags. You can pass strings to the function, or simple arrays, or multidimensional ones. Examples:
echo meta('description', 'My Great site');
-// Generates: <meta name="description" content="My Great Site" />
+// Generates: <meta name="description" content="My Great Site" />
-echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); // Note the third parameter. Can be "equiv" or "name"
-// Generates: <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); // Note the third parameter. Can be "equiv" or "name"
+// Generates: <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
echo meta(array('name' => 'robots', 'content' => 'no-cache'));
-// Generates: <meta name="robots" content="no-cache" />
+// Generates: <meta name="robots" content="no-cache" />
@@ -298,7 +298,7 @@ $meta = array(
echo meta($meta);
-// Generates:
+// Generates:
// <meta name="robots" content="no-cache" />
// <meta name="description" content="My Great Site" />
// <meta name="keywords" content="love, passion, intrigue, deception" />
@@ -319,7 +319,7 @@ echo doctype('html4-trans');
// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-The following is a list of doctype choices. These are configurable, and pulled from application/config/doctypes.php
+The following is a list of doctype choices. These are configurable, and pulled from application/config/doctypes.php
diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html
index 087675454..221c05907 100644
--- a/user_guide/helpers/inflector_helper.html
+++ b/user_guide/helpers/inflector_helper.html
@@ -71,7 +71,7 @@ Inflector Helper
singular()
-Changes a plural word to singular. Example:
+Changes a plural word to singular. Example:
$word = "dogs";
@@ -81,7 +81,7 @@ echo singular($word); // Returns "dog"
plural()
-Changes a singular word to plural. Example:
+Changes a singular word to plural. Example:
$word = "dog";
@@ -94,7 +94,7 @@ echo plural($word); // Returns "dogs"
echo plural($word, TRUE); // Returns "passes"
camelize()
-Changes a string of words separated by spaces or underscores to camel case. Example:
+Changes a string of words separated by spaces or underscores to camel case. Example:
$word = "my_dog_spot";
@@ -104,7 +104,7 @@ echo camelize($word); // Returns "myDogSpot"
underscore()
-Takes multiple words separated by spaces and underscores them. Example:
+Takes multiple words separated by spaces and underscores them. Example:
$word = "my dog spot";
@@ -114,7 +114,7 @@ echo underscore($word); // Returns "my_dog_spot"
humanize()
-Takes multiple words separated by underscores and adds spaces between them. Each word is capitalized. Example:
+Takes multiple words separated by underscores and adds spaces between them. Each word is capitalized. Example:
$word = "my_dog_spot";
diff --git a/user_guide/helpers/language_helper.html b/user_guide/helpers/language_helper.html
index e10733baf..3b3b87da9 100644
--- a/user_guide/helpers/language_helper.html
+++ b/user_guide/helpers/language_helper.html
@@ -73,7 +73,7 @@ Language Helper
This function returns a line of text from a loaded language file with simplified syntax
that may be more desirable for view files than calling $this->lang->line().
- The optional second parameter will also output a form label for you. Example:
+ The optional second parameter will also output a form label for you. Example:
echo lang('language_key', 'form_item_id');
// becomes <label for="form_item_id">language_key</label>
diff --git a/user_guide/helpers/number_helper.html b/user_guide/helpers/number_helper.html
index a04f37c86..51a4521a6 100644
--- a/user_guide/helpers/number_helper.html
+++ b/user_guide/helpers/number_helper.html
@@ -71,7 +71,7 @@ Number Helper
byte_format()
-Formats a numbers as bytes, based on size, and adds the appropriate suffix. Examples:
+Formats a numbers as bytes, based on size, and adds the appropriate suffix. Examples:
echo byte_format(456); // Returns 456 Bytes
diff --git a/user_guide/helpers/security_helper.html b/user_guide/helpers/security_helper.html
index 49e0365d1..e0cace325 100644
--- a/user_guide/helpers/security_helper.html
+++ b/user_guide/helpers/security_helper.html
@@ -71,19 +71,19 @@ Security Helper
xss_clean()
-Provides Cross Site Script Hack filtering. This function is an alias to the one in the
-Input class. More info can be found there.
+Provides Cross Site Script Hack filtering. This function is an alias to the one in the
+Input class. More info can be found there.
sanitize_filename()
-Provides protection against directory traversal. This function is an alias to the one in the
-Security class. More info can be found there.
+Provides protection against directory traversal. This function is an alias to the one in the
+Security class. More info can be found there.
do_hash()
-Permits you to create SHA1 or MD5 one way hashes suitable for encrypting passwords. Will create SHA1 by default. Examples:
+Permits you to create SHA1 or MD5 one way hashes suitable for encrypting passwords. Will create SHA1 by default. Examples:
$str = do_hash($str); // SHA1
@@ -91,13 +91,13 @@ $str = do_hash($str); // SHA1
$str = do_hash($str, 'md5'); // MD5
-Note: This function was formerly named dohash(), which has been deprecated in favour of do_hash().
+Note: This function was formerly named dohash(), which has been deprecated in favour of do_hash().
strip_image_tags()
-This is a security function that will strip image tags from a string. It leaves the image URL as plain text.
+This is a security function that will strip image tags from a string. It leaves the image URL as plain text.
$string = strip_image_tags($string);
diff --git a/user_guide/helpers/smiley_helper.html b/user_guide/helpers/smiley_helper.html
index 4668f106e..408df17c9 100644
--- a/user_guide/helpers/smiley_helper.html
+++ b/user_guide/helpers/smiley_helper.html
@@ -83,7 +83,7 @@ Your users can click a desired smiley and with the help of some JavaScript it wi
requires that you first download and install the smiley images, then create a controller and the View as described.
Important: Before you begin, please download the smiley images and put them in
-a publicly accessible place on your server. This helper also assumes you have the smiley replacement array located at
+a publicly accessible place on your server. This helper also assumes you have the smiley replacement array located at
application/config/smileys.php
@@ -166,7 +166,7 @@ you can give your smiley links a generic name that will be tied to a specific id
get_clickable_smileys()
-Returns an array containing your smiley images wrapped in a clickable link. You must supply the URL to your smiley folder
+
Returns an array containing your smiley images wrapped in a clickable link. You must supply the URL to your smiley folder
and a field id or field alias.
$image_array = get_smiley_links("http://example.com/images/smileys/", "comment");
@@ -187,10 +187,10 @@ This function is designed to be placed into the <head> area of your web pa
parse_smileys()
Takes a string of text as input and replaces any contained plain text smileys into the image
-equivalent. The first parameter must contain your string, the second must contain the URL to your smiley folder:
+equivalent. The first parameter must contain your string, the second must contain the URL to your smiley folder:
-$str = 'Here are some simileys: :-) ;-)';
+$str = 'Here are some simileys: :-) ;-)';
$str = parse_smileys($str, "http://example.com/images/smileys/");
diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html
index 6fc2cf5f7..169ee4ebb 100644
--- a/user_guide/helpers/string_helper.html
+++ b/user_guide/helpers/string_helper.html
@@ -70,9 +70,9 @@ String Helper
random_string()
-Generates a random string based on the type and length you specify. Useful for creating passwords or generating random hashes.
+Generates a random string based on the type and length you specify. Useful for creating passwords or generating random hashes.
-The first parameter specifies the type of string, the second parameter specifies the length. The following choices are available:
+The first parameter specifies the type of string, the second parameter specifies the length. The following choices are available:
alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1
@@ -92,7 +92,7 @@ String Helper
alternator()
-Allows two or more items to be alternated between, when cycling through a loop. Example:
+Allows two or more items to be alternated between, when cycling through a loop. Example:
for ($i = 0; $i < 10; $i++)
{
diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html
index 3c83f3d42..f71d87840 100644
--- a/user_guide/helpers/text_helper.html
+++ b/user_guide/helpers/text_helper.html
@@ -71,22 +71,22 @@ Text Helper
word_limiter()
-Truncates a string to the number of words specified. Example:
+Truncates a string to the number of words specified. Example:
$string = "Here is a nice text string consisting of eleven words.";
$string = word_limiter($string, 4);
-// Returns: Here is a nice…
+// Returns: Here is a nice…
-The third parameter is an optional suffix added to the string. By default it adds an ellipsis.
+The third parameter is an optional suffix added to the string. By default it adds an ellipsis.
character_limiter()
-Truncates a string to the number of characters specified. It maintains the integrity
+
Truncates a string to the number of characters specified. It maintains the integrity
of words so the character count may be slightly more or less then what you specify. Example:
@@ -94,7 +94,7 @@ $string = "Here is a nice text string consisting of eleven words.";
$string = character_limiter($string, 20);
-// Returns: Here is a nice text string…
+// Returns: Here is a nice text string…
The third parameter is an optional suffix added to the string, if undeclared this helper uses an ellipsis.
@@ -125,9 +125,9 @@ part it should correctly identify characters outside the normal range (like acce
word_censor()
-Enables you to censor words within a text string. The first parameter will contain the original string. The
-second will contain an array of words which you disallow. The third (optional) parameter can contain a replacement value
-for the words. If not specified they are replaced with pound signs: ####. Example:
+Enables you to censor words within a text string. The first parameter will contain the original string. The
+second will contain an array of words which you disallow. The third (optional) parameter can contain a replacement value
+for the words. If not specified they are replaced with pound signs: ####. Example:
$disallowed = array('darn', 'shucks', 'golly', 'phooey');
@@ -137,7 +137,7 @@ $string = word_censor($string, $disallowed, 'Beep!');
highlight_code()
-Colorizes a string of code (PHP, HTML, etc.). Example:
+Colorizes a string of code (PHP, HTML, etc.). Example:
$string = highlight_code($string);
@@ -146,9 +146,9 @@ $string = word_censor($string, $disallowed, 'Beep!');
highlight_phrase()
-Will highlight a phrase within a text string. The first parameter will contain the original string, the second will
-contain the phrase you wish to highlight. The third and fourth parameters will contain the opening/closing HTML tags
-you would like the phrase wrapped in. Example:
+Will highlight a phrase within a text string. The first parameter will contain the original string, the second will
+contain the phrase you wish to highlight. The third and fourth parameters will contain the opening/closing HTML tags
+you would like the phrase wrapped in. Example:
$string = "Here is a nice text string about nothing in particular.";
@@ -164,7 +164,7 @@ $string = highlight_phrase($string, "nice text", '<span style="color:#990000"
word_wrap()
-Wraps text at the specified character count while maintaining complete words. Example:
+Wraps text at the specified character count while maintaining complete words. Example:
$string = "Here is a simple string of text that will help us demonstrate this function.";
@@ -180,8 +180,8 @@ function
ellipsize()
This function will strip tags from a string, split it at a defined maximum length, and insert an ellipsis.
-The first parameter is the string to ellipsize, the second is the number of characters in the final string. The third parameter is where in the string the ellipsis should appear from 0 - 1, left to right. For example. a value of 1 will place the ellipsis at the right of the string, .5 in the middle, and 0 at the left.
-An optional forth parameter is the kind of ellipsis. By default, … will be inserted.
+The first parameter is the string to ellipsize, the second is the number of characters in the final string. The third parameter is where in the string the ellipsis should appear from 0 - 1, left to right. For example. a value of 1 will place the ellipsis at the right of the string, .5 in the middle, and 0 at the left.
+An optional forth parameter is the kind of ellipsis. By default, … will be inserted.
$str = 'this_string_is_entirely_too_long_and_might_break_my_design.jpg';
diff --git a/user_guide/helpers/typography_helper.html b/user_guide/helpers/typography_helper.html
index e75528fbb..00686a340 100644
--- a/user_guide/helpers/typography_helper.html
+++ b/user_guide/helpers/typography_helper.html
@@ -71,7 +71,7 @@ Typography Helper
auto_typography()
-Formats text so that it is semantically and typographically correct HTML. Please see the Typography Class for more info.
+Formats text so that it is semantically and typographically correct HTML. Please see the Typography Class for more info.
Usage example:
diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html
index 0bcf1e7ae..d20f1b1e2 100644
--- a/user_guide/helpers/url_helper.html
+++ b/user_guide/helpers/url_helper.html
@@ -69,13 +69,13 @@ URL Helper
site_url()
-Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your
+
Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your
site index_page in your config file) will be added to the URL, as will any URI segments you pass to the function.
You are encouraged to use this function any time you need to generate a local URL so that your pages become more portable
in the event your URL changes.
-Segments can be optionally passed to the function as a string or an array. Here is a string example:
+Segments can be optionally passed to the function as a string or an array. Here is a string example:
echo site_url("news/local/123");
@@ -90,7 +90,7 @@ echo site_url($segments);
base_url()
-Returns your site base URL, as specified in your config file. Example:
+Returns your site base URL, as specified in your config file. Example:
echo base_url();
@@ -99,7 +99,7 @@ echo site_url($segments);
uri_string()
-Returns the URI segments of any page that contains this function. For example, if your URL was this:
+Returns the URI segments of any page that contains this function. For example, if your URL was this:
http://some-site.com/blog/comments/123
The function would return:
@@ -107,7 +107,7 @@ echo site_url($segments);
index_page()
-Returns your site "index" page, as specified in your config file. Example:
+Returns your site "index" page, as specified in your config file. Example:
echo index_page();
@@ -122,15 +122,15 @@ echo site_url($segments);
anchor(uri segments, text, attributes)
-The first parameter can contain any segments you wish appended to the URL. As with the site_url() function above,
+
The first parameter can contain any segments you wish appended to the URL. As with the site_url() function above,
segments can be a string or an array.
-Note: If you are building links that are internal to your application do not include the base URL (http://...). This
+
Note: If you are building links that are internal to your application do not include the base URL (http://...). This
will be added automatically from the information specified in your config file. Include only the URI segments you wish appended to the URL.
-The second segment is the text you would like the link to say. If you leave it blank, the URL will be used.
+The second segment is the text you would like the link to say. If you leave it blank, the URL will be used.
-The third parameter can contain a list of attributes you would like added to the link. The attributes can be a simple string or an associative array.
+The third parameter can contain a list of attributes you would like added to the link. The attributes can be a simple string or an associative array.
Here are some examples:
@@ -148,7 +148,7 @@ will be added automatically from the information specified in your config file.
Nearly identical to the anchor() function except that it opens the URL in a new window.
You can specify JavaScript window attributes in the third parameter to control how the window is opened. If
-the third parameter is not set it will simply open a new window with your own browser settings. Here is an example
+the third parameter is not set it will simply open a new window with your own browser settings. Here is an example
with attributes:
@@ -173,7 +173,7 @@ If you want the function to use all of its defaults simply pass an empty array i
mailto()
-Creates a standard HTML email link. Usage example:
+Creates a standard HTML email link. Usage example:
echo mailto('me@my-site.com', 'Click Here to Contact Me');
@@ -188,12 +188,12 @@ written with JavaScript to help prevent the email address from being harvested b
auto_link()
-Automatically turns URLs and email addresses contained in a string into links. Example:
+Automatically turns URLs and email addresses contained in a string into links. Example:
$string = auto_link($string);
-The second parameter determines whether URLs and emails are converted or just one or the other. Default behavior is both
-if the parameter is not specified. Email links are encoded as safe_mailto() as shown above.
+The second parameter determines whether URLs and emails are converted or just one or the other. Default behavior is both
+if the parameter is not specified. Email links are encoded as safe_mailto() as shown above.
Converts only URLs:
$string = auto_link($string, 'url');
@@ -201,42 +201,42 @@ if the parameter is not specified. Email links are encoded as safe_mailto() as s
Converts only Email addresses:
$string = auto_link($string, 'email');
-The third parameter determines whether links are shown in a new window. The value can be TRUE or FALSE (boolean):
+The third parameter determines whether links are shown in a new window. The value can be TRUE or FALSE (boolean):
$string = auto_link($string, 'both', TRUE);
url_title()
Takes a string as input and creates a human-friendly URL string. This is useful if, for example, you have a blog
-in which you'd like to use the title of your entries in the URL. Example:
+in which you'd like to use the title of your entries in the URL. Example:
$title = "What's wrong with CSS?";
$url_title = url_title($title);
-// Produces: Whats-wrong-with-CSS
+// Produces: Whats-wrong-with-CSS
-The second parameter determines the word delimiter. By default dashes are used. Options are: dash, or underscore:
+The second parameter determines the word delimiter. By default dashes are used. Options are: dash, or underscore:
$title = "What's wrong with CSS?";
$url_title = url_title($title, 'underscore');
-// Produces: Whats_wrong_with_CSS
+// Produces: Whats_wrong_with_CSS
-The third parameter determines whether or not lowercase characters are forced. By default they are not. Options are boolean TRUE/FALSE:
+The third parameter determines whether or not lowercase characters are forced. By default they are not. Options are boolean TRUE/FALSE:
$title = "What's wrong with CSS?";
$url_title = url_title($title, 'underscore', TRUE);
-// Produces: whats_wrong_with_css
+// Produces: whats_wrong_with_css
prep_url()
-This function will add http:// in the event that a scheme is missing from a URL. Pass the URL string to the function like this:
+This function will add http:// in the event that a scheme is missing from a URL. Pass the URL string to the function like this:
$url = "example.com";
$url = prep_url($url);
@@ -250,7 +250,7 @@ $url = prep_url($url);
to the controller you want to direct to will create the link. The function will build the URL based on your config file values.
The optional second parameter allows you to choose between the "location"
-method (default) or the "refresh" method. Location is faster, but on Windows servers it can sometimes be a problem. The optional third parameter allows you to send a specific HTTP Response Code - this could be used for example to create 301 redirects for search engine purposes. The default Response Code is 302. The third parameter is only available with 'location' redirects, and not 'refresh'. Examples:
+method (default) or the "refresh" method. Location is faster, but on Windows servers it can sometimes be a problem. The optional third parameter allows you to send a specific HTTP Response Code - this could be used for example to create 301 redirects for search engine purposes. The default Response Code is 302. The third parameter is only available with 'location' redirects, and not 'refresh'. Examples:
if ($logged_in == FALSE)
{
@@ -262,7 +262,7 @@ redirect('/article/13', 'location', 301);
Note: In order for this function to work it must be used before anything is outputted
to the browser since it utilizes server headers.
-Note: For very fine grained control over headers, you should use the Output Library's set_header() function.
+Note: For very fine grained control over headers, you should use the Output Library's set_header() function.
diff --git a/user_guide/helpers/xml_helper.html b/user_guide/helpers/xml_helper.html
index b3d408c7d..ded9aaa35 100644
--- a/user_guide/helpers/xml_helper.html
+++ b/user_guide/helpers/xml_helper.html
@@ -78,7 +78,7 @@ Less then and greater than characters: < >
Single and double quotes: ' "
Dashes: -
-This function ignores ampersands if they are part of existing character entities. Example:
+This function ignores ampersands if they are part of existing character entities. Example:
$string = xml_convert($string);
--
cgit v1.2.3-24-g4f1b