From 20292311636837e120d205e470e41826820feb46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 14:29:10 +0300 Subject: Change class filenames to Ucfirst --- user_guide_src/source/helpers/smiley_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst index 7069b465e..3925f8b1a 100644 --- a/user_guide_src/source/helpers/smiley_helper.rst +++ b/user_guide_src/source/helpers/smiley_helper.rst @@ -43,7 +43,7 @@ View as described. The Controller -------------- -In your `application/controllers/` folder, create a file called +In your **application/controllers/** directory, create a file called smileys.php and place the code below in it. .. important:: Change the URL in the :php:func:`get_clickable_smileys()` @@ -70,7 +70,7 @@ the :doc:`Table Class <../libraries/table>`:: } -In your `application/views/` folder, create a file called `smiley_view.php` +In your **application/views/** folder, create a file called **smiley_view.php** and place this code in it:: -- cgit v1.2.3-24-g4f1b From bb8b08982369dd6a2d321844dced488f92134f20 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sun, 28 Jul 2013 22:35:04 +0200 Subject: Polishing Form helper --- user_guide_src/source/helpers/form_helper.rst | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index b2a9b6f0f..8f7515788 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -22,7 +22,7 @@ form_open() .. php:function:: form_open($action = '', $attributes = '', $hidden = array()) :param string $action: Form action/target URI string - :param string $attributes: HTML attributes + :param array $attributes: HTML attributes :param array $hidden: An array of hidden fields' definitions :returns: string @@ -41,7 +41,7 @@ Here's a simple example:: The above example would create a form that points to your base URL plus the "email/send" URI segments, like this:: -
+ Adding Attributes ^^^^^^^^^^^^^^^^^ @@ -52,9 +52,13 @@ parameter, like this:: $attributes = array('class' => 'email', 'id' => 'myform'); echo form_open('email/send', $attributes); -The above example would create a form similar to this:: +Alternatively, you can specify the second parameter as a string:: + + echo form_open('email/send', 'class="email" id="myform"'); + +The above examples would create a form similar to this:: - + Adding Hidden Input Fields ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -65,6 +69,8 @@ third parameter, like this:: $hidden = array('username' => 'Joe', 'member_id' => '234'); echo form_open('email/send', '', $hidden); +You can skip the second parameter by passing any falsy value to it. + The above example would create a form similar to this:: @@ -77,7 +83,7 @@ form_open_multipart() .. php:function:: form_open_multipart($action = '', $attributes = array(), $hidden = array()) :param string $action: Form action/target URI string - :param string $attributes: HTML attributes + :param array $attributes: HTML attributes :param array $hidden: An array of hidden fields' definitions :returns: string @@ -407,16 +413,14 @@ The third parameter contains a boolean TRUE/FALSE to determine whether the box should be checked or not. Similar to the other form functions in this helper, you can also pass an -array of attributes to the function - -:: +array of attributes to the function:: $data = array( 'name' => 'newsletter', - 'id'      => 'newsletter', - 'value'   => 'accept', + 'id' => 'newsletter', + 'value' => 'accept', 'checked' => TRUE, - 'style'   => 'margin:10px' + 'style' => 'margin:10px' ); echo form_checkbox($data); -- cgit v1.2.3-24-g4f1b From ed670246fa70d0156b561c56291b8bd58aa9df34 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 29 Jul 2013 08:31:51 +0200 Subject: Change spaces to tabs --- user_guide_src/source/helpers/form_helper.rst | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 8f7515788..f49027baa 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -264,10 +264,10 @@ multiple select for you. Example:: $options = array( - 'small' => 'Small Shirt', - 'med' => 'Medium Shirt', - 'large' => 'Large Shirt', - 'xlarge' => 'Extra Large Shirt', + 'small' => 'Small Shirt', + 'med' => 'Medium Shirt', + 'large' => 'Large Shirt', + 'xlarge' => 'Extra Large Shirt', ); $shirts_on_sale = array('small', 'large'); @@ -416,11 +416,11 @@ Similar to the other form functions in this helper, you can also pass an array of attributes to the function:: $data = array( - 'name' => 'newsletter', - 'id' => 'newsletter', - 'value' => 'accept', - 'checked' => TRUE, - 'style' => 'margin:10px' + 'name' => 'newsletter', + 'id' => 'newsletter', + 'value' => 'accept', + 'checked' => TRUE, + 'style' => 'margin:10px' ); echo form_checkbox($data); @@ -527,11 +527,11 @@ Or you can pass an associative array containing any data you wish your form to contain:: $data = array( - 'name' => 'button', - 'id' => 'button', - 'value' => 'true', - 'type' => 'reset', - 'content' => 'Reset' + 'name' => 'button', + 'id' => 'button', + 'value' => 'true', + 'type' => 'reset', + 'content' => 'Reset' ); echo form_button($data); -- cgit v1.2.3-24-g4f1b From c941d855dc32ec44107cb863596fa385c7aed015 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 6 Aug 2013 14:44:40 +0200 Subject: Various typos and tabs adjustments --- user_guide_src/source/helpers/smiley_helper.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst index 3925f8b1a..cfd52ffbc 100644 --- a/user_guide_src/source/helpers/smiley_helper.rst +++ b/user_guide_src/source/helpers/smiley_helper.rst @@ -17,7 +17,7 @@ This helper is loaded using the following code:: Overview ======== -The Smiley helper has a renderer that takes plain text simileys, like +The Smiley helper has a renderer that takes plain text smileys, like :-) and turns them into a image representation, like |smile!| It also lets you display a set of smiley images that when clicked will @@ -44,7 +44,7 @@ The Controller -------------- In your **application/controllers/** directory, create a file called -smileys.php and place the code below in it. +Smileys.php and place the code below in it. .. important:: Change the URL in the :php:func:`get_clickable_smileys()` function below so that it points to your smiley folder. @@ -156,7 +156,7 @@ string, the second must contain the URL to your smiley folder Example:: - $str = 'Here are some simileys: :-) ;-)'; + $str = 'Here are some smileys: :-) ;-)'; $str = parse_smileys($str, "http://example.com/images/smileys/"); echo $str; -- cgit v1.2.3-24-g4f1b From 72b4b3cbc71d2c266938b8878baba11c11c565ca Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Oct 2013 14:44:57 +0300 Subject: Add 'filename' to the return elements for create_captcha() (PR #2602) --- user_guide_src/source/helpers/captcha_helper.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/captcha_helper.rst b/user_guide_src/source/helpers/captcha_helper.rst index 3c56addf3..f47173453 100644 --- a/user_guide_src/source/helpers/captcha_helper.rst +++ b/user_guide_src/source/helpers/captcha_helper.rst @@ -26,7 +26,7 @@ create_captcha() :param string $img_path: Path to create the image in :param string $img_url: URL to the CAPTCHA image folder :param string $font_path: Server path to font - :returns: array('word' => $word, 'time' => $now, 'image' => $img) + :returns: array Takes an array of information to generate the CAPTCHA as input and creates the image to your specifications, returning an array of @@ -35,9 +35,10 @@ associative data about the image. :: array( - 'image' => IMAGE TAG - 'time' => TIMESTAMP (in microtime) - 'word' => CAPTCHA WORD + 'word' => CAPTCHA WORD, + 'time' => TIMESTAMP (in microtime), + 'image' => IMAGE TAG, + 'filename' => IMAGE FILE NAME ) The **image** is the actual image tag:: -- cgit v1.2.3-24-g4f1b From f964b16f3db95d655420dfae2012ee9fbb98a1a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Nov 2013 17:04:55 +0200 Subject: Deprecate CI_Input::is_cli_request() and add common function is_cli() to replace it Calls to this function are often needed before the Input library is available --- user_guide_src/source/helpers/date_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 5dfee8b48..8126eba6c 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -80,7 +80,7 @@ Example:: $time = time(); echo standard_date($format, $time); -.. note:: This function is DEPRECATED.Use the native ``date()`` combined with +.. note:: This function is DEPRECATED. Use the native ``date()`` combined with `DateTime's format constants `_ instead: -- cgit v1.2.3-24-g4f1b