From 7bf0a4ff35efc758ef43b3a848e655285946b8b6 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Tue, 27 Mar 2012 18:36:15 +0200 Subject: Added doccumentation for the new date helper. --- user_guide_src/source/helpers/date_helper.rst | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (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 b21d147bd..b8c3dd076 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,14 +20,20 @@ The following functions are available: 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 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. - -.. php:method:: now() +Returns the current time as a Unix timestamp, based on the "timezone" parameter. +All PHP available timezones are supported. + +.. php:method:: now($timezone = NULL) + + :param string $timezone: The timezone you want to be returned + :returns: integer + +:: + + $tz = "Australia/Victoria"; + echo now($tz); + +If a timezone is not provided, it will return time() based on "timezone" setting. mdate() ======= -- cgit v1.2.3-24-g4f1b From 0f0b76980cb07f39b20c8591882aeae3854f016c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jun 2012 14:57:04 +0300 Subject: Deprecated do_hash() and read_file() in favor of hash() and file_get_contents() respectively --- user_guide_src/source/helpers/file_helper.rst | 3 +++ user_guide_src/source/helpers/security_helper.rst | 6 ++++-- user_guide_src/source/helpers/string_helper.rst | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/file_helper.rst b/user_guide_src/source/helpers/file_helper.rst index bfc271eb3..60c5aa98c 100644 --- a/user_guide_src/source/helpers/file_helper.rst +++ b/user_guide_src/source/helpers/file_helper.rst @@ -32,6 +32,9 @@ The path can be a relative or full server path. Returns FALSE (boolean) on failu controller or view files. CodeIgniter uses a front controller so paths are always relative to the main site index. +.. note:: This function is DEPRECATED. Use the native ``file_get_contents()`` + instead. + If your server is running an `open_basedir` restriction this function might not work if you are trying to access a file above the calling script. write_file('path', $data) diff --git a/user_guide_src/source/helpers/security_helper.rst b/user_guide_src/source/helpers/security_helper.rst index b1bcf2b4a..ec0be28b3 100644 --- a/user_guide_src/source/helpers/security_helper.rst +++ b/user_guide_src/source/helpers/security_helper.rst @@ -43,8 +43,10 @@ for a full list of supported algorithms. $str = do_hash($str); // SHA1 $str = do_hash($str, 'md5'); // MD5 -.. note:: This function was formerly named dohash(), which has been - removed in favor of `do_hash()`. +.. note:: This function was formerly named ``dohash()``, which has been + removed in favor of ``do_hash()``. + +.. note:: This function is DEPRECATED. Use the native ``hash()`` instead. strip_image_tags() ================== diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index 2d23fb00c..19500aa0d 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -36,8 +36,7 @@ alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1 - **unique**: Encrypted with MD5 and uniqid(). Note: The length parameter is not available for this type. Returns a fixed length 32 character string. -- **sha1**: An encrypted random number based on do_hash() from the - :doc:`security helper `. +- **sha1**: An encrypted random number based on ``sha1()``. Usage example -- cgit v1.2.3-24-g4f1b From e15e3dde9dca15e2d65f098010d3fb7004cef5e7 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Sat, 9 Jun 2012 23:52:27 +0200 Subject: Fixed timezone change in index.php Now it does not ever change the local timezone, and it adds the option to get the 'local' time() --- user_guide_src/source/helpers/date_helper.rst | 3 ++- 1 file changed, 2 insertions(+), 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 b6c6ed4bb..33b39bd5b 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -21,7 +21,8 @@ now() ===== Returns the current time as a Unix timestamp, based on the "timezone" parameter. -All PHP available timezones are supported. +All PHP available timezones are supported. You can also use 'local' timezone, and +it will return time(). .. php:method:: now($timezone = NULL) -- cgit v1.2.3-24-g4f1b From feb14dac4e7a417a48344a5188a8ad8074871df4 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Tue, 12 Jun 2012 16:09:36 +0200 Subject: Changed the config parameter. The session's _get_time() function has also changed. --- user_guide_src/source/helpers/date_helper.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (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 33b39bd5b..7bbfd4f15 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -30,11 +30,9 @@ it will return time(). :returns: integer :: + echo now("Australia/Victoria"); - $tz = "Australia/Victoria"; - echo now($tz); - -If a timezone is not provided, it will return time() based on "timezone" setting. +If a timezone is not provided, it will return time() based on "time_reference" setting. mdate() ======= -- cgit v1.2.3-24-g4f1b From 7400965017f87c3aba18bf75ed7d732359fd577d Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Wed, 13 Jun 2012 22:57:50 +0200 Subject: Fixed some stuff in documentation. --- user_guide_src/source/helpers/date_helper.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (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 7bbfd4f15..1b7177fc2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,9 +20,12 @@ The following functions are available: now() ===== -Returns the current time as a Unix timestamp, based on the "timezone" parameter. -All PHP available timezones are supported. You can also use 'local' timezone, and -it will return time(). +Returns the current time as a Unix timestamp, referenced either to your +server's local time or any PHP suported timezone, based on the "time reference" +setting in your config file. If you do not intend to set your master time reference +to any other PHP suported timezone (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. .. php:method:: now($timezone = NULL) -- cgit v1.2.3-24-g4f1b From c275b23b06195e4ea6424d96a0c76b825c71443a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 16:13:17 +0300 Subject: Fix nice_date() documentation --- user_guide_src/source/helpers/date_helper.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (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 1b7177fc2..b6dc2e934 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -247,16 +247,18 @@ Example :: - $bad_time = 199605 // Should Produce: 1996-05-01 - $better_time = nice_date($bad_time,'Y-m-d'); - $bad_time = 9-11-2001 // Should Produce: 2001-09-11 - $better_time = nice_date($human,'Y-m-d'); + $bad_date = '199605'; + // Should Produce: 1996-05-01 + $better_date = nice_date($bad_date, 'Y-m-d'); + + $bad_date = '9-11-2001'; + // Should Produce: 2001-09-11 + $better_date = nice_date($bad_date, 'Y-m-d'); timespan() ========== Formats a unix timestamp so that is appears similar to this - :: 1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes -- cgit v1.2.3-24-g4f1b From 81c3208b79cca353b27ecd4bdf00d4b6e7c91b2c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 16 Jun 2012 21:21:46 +0300 Subject: anchor_popup() improvements --- user_guide_src/source/helpers/url_helper.rst | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index e6d51b22b..3c91fd5dd 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -168,19 +168,20 @@ browser settings. Here is an example with attributes :: - $atts = array(                - 'width'      => '800',                - 'height'     => '600',                - 'scrollbars' => 'yes',                - 'status'     => 'yes',                - 'resizable'  => 'yes',                - 'screenx'    => '0',                - 'screeny'    => '0'              + $atts = array( + 'width' => '800', + 'height' => '600', + 'scrollbars' => 'yes', + 'status'      => 'yes', + 'resizable'   => 'yes', + 'screenx'     => '0', + 'screeny'     => '0', + 'window_name' => '_blank' ); echo anchor_popup('news/local/123', 'Click Me!', $atts); -Note: The above attributes are the function defaults so you only need to +.. note:: The above attributes are the function defaults so you only need to set the ones that are different from what you need. If you want the function to use all of its defaults simply pass an empty array in the third parameter @@ -189,6 +190,13 @@ third parameter echo anchor_popup('news/local/123', 'Click Me!', array()); +.. note:: The 'window_name' is not really an attribute, but an argument to + the JavaScript `window.open() ` + method, which accepts either a window name or a window target. + +.. note:: Any other attribute than the listed above will be parsed as an + HTML attribute to the anchor tag. + mailto() ======== -- cgit v1.2.3-24-g4f1b From 7540dede0f01acd7aa1ffd224defc5189305a815 Mon Sep 17 00:00:00 2001 From: Mat Whitney Date: Fri, 22 Jun 2012 12:02:10 -0700 Subject: Added optional fourth parameter to timezone_menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit allows setting one or more attributes on the generated select tag. This allows passing attributes needed for Section 508 compliance § 1194.22(n), such as an id. http://access-board.gov/sec508/guide/1194.22.htm#(n) http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels --- user_guide_src/source/helpers/date_helper.rst | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (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 b6dc2e934..ba079394d 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -115,7 +115,7 @@ Supported formats: local_to_gmt() ============== -Takes a Unix timestamp as input and returns it as GMT. +Takes a Unix timestamp as input and returns it as GMT. .. php:method:: local_to_gmt($time = '') @@ -159,7 +159,7 @@ Example mysql_to_unix() =============== -Takes a MySQL Timestamp as input and returns it as Unix. +Takes a MySQL Timestamp as input and returns it as Unix. .. php:method:: mysql_to_unix($time = '') @@ -212,7 +212,7 @@ 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. +date string passed to it is not formatted as indicated above. .. php:method:: human_to_unix($datestr = '') @@ -235,9 +235,9 @@ them into something useful. It also accepts well-formed dates. The function will return a Unix timestamp by default. You can, optionally, pass a format string (the same type as the PHP date function -accepts) as the second parameter. +accepts) as the second parameter. -.. php:method:: nice_date($bad_date = '', $format = FALSE) +.. php:method:: nice_date($bad_date = '', $format = FALSE) :param integer $bad_date: The terribly formatted date-like string :param string $format: Date format to return (same as php date function) @@ -265,10 +265,10 @@ Formats a unix timestamp so that is appears similar to this 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 third -parameter is optional and limits the number of time units to display. -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. +the second parameter empty, the current time will be used. The third +parameter is optional and limits the number of time units to display. +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. .. php:method:: timespan($seconds = 1, $time = '', $units = '') @@ -293,7 +293,7 @@ days_in_month() =============== Returns the number of days in a given month/year. Takes leap years into -account. +account. .. php:method:: days_in_month($month = 0, $year = '') @@ -390,14 +390,15 @@ 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 -.. php:method:: timezone_menu($default = 'UTC', $class = "", $name = 'timezones') +.. php:method:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') :param string $default: timezone :param string $class: classname :param string $name: menu name + :param mixed $attributes: attributes :returns: string -Example: +Example: :: @@ -407,6 +408,8 @@ Please see the timezone reference below to see the values of this menu. The second parameter lets you set a CSS class name for the menu. +The fourth parameter lets you set one or more attributes on the generated select tag. + .. note:: The text contained in the menu is found in the following language file: `language//date_lang.php` -- cgit v1.2.3-24-g4f1b From ce79be0b5ffc9d5754c93771a8c289a252ec437b Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 25 Jun 2012 23:23:46 -0700 Subject: Fixing various Sphinx bugs and syntax errors in docs --- user_guide_src/source/helpers/date_helper.rst | 165 +++++++++----------------- user_guide_src/source/helpers/url_helper.rst | 6 +- 2 files changed, 61 insertions(+), 110 deletions(-) (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 ba079394d..5adfb18d2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -87,30 +87,20 @@ contain the date as a Unix timestamp. Supported formats: -+----------------+------------------------+-----------------------------------+ -| Constant | Description | Example | -+================+========================+===================================+ -| DATE_ATOM | Atom | 2005-08-15T16:13:03+0000 | -+----------------+------------------------+-----------------------------------+ -| DATE_COOKIE | HTTP Cookies | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_ISO8601 | ISO-8601 | 2005-08-14T16:13:03+00:00 | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC822 | RFC 822 | Sun, 14 Aug 05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC850 | RFC 850 | Sunday, 14-Aug-05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC1036 | RFC 1036 | Sunday, 14-Aug-05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC1123 | RFC 1123 | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC2822 | RFC 2822 | Sun, 14 Aug 2005 16:13:03 +0000 | -+----------------+------------------------+-----------------------------------+ -| DATE_RSS | RSS | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_W3C | W3C | 2005-08-14T16:13:03+0000 | -+----------------+------------------------+-----------------------------------+ - +=============== ======================= ====================================== +Constant Description Example +=============== ======================= ====================================== +DATE_ATOM Atom 2005-08-15T16:13:03+0000 +DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC +DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 +DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC +DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC +DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 +DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC +DATE_W3C W3C 2005-08-14T16:13:03+0000 +=============== ======================= ====================================== local_to_gmt() ============== @@ -421,86 +411,47 @@ The following table indicates each timezone and its location. Note some of the location lists have been abridged for clarity and formatting. -+------------+----------------------------------------------------------------+ -| Time Zone | Location | -+============+================================================================+ -| UM12 | (UTC - 12:00) Baker/Howland Island | -+------------+----------------------------------------------------------------+ -| UM11 | (UTC - 11:00) Samoa Time Zone, Niue | -+------------+----------------------------------------------------------------+ -| UM10 | (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands | -+------------+----------------------------------------------------------------+ -| UM95 | (UTC - 09:30) Marquesas Islands | -+------------+----------------------------------------------------------------+ -| UM9 | (UTC - 09:00) Alaska Standard Time, Gambier Islands | -+------------+----------------------------------------------------------------+ -| UM8 | (UTC - 08:00) Pacific Standard Time, Clipperton Island | -+------------+----------------------------------------------------------------+ -| UM7 | (UTC - 11:00) Mountain Standard Time | -+------------+----------------------------------------------------------------+ -| UM6 | (UTC - 06:00) Central Standard Time | -+------------+----------------------------------------------------------------+ -| UM5 | (UTC - 05:00) Eastern Standard Time, Western Caribbean | -+------------+----------------------------------------------------------------+ -| UM45 | (UTC - 04:30) Venezuelan Standard Time | -+------------+----------------------------------------------------------------+ -| UM4 | (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean | -+------------+----------------------------------------------------------------+ -| UM35 | (UTC - 03:30) Newfoundland Standard Time | -+------------+----------------------------------------------------------------+ -| UM3 | (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay | -+------------+----------------------------------------------------------------+ -| UM2 | (UTC - 02:00) South Georgia/South Sandwich Islands | -+------------+----------------------------------------------------------------+ -| UM1 | (UTC -1:00) Azores, Cape Verde Islands | -+------------+----------------------------------------------------------------+ -| UTC | (UTC) Greenwich Mean Time, Western European Time | -+------------+----------------------------------------------------------------+ -| UP1 | (UTC +1:00) Central European Time, West Africa Time | -+------------+----------------------------------------------------------------+ -| UP2 | (UTC +2:00) Central Africa Time, Eastern European Time | -+------------+----------------------------------------------------------------+ -| UP3 | (UTC +3:00) Moscow Time, East Africa Time | -+------------+----------------------------------------------------------------+ -| UP35 | (UTC +3:30) Iran Standard Time | -+------------+----------------------------------------------------------------+ -| UP4 | (UTC +4:00) Azerbaijan Standard Time, Samara Time | -+------------+----------------------------------------------------------------+ -| UP45 | (UTC +4:30) Afghanistan | -+------------+----------------------------------------------------------------+ -| UP5 | (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time | -+------------+----------------------------------------------------------------+ -| UP55 | (UTC +5:30) Indian Standard Time, Sri Lanka Time | -+------------+----------------------------------------------------------------+ -| UP575 | (UTC +5:45) Nepal Time | -+------------+----------------------------------------------------------------+ -| UP6 | (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time | -+------------+----------------------------------------------------------------+ -| UP65 | (UTC +6:30) Cocos Islands, Myanmar | -+------------+----------------------------------------------------------------+ -| UP7 | (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam| -+------------+----------------------------------------------------------------+ -| UP8 | (UTC +8:00) Australian Western Standard Time, Beijing Time | -+------------+----------------------------------------------------------------+ -| UP875 | (UTC +8:45) Australian Central Western Standard Time | -+------------+----------------------------------------------------------------+ -| UP9 | (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk | -+------------+----------------------------------------------------------------+ -| UP95 | (UTC +9:30) Australian Central Standard Time | -+------------+----------------------------------------------------------------+ -| UP10 | (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time| -+------------+----------------------------------------------------------------+ -| UP105 | (UTC +10:30) Lord Howe Island | -+------------+----------------------------------------------------------------+ -| UP11 | (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu | -+------------+----------------------------------------------------------------+ -| UP115 | (UTC +11:30) Norfolk Island | -+------------+----------------------------------------------------------------+ -| UP12 | (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand | -+------------+----------------------------------------------------------------+ -| UP1275 | (UTC +12:45) Chatham Islands Standard Time | -+------------+----------------------------------------------------------------+ -| UP13 | (UTC +13:00) Phoenix Islands Time, Tonga | -+------------+----------------------------------------------------------------+ -| UP14 | (UTC +14:00) Line Islands | -+------------+----------------------------------------------------------------+ +=========== ===================================================================== +Time Zone Location +=========== ===================================================================== +UM2 (UTC - 12:00) Baker/Howland Island +UM1 (UTC - 11:00) Samoa Time Zone, Niue +UM0 (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands +UM95 (UTC - 09:30) Marquesas Islands +UM9 (UTC - 09:00) Alaska Standard Time, Gambier Islands +UM8 (UTC - 08:00) Pacific Standard Time, Clipperton Island +UM7 (UTC - 11:00) Mountain Standard Time +UM6 (UTC - 06:00) Central Standard Time +UM5 (UTC - 05:00) Eastern Standard Time, Western Caribbean +UM45 (UTC - 04:30) Venezuelan Standard Time +UM4 (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean +UM35 (UTC - 03:30) Newfoundland Standard Time +UM3 (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay +UM2 (UTC - 02:00) South Georgia/South Sandwich Islands +UM (UTC -1:00) Azores, Cape Verde Islands +UTC (UTC) Greenwich Mean Time, Western European Time +UP1 (UTC +1:00) Central European Time, West Africa Time +UP2 (UTC +2:00) Central Africa Time, Eastern European Time +UP3 (UTC +3:00) Moscow Time, East Africa Time +UP35 (UTC +3:30) Iran Standard Time +UP4 (UTC +4:00) Azerbaijan Standard Time, Samara Time +UP45 (UTC +4:30) Afghanistan +UP5 (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time +UP55 (UTC +5:30) Indian Standard Time, Sri Lanka Time +UP575 (UTC +5:45) Nepal Time +UP6 (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time +UP65 (UTC +6:30) Cocos Islands, Myanmar +UP7 (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam +UP8 (UTC +8:00) Australian Western Standard Time, Beijing Time +UP875 (UTC +8:45) Australian Central Western Standard Time +UP9 (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk +UP95 (UTC +9:30) Australian Central Standard Time +UP10 (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time +UP105 (UTC +10:30) Lord Howe Island +UP11 (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu +UP115 (UTC +11:30) Norfolk Island +UP12 (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand +UP1275 (UTC +12:45) Chatham Islands Standard Time +UP1 (UTC +13:00) Phoenix Islands Time, Tonga +UP14 (UTC +14:00) Line Islands +=========== ===================================================================== \ No newline at end of file diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 3c91fd5dd..82db6a5b3 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -182,9 +182,9 @@ browser settings. Here is an example with attributes echo anchor_popup('news/local/123', 'Click Me!', $atts); .. note:: The above attributes are the function defaults so you only need to -set the ones that are different from what you need. If you want the -function to use all of its defaults simply pass an empty array in the -third parameter + set the ones that are different from what you need. If you want the + function to use all of its defaults simply pass an empty array in the + third parameter :: -- cgit v1.2.3-24-g4f1b From 0cd553566578dd4c23e1541fc837901bdfefa831 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 2 Jul 2012 15:20:42 +0200 Subject: Update Array Helper documentation default value of the "default value" parameter has changed in element() and elements() methods --- user_guide_src/source/helpers/array_helper.rst | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/array_helper.rst b/user_guide_src/source/helpers/array_helper.rst index 4308753bb..15b5e17c4 100644 --- a/user_guide_src/source/helpers/array_helper.rst +++ b/user_guide_src/source/helpers/array_helper.rst @@ -21,17 +21,17 @@ The following functions are available: element() ========= -.. php:method:: element($item, $array, $default = FALSE) +.. php:method:: element($item, $array, $default = NULL) :param string $item: Item to fetch from the array :param array $array: Input array :param boolean $default: What to return if the array isn't valid - :returns: FALSE on failure or the array item. + :returns: NULL on failure or the array item. 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 +returned. If a value does not exist it returns NULL, or whatever you've specified as the default value via the third parameter. Example :: @@ -43,31 +43,31 @@ specified as the default value via the third parameter. Example ); echo element('color', $array); // returns "red" - echo element('size', $array, NULL); // returns NULL + echo element('size', $array, 'foobar'); // returns "foobar" elements() ========== 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 +is set to NULL, or whatever you've specified as the default value via the third parameter. -.. php:method:: elements($items, $array, $default = FALSE) +.. php:method:: elements($items, $array, $default = NULL) :param string $item: Item to fetch from the array :param array $array: Input array :param boolean $default: What to return if the array isn't valid - :returns: FALSE on failure or the array item. + :returns: NULL on failure or the array item. Example :: $array = array( - 'color' => 'red',   - 'shape' => 'round',      - 'radius' => '10',      + 'color' => 'red', + 'shape' => 'round', + 'radius' => '10', 'diameter' => '20' ); @@ -78,25 +78,25 @@ The above will return the following array :: array( - 'color' => 'red',      - 'shape' => 'round',      - 'height' => FALSE + 'color' => 'red', + 'shape' => 'round', + 'height' => NULL ); You can set the third parameter to any default value you like :: - $my_shape = elements(array('color', 'shape', 'height'), $array, NULL); + $my_shape = elements(array('color', 'shape', 'height'), $array, 'foobar'); The above will return the following array :: array(      - 'color' => 'red',      - 'shape' => 'round',      - 'height' => NULL + 'color' => 'red', + 'shape' => 'round', + 'height' => 'foobar' ); This is useful when sending the $_POST array to one of your Models. -- cgit v1.2.3-24-g4f1b From ac57033236d5b62ba553b6bea87623f0dbeb2f49 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Jul 2012 13:04:10 +0300 Subject: Deprecate Date helper standard_date() --- user_guide_src/source/helpers/date_helper.rst | 29 +++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) (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 5adfb18d2..e332a913f 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -40,7 +40,7 @@ If a timezone is not provided, it will return time() based on "time_reference" s mdate() ======= -This function is identical to PHPs `date() `_ +This function is identical to PHP's `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. @@ -85,21 +85,28 @@ Example The first parameter must contain the format, the second parameter must contain the date as a Unix timestamp. +.. note:: This function is DEPRECATED. Use the native ``date()`` combined + with `DateTime's format constants `_ + instead: + + | + | echo date(DATE_RFC822, time()); + Supported formats: =============== ======================= ====================================== Constant Description Example =============== ======================= ====================================== -DATE_ATOM Atom 2005-08-15T16:13:03+0000 -DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC -DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 -DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC -DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC -DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC -DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC -DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 -DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC -DATE_W3C W3C 2005-08-14T16:13:03+0000 +DATE_ATOM Atom 2005-08-15T16:13:03+0000 +DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC +DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 +DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC +DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC +DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 +DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC +DATE_W3C W3C 2005-08-14T16:13:03+0000 =============== ======================= ====================================== local_to_gmt() -- cgit v1.2.3-24-g4f1b From ed5538d25e32569b96789307816109bcd517c050 Mon Sep 17 00:00:00 2001 From: aditya Date: Fri, 6 Jul 2012 06:47:51 +0530 Subject: t commit -s 'Added info about set_*() functions and form_validation class in the Form Helper documentation.' Signed-off-by: aditya --- user_guide_src/source/helpers/form_helper.rst | 4 ++++ 1 file changed, 4 insertions(+) (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 a110f3c14..fa7b3dbf9 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -543,3 +543,7 @@ This function is identical to the **set_checkbox()** function above. /> /> +.. note:: If you are using the Form Validation class, you must always specify a rule for your field, + even if empty, in order for the set_*() functions to work. This is because if a Form Validation object + is defined, the control for set_*() is handed over to a method of the class instead of the generic helper + function. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 00b3df41ba0acfd4c6b5d6838c239f857d6033cb Mon Sep 17 00:00:00 2001 From: InFog Date: Sun, 29 Jul 2012 13:42:50 -0300 Subject: Added documentation for mailto function. --- user_guide_src/source/helpers/url_helper.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 82db6a5b3..305454048 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -207,7 +207,12 @@ Creates a standard HTML email link. Usage example echo mailto('me@my-site.com', 'Click Here to Contact Me'); As with the anchor() tab above, you can set attributes using the third -parameter. +parameter: + +:: + + $attributes = array('title' => 'Mail me'); + echo mailto('me@my-site.com', 'Contact Me', $attributes); safe_mailto() ============= -- cgit v1.2.3-24-g4f1b From f3fddf6e0f4b0b0976c433c139326bdcd45d2da0 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 31 Aug 2012 10:10:16 +0800 Subject: fix issue #1719 and update ip address length on captcha helper Signed-off-by: Bo-Yi Wu --- user_guide_src/source/helpers/captcha_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/captcha_helper.rst b/user_guide_src/source/helpers/captcha_helper.rst index 48095a11d..90244739b 100644 --- a/user_guide_src/source/helpers/captcha_helper.rst +++ b/user_guide_src/source/helpers/captcha_helper.rst @@ -102,7 +102,7 @@ Here is a table prototype CREATE TABLE captcha (   captcha_id bigint(13) unsigned NOT NULL auto_increment,   captcha_time int(10) unsigned NOT NULL,   - ip_address varchar(16) default '0' NOT NULL,   + ip_address varchar(45) NOT NULL,   word varchar(20) NOT NULL,   PRIMARY KEY `captcha_id` (`captcha_id`),   KEY `word` (`word`) -- cgit v1.2.3-24-g4f1b From aab26a12a98ca99d956ef24e36c2262938631d73 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 11 Sep 2012 13:10:21 +0200 Subject: Better server test in redirect() of URL helper "Location" header bugs are specific to IIS; previous test was matching all HTTP servers under Windows. This test isn't perfect yet ($_SERVER['SERVER_SOFTWARE'], which corresponds to the "Server" header of HTTP response, might be missing), but there is no perfect test. "Refresh" method makes the window blank for quite a noticeable time, so let's not affect other servers because of IIS. --- user_guide_src/source/helpers/url_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/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 305454048..8de7817e4 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -303,7 +303,7 @@ link. The function will build the URL based on your config file values. The optional second parameter allows you to force a particular redirection method. The available methods are "location" or "refresh", with location -being faster but less reliable on Windows servers. The default is "auto", +being faster but less reliable on IIS servers. The default is "auto", which will attempt to intelligently choose the method based on the server environment. -- cgit v1.2.3-24-g4f1b From 530b946191c68886b6e156004742e785bfeef8cc Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 17 Sep 2012 14:18:07 +0200 Subject: redirect() documentation: add a note for IIS users --- user_guide_src/source/helpers/url_helper.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'user_guide_src/source/helpers') diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 8de7817e4..1987dfb72 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -325,3 +325,7 @@ engine purposes. The default Response Code is 302. The third parameter is .. note:: For very fine grained control over headers, you should use the `Output Library ` set_header() function. + +.. note:: To IIS users: if you hide the `Server` HTTP header, the "auto" + method won't detect IIS, in that case it is advised you explicitly + use the "refresh" method. -- cgit v1.2.3-24-g4f1b