Ignore:
Timestamp:
12/03/07 21:40:54 (4 years ago)
Author:
hverton
Message:

added a locale type selection per module
fixed typo from 404handler.php
updated English language pack
fixed not being able to move a post to a thread in the same forum.post.move.tpl
getusergroups() now returns the array ordered by name
upgraded tiny_mce to version 2.1.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/tools/language_pack_English.php

    r1145 r1158  
    1111|                                                    | 
    1212| for their efforts in making this translation file. | 
    13 | They can be reached on http://exitecms.exite.eu    | 
     13| They can be contacted on http://exitecms.exite.eu  | 
    1414+----------------------------------------------------+ 
    1515| Released under the terms & conditions of v2 of the | 
     
    1717| the included gpl.txt file or visit http://gnu.org  | 
    1818+----------------------------------------------------*/ 
    19 if (!defined('CMS_SETUP')) require_once dirname(__FILE__)."/../../includes/core_functions.php"; 
    20  
    21 // check for the proper admin access rights 
    22 if (!CMS_CLI && (!checkrights("T") || !defined("iAUTH") || $aid != iAUTH)) fallback(ADMIN."index.php"); 
    23  
    24 // load the locale for this module 
    25 if (!CMS_CLI) locale_load("admin.main"); 
    26  
    27 /*---------------------------------------------------+ 
    28 | defines                                            | 
    29 +----------------------------------------------------*/ 
    30 define('LP_LOCALE', "en"); 
    31 define('LP_LANGUAGE', "English"); 
    32 define('LP_LOCALES', "en_US|en_GB|english|eng"); 
    33 define('LP_CHARSET', "iso-8859-1"); 
    34 define('LP_VERSION', "7.00"); 
    35 define('LP_DATE', "1195160770"); 
    36  
    37 /*---------------------------------------------------+ 
    38 | local functions                                    | 
    39 +----------------------------------------------------*/ 
    40 function load_localestrings($localestrings, $locales_name) { 
    41     global $step, $db_prefix; 
    42  
    43     // if this is an upgrade, remove the old locale strings first 
    44     if ($step == "upgrade") { 
    45         $result = dbquery("DELETE FROM ".$db_prefix."locales WHERE locales_code = '".LP_LOCALE."' AND locales_name = '$locales_name'"); 
    46     } 
    47  
    48     // proces the imported locale strings 
    49     foreach ($localestrings as $key => $value) { 
    50         if (is_array($value)) { 
    51             $value = "#ARRAY#\n".serialize($value); 
    52         } 
    53         $result = dbquery("INSERT INTO ".$db_prefix."locales (locales_code, locales_name, locales_key, locales_value, locales_datestamp) VALUES ('".LP_LOCALE."', '$locales_name', '".mysql_escape_string($key)."', '".mysql_escape_string($value)."', '".time()."')"); 
    54     } 
    55     return true; 
    56 } 
    57  
    58 function install_language_pack() { 
    59     global $step, $db_prefix; 
    60  
    61     if ($step == "install") { 
    62         $result = dbquery("INSERT INTO ".$db_prefix."locale (locale_code, locale_name, locale_locale, locale_charset, locale_active) VALUES ('en', 'English', 'en_US|en_GB|english|eng', 'iso-8859-1', 1)"); 
    63     } 
     19function install_language_pack($step) { 
     20 
     21    $localestrings = array(); 
     22    $localestrings['404page'] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\" align=\"center\"> <tbody><tr><td width=\"10\"> </td><td><div align=\"center\"><font size=\"6\"><span class=\"shoutboxname\"><br />404 - Page Not Found</span><br /></font></div><br /><br /><hr width=\"90%\" size=\"2\" /><br /><br /><div align=\"center\">We are sorry, but the document you requested cannot be found on this server.<br /></div><br /><div align=\"center\">Most likely, this is a result of yet another reorganization of this Website to reflect our constant evolution and ongoing development, coupled with a transition from an old server with lots of legacy files to a shiny new server.<br /></div><br /><div align=\"center\">But then again, it might just be a completely random event and the result of too many cosmic rays. Who knows?<br /></div><br /><br /><hr width=\"90%\" size=\"2\" /><br /><br /><div align=\"center\">Your best bet for finding what you seek is to start at our home page (<a href=\"/\">click here to jump to the home page</a>), check out our menu, or use the search menu option.<br /></div><br /><div align=\"center\">If that doesn't work, and you think it's a document that should be here, please send a PM to the webmaster and let us know about it (registered users only).</div></td><td width=\"10\"> </td></tr></tbody></table><br />"; 
     23    load_localestrings($localestrings, LP_LOCALE, "404page", $step); 
    6424 
    6525    $localestrings = array(); 
     
    8343    $localestrings['426'] = "UnCheck all"; 
    8444    $localestrings['427'] = "Modules & Plugins"; 
    85     load_localestrings($localestrings, "admin.admins"); 
     45    load_localestrings($localestrings, LP_LOCALE, "admin.admins", $step); 
    8646 
    8747    $localestrings = array(); 
     
    10464    $localestrings['465'] = "The blacklist is currently empty."; 
    10565    $localestrings['470'] = "Blacklisted because of an offensive, rude or inappropriate comments posting"; 
    106     load_localestrings($localestrings, "admin.blacklist"); 
     66    load_localestrings($localestrings, LP_LOCALE, "admin.blacklist", $step); 
    10767 
    10868    $localestrings = array(); 
     
    11676    $localestrings['414'] = "Delete Comment?"; 
    11777    $localestrings['415'] = "There are no comments for this item."; 
    118     load_localestrings($localestrings, "admin.comments"); 
     78    load_localestrings($localestrings, LP_LOCALE, "admin.comments", $step); 
    11979 
    12080    $localestrings = array(); 
     
    142102    $localestrings['436'] = "Preview Page"; 
    143103    $localestrings['437'] = "Save Page"; 
    144     load_localestrings($localestrings, "admin.custom_pages"); 
     104    load_localestrings($localestrings, LP_LOCALE, "admin.custom_pages", $step); 
    145105 
    146106    $localestrings = array(); 
     
    193153    $localestrings['480'] = "Restore Backup"; 
    194154    $localestrings['481'] = "Filename:"; 
    195     load_localestrings($localestrings, "admin.db-backup"); 
     155    load_localestrings($localestrings, LP_LOCALE, "admin.db-backup", $step); 
    196156 
    197157    $localestrings = array(); 
     
    255215    $localestrings['511'] = " to go to Download Categories"; 
    256216    $localestrings['512'] = "Sub Category of"; 
    257     $localestrings['520'] = "Download Bars Panel Content"; 
    258     $localestrings['521'] = "Bar Position"; 
    259     $localestrings['522'] = "Save Bar Content"; 
    260     $localestrings['523'] = "Download Bars Panel Content succesfully saved"; 
    261     $localestrings['524'] = "Download Bars Title"; 
    262     load_localestrings($localestrings, "admin.downloads"); 
     217    $localestrings['513'] = " for the locale "; 
     218    $localestrings['514'] = "Category Locale:"; 
     219    $localestrings['515'] = ""; 
     220    load_localestrings($localestrings, LP_LOCALE, "admin.downloads", $step); 
    263221 
    264222    $localestrings = array(); 
     
    288246    $localestrings['486'] = "No FAQ Categories defined."; 
    289247    $localestrings['487'] = "Delete FAQ?"; 
    290     load_localestrings($localestrings, "admin.faq"); 
     248    load_localestrings($localestrings, LP_LOCALE, "admin.faq", $step); 
    291249 
    292250    $localestrings = array(); 
     
    350308    $localestrings['492'] = "Move down"; 
    351309    $localestrings['493'] = "Refresh Forum Ordering"; 
    352     load_localestrings($localestrings, "admin.forums"); 
     310    load_localestrings($localestrings, LP_LOCALE, "admin.forums", $step); 
    353311 
    354312    $localestrings = array(); 
     
    435393    $localestrings['FPM_301'] = "Public - show who voted for which item"; 
    436394    $localestrings['FPM_400'] = "For the forums marked <font color='green'>green</font>, special settings have been defined. For forums marked <font color='red'>red</font>, global settings are used"; 
    437     load_localestrings($localestrings, "admin.forum_polls"); 
     395    load_localestrings($localestrings, LP_LOCALE, "admin.forum_polls", $step); 
    438396 
    439397    $localestrings = array(); 
     
    459417    $localestrings['464'] = "Update image list for TinyMCE editor"; 
    460418    $localestrings['465'] = "Cancel"; 
    461     load_localestrings($localestrings, "admin.image_uploads"); 
     419    load_localestrings($localestrings, LP_LOCALE, "admin.image_uploads", $step); 
    462420 
    463421    $localestrings = array(); 
     
    522480    $localestrings['308'] = "While processing the language pack for %s (%s), an error occured. The error is:"; 
    523481    $localestrings['309'] = "You can not install this language pack. This pack is for ExiteCMS version"; 
    524     load_localestrings($localestrings, "admin.main"); 
     482    load_localestrings($localestrings, LP_LOCALE, "admin.main", $step); 
    525483 
    526484    $localestrings = array(); 
     
    580538    $localestrings['478'] = "Return to Members Admin"; 
    581539    $localestrings['479'] = "Return to Admin Index"; 
    582     load_localestrings($localestrings, "admin.members"); 
     540    load_localestrings($localestrings, LP_LOCALE, "admin.members", $step); 
    583541 
    584542    $localestrings = array(); 
     
    613571    $localestrings['mod004'] = "This module can not be installed. Required information is missing from the modules installer.<br />"; 
    614572    $localestrings['mod005'] = "This module does not function beyond ExiteCMS revision level %s.<br />"; 
    615     load_localestrings($localestrings, "admin.modules"); 
     573    load_localestrings($localestrings, LP_LOCALE, "admin.modules", $step); 
    616574 
    617575    $localestrings = array(); 
     
    715673    $localestrings['553'] = "Select a language:"; 
    716674    $localestrings['554'] = "for the locale"; 
    717     load_localestrings($localestrings, "admin.news-articles"); 
     675    load_localestrings($localestrings, LP_LOCALE, "admin.news-articles", $step); 
    718676 
    719677    $localestrings = array(); 
     
    748706    $localestrings['444'] = "Down"; 
    749707    $localestrings['445'] = "Move to the upper body section"; 
    750     $localestrings['446'] = "Move to lower body section"; 
     708    $localestrings['446'] = "Move to the lower body section"; 
    751709    $localestrings['447'] = "No"; 
    752710    $localestrings['448'] = "Yes"; 
     
    785743    $localestrings['488'] = "Select a language:"; 
    786744    $localestrings['489'] = "for the locale"; 
    787     load_localestrings($localestrings, "admin.panels"); 
     745    $localestrings['490'] = "Header Panels"; 
     746    $localestrings['491'] = "Footer Panels"; 
     747    $localestrings['492'] = "Header"; 
     748    $localestrings['493'] = "Footer"; 
     749    $localestrings['494'] = "Move to the header section"; 
     750    $localestrings['495'] = "Move to the footer section"; 
     751    load_localestrings($localestrings, LP_LOCALE, "admin.panels", $step); 
    788752 
    789753    $localestrings = array(); 
     
    799763    $localestrings['425'] = "No"; 
    800764    $localestrings['426'] = "RegEx"; 
     765    $localestrings['427'] = "Retain URL parameters"; 
    801766    $localestrings['430'] = "Add this redirect URL"; 
    802767    $localestrings['431'] = "Save this redirect URL"; 
     
    804769    $localestrings['433'] = "Delete"; 
    805770    $localestrings['480'] = "No Redirect URLs present"; 
    806     $localestrings['481'] = "Note: the URL's you type here are relative to the root of the website, and should start with a '/'.<br />\n        Make sure you're not defining a redirect for any of the existing website functions (like /index.php)!"; 
     771    $localestrings['481'] = "Note: the URL's you type here are relative to the root of the website, and should start with a '/'.<br />\nYou can not redirect any of the existing website functions (like /index.php)!"; 
    807772    $localestrings['482'] = "New redirect URL saved successfully"; 
    808773    $localestrings['483'] = "Redirect URL saved successfully"; 
     
    814779    $localestrings['489'] = "Requested url_id is missing. Maybe it was deleted by someone else?"; 
    815780    $localestrings['490'] = "If checked, the first field is used to match, the second to convert the URL"; 
    816     load_localestrings($localestrings, "admin.redirects"); 
     781    $localestrings['491'] = "If checked, any parameters given will be appended to the new URL"; 
     782    $localestrings['492'] = "If checked, the site will redirect to the exact URL given"; 
     783    load_localestrings($localestrings, LP_LOCALE, "admin.redirects", $step); 
    817784 
    818785    $localestrings = array(); 
     
    884851    $localestrings['556'] = "Text"; 
    885852    $localestrings['557'] = "New members activated by admin?"; 
    886     $localestrings['558'] = "Site localisation method:"; 
    887     $localestrings['559'] = "No localisation (fixed layout)"; 
    888     $localestrings['560'] = "Single tree content (symmetric layout)"; 
    889     $localestrings['561'] = "Multiple tree content (a-symmetic layout)"; 
     853    $localestrings['558'] = "Localisation methods"; 
     854    $localestrings['559'] = "No localisation, all text is hardcoded"; 
     855    $localestrings['560'] = "Assign multiple languages to a single item"; 
     856    $localestrings['561'] = "Assign multiple items to a single language"; 
     857    $localestrings['570'] = "Panels:"; 
     858    $localestrings['571'] = "Menu sytem:"; 
     859    $localestrings['572'] = "Articles:"; 
     860    $localestrings['573'] = "News:"; 
     861    $localestrings['574'] = "Downloads:"; 
    890862    $localestrings['600'] = "Image"; 
    891863    $localestrings['601'] = "Thumb size:"; 
     
    948920    $localestrings['803'] = "Attachments deleted: "; 
    949921    $localestrings['850'] = "Languages"; 
    950     load_localestrings($localestrings, "admin.settings"); 
     922    load_localestrings($localestrings, LP_LOCALE, "admin.settings", $step); 
    951923 
    952924    $localestrings = array(); 
     
    988960    $localestrings['451'] = "Select a language:"; 
    989961    $localestrings['452'] = "for the locale"; 
    990     load_localestrings($localestrings, "admin.sitelinks"); 
     962    load_localestrings($localestrings, LP_LOCALE, "admin.sitelinks", $step); 
    991963 
    992964    $localestrings = array(); 
     
    1008980    $localestrings['422'] = "General error"; 
    1009981    $localestrings['430'] = "For more detailed information on these upgrades, check the changelogs on <a href='http://exitecms.exite.eu' alt='' target='_blank'>http://exitecms.exite.eu</a>"; 
    1010     load_localestrings($localestrings, "admin.upgrade"); 
     982    load_localestrings($localestrings, LP_LOCALE, "admin.upgrade", $step); 
    1011983 
    1012984    $localestrings = array(); 
     
    10631035    $localestrings['451'] = "Visible in user profiles:"; 
    10641036    $localestrings['452'] = "Visible in Forum posts:"; 
    1065     load_localestrings($localestrings, "admin.user_groups"); 
     1037    load_localestrings($localestrings, LP_LOCALE, "admin.user_groups", $step); 
    10661038 
    10671039    $localestrings = array(); 
     
    10891061    $localestrings['utf-7'] = "Unicode (UTF-7)"; 
    10901062    $localestrings['utf-8'] = "Unicode (UTF-8)"; 
    1091     load_localestrings($localestrings, "charsets"); 
     1063    load_localestrings($localestrings, LP_LOCALE, "charsets", $step); 
    10921064 
    10931065    $localestrings = array(); 
     
    11091081    $localestrings['white'] = "White"; 
    11101082    $localestrings['yellow'] = "Yellow"; 
    1111     load_localestrings($localestrings, "colors"); 
     1083    load_localestrings($localestrings, LP_LOCALE, "colors", $step); 
    11121084 
    11131085    $localestrings = array(); 
     
    11491121    $localestrings['ca'] = "Canada"; 
    11501122    $localestrings['cc'] = "Cocos (Keeling) Islands"; 
    1151     $localestrings['cd'] = "The Democratic Republic Of The Congo"; 
     1123    $localestrings['cd'] = "Congo, The Democratic Republic Of The"; 
    11521124    $localestrings['cf'] = "Central African Republic"; 
    11531125    $localestrings['cg'] = "Congo"; 
     
    12711243    $localestrings['ng'] = "Nigeria"; 
    12721244    $localestrings['ni'] = "Nicaragua"; 
    1273     $localestrings['nl'] = "The Netherlands"; 
     1245    $localestrings['nl'] = "Netherlands, The"; 
    12741246    $localestrings['no'] = "Norway"; 
    12751247    $localestrings['np'] = "Nepal"; 
     
    13471319    $localestrings['zm'] = "Zambia"; 
    13481320    $localestrings['zw'] = "Zimbabwe"; 
    1349     load_localestrings($localestrings, "countrycode"); 
     1321    load_localestrings($localestrings, LP_LOCALE, "countrycode", $step); 
    13501322 
    13511323    $localestrings = array(); 
     
    16051577    $localestrings['Zambia'] = "zm"; 
    16061578    $localestrings['Zimbabwe'] = "zw"; 
    1607     load_localestrings($localestrings, "countryname"); 
     1579    load_localestrings($localestrings, LP_LOCALE, "countryname", $step); 
    16081580 
    16091581    $localestrings = array(); 
     
    18411813    $localestrings['zm'] = "Kwacha"; 
    18421814    $localestrings['zw'] = "Zimbabwian Dollars"; 
    1843     load_localestrings($localestrings, "currency"); 
     1815    load_localestrings($localestrings, LP_LOCALE, "currency", $step); 
    18441816 
    18451817    $localestrings = array(); 
     
    20772049    $localestrings['zm'] = "ZMK"; 
    20782050    $localestrings['zw'] = "ZWD"; 
    2079     load_localestrings($localestrings, "currencycode"); 
     2051    load_localestrings($localestrings, LP_LOCALE, "currencycode", $step); 
    20802052 
    20812053    $localestrings = array(); 
     
    21632135    $localestrings['580'] = "skype"; 
    21642136    $localestrings['581'] = "Top"; 
    2165     load_localestrings($localestrings, "forum.main"); 
     2137    load_localestrings($localestrings, LP_LOCALE, "forum.main", $step); 
    21662138 
    21672139    $localestrings = array(); 
     
    21962168    $localestrings['464'] = "No matches found, please try again."; 
    21972169    $localestrings['465'] = "Please specify at least one word to search for."; 
    2198     load_localestrings($localestrings, "forum.options"); 
     2170    load_localestrings($localestrings, LP_LOCALE, "forum.options", $step); 
    21992171 
    22002172    $localestrings = array(); 
     
    23042276    $localestrings['550'] = "Thread Reply Notification - {THREAD_SUBJECT}"; 
    23052277    $localestrings['551'] = "Hello {USERNAME},\n\nA reply has been posted in the forum thread '{THREAD_SUBJECT}' which you are tracking at {SITE_NAME}. You can use the following link to view the reply:\n\n{THREAD_URL}\n\nIf you no longer wish to watch this thread you can click the 'Tracking Off' button located at the bottom of the thread.\n\nRegards,\n{SITE_WEBMASTER}."; 
    2306     load_localestrings($localestrings, "forum.post"); 
     2278    load_localestrings($localestrings, LP_LOCALE, "forum.post", $step); 
    23072279 
    23082280    $localestrings = array(); 
     
    23112283    $localestrings['402'] = "<b>New this week</b>"; 
    23122284    $localestrings['403'] = "No Articles have been added to this Category"; 
    2313     load_localestrings($localestrings, "main.articles"); 
     2285    load_localestrings($localestrings, LP_LOCALE, "main.articles", $step); 
    23142286 
    23152287    $localestrings = array(); 
     
    23232295    $localestrings['407'] = "No Article Categories defined"; 
    23242296    $localestrings['408'] = "of"; 
    2325     load_localestrings($localestrings, "main.article_cats"); 
     2297    load_localestrings($localestrings, LP_LOCALE, "main.article_cats", $step); 
    23262298 
    23272299    $localestrings = array(); 
     
    23352307    $localestrings['c107'] = " Disable smileys in this comment"; 
    23362308    $localestrings['c108'] = "Toggle smileys"; 
    2337     load_localestrings($localestrings, "main.comments"); 
     2309    load_localestrings($localestrings, LP_LOCALE, "main.comments", $step); 
    23382310 
    23392311    $localestrings = array(); 
     
    23542326    $localestrings['442'] = "Your message was not sent for the following reason(s):"; 
    23552327    $localestrings['443'] = "Please try again."; 
    2356     load_localestrings($localestrings, "main.contact"); 
     2328    load_localestrings($localestrings, LP_LOCALE, "main.contact", $step); 
    23572329 
    23582330    $localestrings = array(); 
     
    23602332    $localestrings['401'] = "Internal Error"; 
    23612333    $localestrings['402'] = "Unable to retrieve page content."; 
    2362     load_localestrings($localestrings, "main.custom_pages"); 
     2334    load_localestrings($localestrings, LP_LOCALE, "main.custom_pages", $step); 
    23632335 
    23642336    $localestrings = array(); 
     
    23782350    $localestrings['430'] = "No Download Categories defined"; 
    23792351    $localestrings['431'] = "No Downloads have been added to this Category"; 
    2380     load_localestrings($localestrings, "main.downloads"); 
     2352    load_localestrings($localestrings, LP_LOCALE, "main.downloads", $step); 
    23812353 
    23822354    $localestrings = array(); 
     
    23872359    $localestrings['420'] = "Question:"; 
    23882360    $localestrings['421'] = "Answer:"; 
    2389     load_localestrings($localestrings, "main.faq"); 
     2361    load_localestrings($localestrings, LP_LOCALE, "main.faq", $step); 
    23902362 
    23912363    $localestrings = array(); 
    23922364    $localestrings['400'] = "Forum:"; 
    2393     load_localestrings($localestrings, "main.feeds"); 
     2365    load_localestrings($localestrings, LP_LOCALE, "main.feeds", $step); 
    23942366 
    23952367    $localestrings = array(); 
     
    25212493    $localestrings['usera'] = "Anonymous"; 
    25222494    $localestrings['userf1'] = "Moderator"; 
    2523     load_localestrings($localestrings, "main.global"); 
     2495    load_localestrings($localestrings, LP_LOCALE, "main.global", $step); 
    25242496 
    25252497    $localestrings = array(); 
     
    25362508    $localestrings['410'] = "Hello [USER_NAME],\n\nYou have or someone has requested a new password to access your [SITENAME] account.\n\nTo change your password please click the following link:\n\n[NEW_PASS_LINK]\n\nRegards,\n[SITEUSERNAME]"; 
    25372509    $localestrings['411'] = "Hello [USER_NAME],\n\nYour new password to access your [SITENAME] account is:\n\n[NEW_PASS]\n\nRegards,\n[SITEUSERNAME]"; 
    2538     load_localestrings($localestrings, "main.lostpassword"); 
     2510    load_localestrings($localestrings, LP_LOCALE, "main.lostpassword", $step); 
    25392511 
    25402512    $localestrings = array(); 
     
    25782550    $localestrings['491'] = "We have detected that your email address is no longer valid.<br />Your accounts will be deactivated in %s days."; 
    25792551    $localestrings['499'] = "<br /><br />Please update your profile now."; 
    2580     load_localestrings($localestrings, "main.members-profile"); 
     2552    load_localestrings($localestrings, LP_LOCALE, "main.members-profile", $step); 
    25812553 
    25822554    $localestrings = array(); 
     
    25892561    $localestrings['406'] = "Show All Categories"; 
    25902562    $localestrings['407'] = "No News Categories defined"; 
    2591     load_localestrings($localestrings, "main.news_cats"); 
     2563    load_localestrings($localestrings, LP_LOCALE, "main.news_cats", $step); 
    25922564 
    25932565    $localestrings = array(); 
     
    27352707    $localestrings['639'] = "Headers only"; 
    27362708    $localestrings['640'] = "Message details"; 
    2737     load_localestrings($localestrings, "main.pm"); 
     2709    load_localestrings($localestrings, LP_LOCALE, "main.pm", $step); 
    27382710 
    27392711    $localestrings = array(); 
     
    27412713    $localestrings['401'] = " on "; 
    27422714    $localestrings['402'] = "Extended News"; 
    2743     load_localestrings($localestrings, "main.print"); 
     2715    load_localestrings($localestrings, LP_LOCALE, "main.print", $step); 
    27442716 
    27452717    $localestrings = array(); 
     
    27612733    $localestrings['r123'] = "Average"; 
    27622734    $localestrings['r124'] = "Poor"; 
    2763     load_localestrings($localestrings, "main.ratings"); 
     2735    load_localestrings($localestrings, LP_LOCALE, "main.ratings", $step); 
    27642736 
    27652737    $localestrings = array(); 
     
    28012773    $localestrings['551'] = "Please specify a password."; 
    28022774    $localestrings['552'] = "Please specify an email address."; 
    2803     load_localestrings($localestrings, "main.register"); 
     2775    load_localestrings($localestrings, LP_LOCALE, "main.register", $step); 
    28042776 
    28052777    $localestrings = array(); 
     
    28742846    $localestrings['480']['7']['0'] = "\" \""; 
    28752847    $localestrings['480']['7']['1'] = "Double quotes at the beginning and end of a phrase, matches only rows that contain the complete phrase, as it was typed."; 
    2876     load_localestrings($localestrings, "main.search"); 
     2848    load_localestrings($localestrings, LP_LOCALE, "main.search", $step); 
    28772849 
    28782850    $localestrings = array(); 
     
    29852957    $localestrings['580'] = "Setup is complete, ExiteCMS is now ready for use.<br>\n<a href='index.php'>Click here</a> to go to your ExiteCMS powered site.<br>\n<b>Note:</b> you should delete setup.php from your server<br>\nand chmod your config.php back to 644 for security purposes.<br><br>\nThank you for choosing ExiteCMS."; 
    29862958    $localestrings['title'] = "ExiteCMS Setup"; 
    2987     load_localestrings($localestrings, "main.setup"); 
     2959    load_localestrings($localestrings, LP_LOCALE, "main.setup", $step); 
    29882960 
    29892961    $localestrings = array(); 
     
    30463018    $localestrings['u061'] = "View all posts of this member"; 
    30473019    $localestrings['u901'] = "Full Name"; 
    3048     load_localestrings($localestrings, "main.user_fields"); 
     3020    load_localestrings($localestrings, LP_LOCALE, "main.user_fields", $step); 
    30493021    return ""; 
     3022} 
     3023 
     3024/*---------------------------------------------------+ 
     3025| start of the language pack load code               | 
     3026+----------------------------------------------------*/ 
     3027if (!defined('CMS_SETUP')) require_once dirname(__FILE__)."/../../includes/core_functions.php"; 
     3028 
     3029define('LP_LOCALE', "en"); 
     3030define('LP_LANGUAGE', "English"); 
     3031define('LP_LOCALES', "en_US|en_GB|english|eng"); 
     3032define('LP_CHARSET', "iso-8859-1"); 
     3033define('LP_VERSION', "7.00"); 
     3034define('LP_DATE', "1196416846"); 
     3035 
     3036/*---------------------------------------------------+ 
     3037| local functions                                    | 
     3038+----------------------------------------------------*/ 
     3039if (!function_exists('load_localestrings')) { 
     3040    function load_localestrings($localestrings, $locales_code, $locales_name, $step="") { 
     3041        global $db_prefix; 
     3042     
     3043        // if this is an upgrade, remove the old locale strings first 
     3044        if ($step == "upgrade") { 
     3045            $result = dbquery("DELETE FROM ".$db_prefix."locales WHERE locales_code = '$locales_code' AND locales_name = '$locales_name'"); 
     3046        } 
     3047     
     3048        // proces the imported locale strings 
     3049        foreach ($localestrings as $key => $value) { 
     3050            if (is_array($value)) { 
     3051                $value = "#ARRAY#\n".serialize($value); 
     3052            } 
     3053            $result = dbquery("INSERT INTO ".$db_prefix."locales (locales_code, locales_name, locales_key, locales_value, locales_datestamp) VALUES ('$locales_code', '$locales_name', '".mysql_escape_string($key)."', '".mysql_escape_string($value)."', '".time()."')"); 
     3054        } 
     3055        return true; 
     3056    } 
    30503057} 
    30513058 
     
    30543061+----------------------------------------------------*/ 
    30553062 
     3063// when not in CLI mode, check the users rights, and load the locale strings 
     3064if (!CMS_CLI) { 
     3065    // check for the proper admin access rights 
     3066    if (!checkrights("T") || !defined("iAUTH") || $aid != iAUTH) { 
     3067        fallback(ADMIN."index.php"); 
     3068    } 
     3069    // load the locale for this module 
     3070    locale_load("admin.main"); 
     3071} 
    30563072 
    30573073if (defined('CMS_SETUP') && !defined('CMS_SETUP_LOAD')) { 
     
    30973113// install the language pack 
    30983114if ($step == "install" || $step == "upgrade") { 
    3099     if ($error = install_language_pack()) { 
     3115    if ($step == "install") { 
     3116        $result = dbquery("INSERT INTO ".$db_prefix."locale (locale_code, locale_name, locale_locale, locale_charset, locale_active) VALUES (LP_LOCALE, 'LP_LANGUAGE, LP_LOCALES, LP_CHARSET, 1)"); 
     3117    } 
     3118    if ($error = install_language_pack($step)) { 
    31003119        if (!CMS_CLI) $variables['message'] .= sprintf($locale['308'],LP_LOCALE, LP_LANGUAGE)."<br /><br />".$error; 
    31013120    } else { 
Note: See TracChangeset for help on using the changeset viewer.