Changeset 1082 in ExiteCMS
- Timestamp:
- 11/07/07 18:09:49 (4 years ago)
- Files:
-
- 1 added
- 8 edited
-
themes/PLi-Fusion/PLiTheme/php-files/themes/PLiTheme/templates/templates/_header.tpl (modified) (3 diffs)
-
themes/PLi-Fusion/PLiThemeCentered/php-files/themes/PLiThemeCentered/templates/templates/_header.tpl (modified) (3 diffs)
-
trunk/administration/upgrade/rev01082.php (added)
-
trunk/files/locales/English.main.global.php (modified) (1 diff)
-
trunk/files/locales/English.main.user_fields.php (modified) (1 diff)
-
trunk/includes/locale_functions.php (modified) (1 diff)
-
trunk/includes/templates/main.edit_profile.tpl (modified) (2 diffs)
-
trunk/includes/templates/main.register.tpl (modified) (2 diffs)
-
trunk/profile.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
themes/PLi-Fusion/PLiTheme/php-files/themes/PLiTheme/templates/templates/_header.tpl
r964 r1082 22 22 <head> 23 23 <title>{$settings.sitename}</title> 24 <meta http-equiv='Content-Type' content='text/html; charset={$ locale.charset}' />24 <meta http-equiv='Content-Type' content='text/html; charset={$settings.charset}' /> 25 25 <meta name='description' content='{$settings.description}' /> 26 26 <meta name='keywords' content='{$settings.keywords}' /> … … 39 39 editor_deselector:'textbox', 40 40 theme:'advanced', 41 language:' en',41 language:'{/literal}{$settings.locale_code}{literal}', 42 42 entities:'60,lt,62,gt', 43 43 document_base_url:'{/literal}{$settings.siteurl}{literal}', … … 67 67 mode:'textareas', 68 68 theme:'simple', 69 language:' en',69 language:'{/literal}{$settings.locale_code}{literal}', 70 70 convert_newlines_to_brs:'true', 71 71 force_br_newlines:'true', -
themes/PLi-Fusion/PLiThemeCentered/php-files/themes/PLiThemeCentered/templates/templates/_header.tpl
r964 r1082 22 22 <head> 23 23 <title>{$settings.sitename}</title> 24 <meta http-equiv='Content-Type' content='text/html; charset={$ locale.charset}' />24 <meta http-equiv='Content-Type' content='text/html; charset={$settings.charset}' /> 25 25 <meta name='description' content='{$settings.description}' /> 26 26 <meta name='keywords' content='{$settings.keywords}' /> … … 39 39 editor_deselector:'textbox', 40 40 theme:'advanced', 41 language:' en',41 language:'{/literal}{$settings.locale_code}{literal}', 42 42 entities:'60,lt,62,gt', 43 43 document_base_url:'{/literal}{$settings.siteurl}{literal}', … … 67 67 mode:'textareas', 68 68 theme:'simple', 69 language:' en',69 language:'{/literal}{$settings.locale_code}{literal}', 70 70 convert_newlines_to_brs:'true', 71 71 force_br_newlines:'true', -
trunk/files/locales/English.main.global.php
r1081 r1082 6 6 Web: http://www.php-fusion.co.uk 7 7 */ 8 9 // Full & Short Months10 $locale['months'] = " |January|February|March|April|May|June|July|August|September|October|November|December";11 $locale['shortmonths'] = " |Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Oct|Nov|Dec";12 8 13 9 // Standard User Levels -
trunk/files/locales/English.main.user_fields.php
r1080 r1082 22 22 $locale['u021'] = "AOL IM:"; 23 23 $locale['u022'] = "Max. filesize: %s / Max. size: %ux%u pixels"; 24 $locale['u023'] = "( Server timezone is<b>%s</b> )";24 $locale['u023'] = "( We are on <b>%s</b> )"; 25 25 $locale['u024'] = "Hide side-panels when reading:"; 26 26 $locale['u025'] = "Country:"; -
trunk/includes/locale_functions.php
r1081 r1082 58 58 if (!defined('LOCALESET')) define("LOCALESET", $settings['locale']."/"); 59 59 60 // define the website server locale (if not defined)61 if (!isset($settings['unix_locale'])) $settings['unix_locale'] = "en_US";62 63 // set system locales64 setlocale(LC_TIME, $settings['unix_locale']); // *nix Server (TODO: Windows may differ)65 66 // define the website characterset (if not defined)67 if (!isset($settings['charset'])) $settings['charset'] = "iso-8859-1";68 69 60 // define the website location (country) (if not defined) 70 61 if (!isset($settings['country'])) $settings['country'] = "??"; 71 62 72 // get the locale code, we need this in several places63 // get locales information, we need this in several places 73 64 if (dbtable_exists($db_prefix."locale")) { 74 $result = dbquery("SELECT locale_codeFROM ".$db_prefix."locale WHERE locale_name = '".$settings['locale']."'");75 if ( $dbrows($result)) {65 $result = dbquery("SELECT * FROM ".$db_prefix."locale WHERE locale_name = '".$settings['locale']."'"); 66 if (dbrows($result)) { 76 67 $data = dbarray($result); 77 68 $settings['locale_code'] = $data['locale_code']; 69 $settings['charset'] = $data['locale_charset']; 70 $settings['locales'] = $data['locale_locale']; 78 71 } 79 72 } 73 // if we couldn't find it, use some default values 80 74 if (!isset($settings['locale_code'])) $settings['locale_code'] = "en"; 75 if (!isset($settings['charset'])) $settings['charset'] = "iso-8859-1"; 76 if (!isset($settings['locales'])) $settings['locales'] = "en_US|en_GB|english|eng"; 81 77 82 // Date info (TODO: need to find a better solution for this) 83 if (!isset($settings['dateformat'])) $settings['dateformat'] = "mm-dd-yyyy"; 84 if (!isset($settings['datesequence'])) $settings['datesequence'] = array("M", "D", "Y"); 78 // set the locale for strfime() 79 setlocale(LC_TIME, explode("|", $settings['locales'])); 85 80 86 81 // Initialise the $locale array -
trunk/includes/templates/main.edit_profile.tpl
r1081 r1082 114 114 <tr> 115 115 <td class='tbl'> 116 {$locale.u010} ( {$settings.dateformat} )116 {$locale.u010} 117 117 </td> 118 118 <td class='tbl'> 119 {foreach from=$settings.datesequence item=field} 120 {if $field == "D"} 119 <select name='user_year' class='textbox'> 120 <option> </option> 121 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"} 122 <option{if $smarty.section.y.index == $user_year} selected="selected"{/if}>{$smarty.section.y.index}</option> 123 {/section} 124 </select> 125 <select name='user_month' class='textbox'> 126 <option> </option> 127 {section name=m start=1 loop=13} 128 <option{if $smarty.section.m.index == $user_month} selected="selected"{/if}>{$smarty.section.m.index}</option> 129 {/section} 130 </select> 121 131 <select name='user_day' class='textbox'> 122 132 <option> </option> … … 125 135 {/section} 126 136 </select> 127 {elseif $field == "M"} 128 <select name='user_month' class='textbox'> 129 <option> </option> 130 {section name=m start=1 loop=13} 131 <option{if $smarty.section.m.index == $user_month} selected="selected"{/if}>{$smarty.section.m.index}</option> 132 {/section} 133 </select> 134 {elseif $field == "Y"} 135 <select name='user_year' class='textbox'> 136 <option> </option> 137 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"} 138 <option{if $smarty.section.y.index == $user_year} selected="selected"{/if}>{$smarty.section.y.index}</option> 139 {/section} 140 </select> 141 {/if} 142 {/foreach} 143 <span class='small2'>({$locale.dateformat})</span> 137 <span class='small2'>(yyyy/mm/dd)</span> 144 138 </td> 145 139 </tr> -
trunk/includes/templates/main.register.tpl
r1081 r1082 122 122 <td class='tbl'> 123 123 {$locale.u010} 124 <span class='small2'>( {$settings.dateformat})</span>124 <span class='small2'>( yyyy/mm/dd )</span> 125 125 </td> 126 126 <td class='tbl'>} 127 {foreach from=$settings.datesequence item=field} 128 {if $field == "D"} 127 <select name='user_year' class='textbox'> 128 <option> </option> 129 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"} 130 <option{if $smarty.section.y.index == $user_year} selected{/if}>{$smarty.section.y.index}</option> 131 {/section} 132 </select> 133 <select name='user_month' class='textbox'> 134 <option> </option> 135 {section name=m start=1 loop=13} 136 <option{if $smarty.section.m.index == $user_month} selected{/if}>{$smarty.section.m.index}</option> 137 {/section} 138 </select> 129 139 <select name='user_day' class='textbox'> 130 140 <option> </option> … … 133 143 {/section} 134 144 </select> 135 {elseif $field == "M"}136 <select name='user_month' class='textbox'>137 <option> </option>138 {section name=m start=1 loop=13}139 <option{if $smarty.section.m.index == $user_month} selected{/if}>{$smarty.section.m.index}</option>140 {/section}141 </select>142 {elseif $field == "Y"}143 <select name='user_year' class='textbox'>144 <option> </option>145 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"}146 <option{if $smarty.section.y.index == $user_year} selected{/if}>{$smarty.section.y.index}</option>147 {/section}148 </select>149 {/if}150 {/foreach}151 145 </td> 152 146 </tr> -
trunk/profile.php
r1071 r1082 67 67 // user level 68 68 $data['user_level'] = getuserlevel($data['user_level']); 69 // user's birthday (using the current locale for the month name) 69 70 if ($data['user_birthdate'] != "0000-00-00") { 70 $months = explode("|", $locale['months']);71 $user_birthdate = explode("-", $data['user_birthdate']);72 $data['user_birthdate'] = $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0'];71 $birthdate = explode("-", $data['user_birthdate']); 72 $data['user_birthdate'] = strftime(nl_langinfo(D_FMT), mktime(1,0,0,$birthdate[1],$birthdate[2],$birthdate[0])) 73 } 73 74 } else { 74 75 $data['user_birthdate'] = $locale['u048'];
Note: See TracChangeset
for help on using the changeset viewer.
