From f48ca466e973eeb2965a43963f0af7978c4b225a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Fri, 1 May 2015 12:46:46 +0200 Subject: [PATCH 1/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_admin/banlist.php | 2 +- e107_admin/cron.php | 4 +- e107_admin/frontpage.php | 8 +-- e107_admin/image.php | 60 ++++++++-------- e107_admin/language.php | 70 +++++++++---------- e107_languages/English/admin/lan_banlist.php | 1 + e107_languages/English/admin/lan_cron.php | 5 ++ .../English/admin/lan_frontpage.php | 5 ++ e107_languages/English/admin/lan_image.php | 46 ++++++++++++ e107_languages/English/admin/lan_language.php | 30 ++++++++ 10 files changed, 157 insertions(+), 74 deletions(-) diff --git a/e107_admin/banlist.php b/e107_admin/banlist.php index 4e6c3f00a..b870716dd 100644 --- a/e107_admin/banlist.php +++ b/e107_admin/banlist.php @@ -411,7 +411,7 @@ class banlist_form_ui extends e_admin_form_ui } elseif($this->getController()->getAction() == 'create') { - return $this->hidden('banlist_bantype',eIPHandler::BAN_TYPE_MANUAL)."Blacklist entry"; //TODO LAN + return $this->hidden('banlist_bantype',eIPHandler::BAN_TYPE_MANUAL)."".BANLAN_121.""; } diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 0288e3318..1a0c6fd27 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -175,10 +175,10 @@ class cron_admin_ui extends e_admin_ui if(is_dir(e_BASE.".git")) { $cronDefaults['_system'][7] = array( - 'name' => "Update this Git repository", //TODO LAN + 'name' => LAN_CRON_20_4, 'category' => 'update', 'function' => 'gitrepo', - 'description' => "Update this e107 installation with the very latest files from github.
Recommended for developers only.
Warning! May cause site instability!", //TODO LAN + 'description' => LAN_CRON_20_5."
".LAN_CRON_20_6."
".LAN_CRON_20_7." ".LAN_CRON_20_8, // 'available' => e107::getPref('ban_retrigger') ); diff --git a/e107_admin/frontpage.php b/e107_admin/frontpage.php index b01648c21..9b7753819 100644 --- a/e107_admin/frontpage.php +++ b/e107_admin/frontpage.php @@ -264,7 +264,7 @@ if(isset($_POST['fp_save_new'])) if($ind) { $mes->addDebug(print_a($fp_settings,true)); - $mes->addError( "duplicate definition for class: ".$ind); //TODO LAN + $mes->addError(FRTLAN_56." ".$ind); unset($fp_settings[$ind]); // Knock out duplicate definition for class } @@ -282,7 +282,7 @@ if(isset($_POST['fp_save_new'])) } else { // Someone playing games - $mes->addError('Software error'); // TODO LAN + $mes->addError(FRTLAN_57); } } @@ -318,8 +318,8 @@ if($fp_update_prefs) $corePrefs->set('frontpage', $fp_list); $corePrefs->set('frontpage_force', $fp_force); $result = $corePrefs->save(FALSE, TRUE); - $mes->addDebug("

Home

".print_a($fp_list, true)); - $mes->addDebug("

Post-Login

".print_a($fp_force, true)); + $mes->addDebug("

".FRTLAN_58."

".print_a($fp_list, true)); + $mes->addDebug("

".FRTLAN_59."

".print_a($fp_force, true)); } diff --git a/e107_admin/image.php b/e107_admin/image.php index 8b7b39028..8ba5f0674 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -511,11 +511,11 @@ class media_form_ui extends e_admin_form_ui $pref = e107::getPref(); $options = array( - "news-image" => "News Images", // TODO LAN. - "news-bbcode" => "News [img] bbcode", - "page-bbcode" => "Page [img] bbcode", - // "featurebox-image" => "Featurebox Images", - // "featurebox-bbcode" => "Featurebox [img] bbcode", + "news-image" => LAN_IMA_O_001, + "news-bbcode" => LAN_IMA_O_002, + "page-bbcode" => LAN_IMA_O_003, + // "featurebox-image" => LAN_IMA_O_004, + // "featurebox-bbcode" => LAN_IMA_O_005, ); if(vartrue($pref['e_imageresize']) && is_array($pref['e_imageresize'])) @@ -523,7 +523,7 @@ class media_form_ui extends e_admin_form_ui foreach($pref['e_imageresize'] as $k=>$val) { - $options[$k] = ucfirst($k). " [img] bbcode"; + $options[$k] = ucfirst($k)." ".LAN_IMA_O_006; } } @@ -724,33 +724,33 @@ class media_admin_ui extends e_admin_ui 'image_post_class' => array('title'=> IMALAN_10, 'type' => 'userclass', 'data'=>'int', 'writeParms'=>'help=IMALAN_11&classlist=public,guest,nobody,member,admin,main,classes' ), 'image_post_disabled_method' => array('title'=> IMALAN_12, 'type' => 'boolean','writeParms'=>'enabled=IMALAN_15&disabled=IMALAN_14'), 'resize_method' => array('title'=> IMALAN_3, 'type'=>'method', 'data'=>'str'), - 'thumbnail_quality' => array('title'=> "Thumbnail Quality", 'type'=>'number', 'data'=>'int', 'writeParms'=>'help=Set this as low as possible before quality loss is apparent. Max. 100'), //TODO LAN + 'thumbnail_quality' => array('title'=> IMALAN_73, 'type'=>'number', 'data'=>'int', 'writeParms'=>'help=IMALAN_74'), - 'im_width' => array('title'=> "Avatar Width", 'type'=>'number', 'data'=>'int', 'writeParms'=>'help=Avatar images will be constrained to these dimensions (in pixels)'), //TODO LAN - 'im_height' => array('title'=> "Avatar Height", 'type'=>'number', 'data'=>'int', 'writeParms'=>'help=Avatar images will be constrained to these dimensions (in pixels)'), - 'resize_dimensions' => array('title'=> "Resize-Image Dimensions", 'type'=>'method', 'data'=>'str'), + 'im_width' => array('title'=> IMALAN_75, 'type'=>'number', 'data'=>'int', 'writeParms'=>'help=IMALAN_76'), + 'im_height' => array('title'=> IMALAN_77, 'type'=>'number', 'data'=>'int', 'writeParms'=>'help=IMALAN_78'), + 'resize_dimensions' => array('title'=> IMALAN_79, 'type'=>'method', 'data'=>'str'), - 'watermark_activate' => array('title'=> 'Watermark Activation', 'tab'=>1, 'type' => 'number', 'data' => 'str', 'help'=>'All images with a width or height greater than this value will be given a watermark during resizing.'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_text' => array('title'=> 'Watermark Text','tab'=>1, 'type' => 'text', 'data' => 'str', 'help'=>'Optional Watermark Text'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_font' => array('title'=> 'Watermark Font','tab'=>1, 'type' => 'dropdown', 'data' => 'str', 'help'=>'Optional Watermark Font. Upload more .ttf fonts to the /fonts folder in your theme directory.'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_size' => array('title'=> 'Watermark Size', 'tab'=>1,'type' => 'number', 'data' => 'int', 'help'=>'Size of the font in pts'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_activate' => array('title'=> IMALAN_80, 'tab'=>1, 'type' => 'number', 'data' => 'str', 'help'=>IMALAN_81), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_text' => array('title'=> IMALAN_82,'tab'=>1, 'type' => 'text', 'data' => 'str', 'help'=>IMALAN_83), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_font' => array('title'=> IMALAN_84,'tab'=>1, 'type' => 'dropdown', 'data' => 'str', 'help'=>IMALAN_85), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_size' => array('title'=> IMALAN_86, 'tab'=>1,'type' => 'number', 'data' => 'int', 'help'=>IMALAN_87), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_pos' => array('title'=> 'Watermark Position','tab'=>1, 'type' => 'dropdown', 'data' => 'str', 'help'=>'Watermark Position'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_margin' => array('title'=> 'Watermark Margin', 'tab'=>1,'type' => 'number', 'data' => 'int', 'help'=>'The distance that watermark will appear from the edge of the image.'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_pos' => array('title'=> IMALAN_88,'tab'=>1, 'type' => 'dropdown', 'data' => 'str', 'help'=>IMALAN_89), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_margin' => array('title'=> IMALAN_90, 'tab'=>1,'type' => 'number', 'data' => 'int', 'help'=>IMALAN_91), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_color' => array('title'=> 'Watermark Color', 'tab'=>1, 'type' => 'text', 'data' => 'str', 'help'=>'Color of the watermark eg. 000000'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_shadowcolor' => array('title'=> 'Watermark Shadow-Color', 'tab'=>1,'type' => 'text', 'data' => 'str', 'help'=>'Shadow Color of the watermark eg. ffffff '), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_color' => array('title'=> IMALAN_92, 'tab'=>1, 'type' => 'text', 'data' => 'str', 'help'=>IMALAN_93), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_shadowcolor' => array('title'=> IMALAN_94, 'tab'=>1,'type' => 'text', 'data' => 'str', 'help'=>IMALAN_95), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), - 'watermark_opacity' => array('title'=> 'Watermark Opacity', 'tab'=>1, 'type' => 'number', 'data' => 'int', 'help'=>'Enter a number between 1 and 100'), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), + 'watermark_opacity' => array('title'=> IMALAN_96, 'tab'=>1, 'type' => 'number', 'data' => 'int', 'help'=>IMALAN_97), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), // https://developers.google.com/youtube/player_parameters - 'youtube_default_account' => array('title'=> "Default YouTube account", 'tab'=>2, 'type' => 'text', 'data'=>'str', 'help'=>'Used by the Media-Manager Youtube browser. Enter account name. eg. e107inc'), + 'youtube_default_account' => array('title'=> IMALAN_98, 'tab'=>2, 'type' => 'text', 'data'=>'str', 'help'=>IMALAN_99), - 'youtube_rel' => array('title'=> "Show Related Videos", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), - 'youtube_showinfo' => array('title'=> "Show Video Info", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), - 'youtube_cc_load_policy' => array('title'=> "Show Closed-Captions by default", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), - 'youtube_modestbranding' => array('title'=> "Use Modest Branding", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), - 'youtube_bbcode_responsive' => array('title'=> "Make the YouTube bbcode responsive", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), + 'youtube_rel' => array('title'=> IMALAN_100, 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), + 'youtube_showinfo' => array('title'=> IMALAN_101, 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), + 'youtube_cc_load_policy' => array('title'=> IMALAN_102, 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), + 'youtube_modestbranding' => array('title'=> IMALAN_103, 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), + 'youtube_bbcode_responsive' => array('title'=> IMALAN_104, 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), // @@ -796,11 +796,10 @@ class media_admin_ui extends e_admin_ui "; list($img_import_w,$img_import_h) = explode("x",$pref['img_import_resize']); - - //TODO LANS + $text .= " - Resize images during media import
Leave empty to disable
+ ".IMALAN_105."
".IMALAN_106."
".$frm->text('img_import_resize_w', $img_import_w,4)."px X ".$frm->text('img_import_resize_h', $img_import_h,4)."px @@ -1622,10 +1621,9 @@ class media_admin_ui extends e_admin_ui list($img_import_w,$img_import_h) = explode("x",$pref['img_import_resize']); - //TODO LANS - $text .= " + $text .= " - Resize images during media import
Leave empty to disable
+ ".IMALAN_105."
".IMALAN_106."
".$frm->text('img_import_resize_w', $img_import_w,4)."px X ".$frm->text('img_import_resize_h', $img_import_h,4)."px diff --git a/e107_admin/language.php b/e107_admin/language.php index fccf9c62e..f1ac985ba 100644 --- a/e107_admin/language.php +++ b/e107_admin/language.php @@ -738,12 +738,12 @@ function multilang_prefs() if($opt) { - //TODO LANs and class2.php check. + //TODO class2.php check. $text .= " - Language by Domain Name -
Domain determines the site's language. Enter domain without the 'www.'
+ ".LANG_LAN_106." +
".LANG_LAN_107."
".$opt."
"; @@ -1308,17 +1308,15 @@ function available_langpacks() } ksort($languages); - - //TODO LANs - + $text .= " - Name - Version - Author - Release-date - Compatible - Download + ".LANG_LAN_108." + ".LANG_LAN_109." + ".LANG_LAN_110." + ".LANG_LAN_111." + ".LANG_LAN_112." + ".LANG_LAN_113." "; @@ -1332,7 +1330,7 @@ function available_langpacks() ".$value['date']." ".$value['compatibility']." - Download Pack + ".LANG_LAN_114." "; } $text .= ""; @@ -1396,7 +1394,7 @@ function zip_up_lang($language) { $ret = array(); $ret['error'] = TRUE; - $message = (defined('LANG_LAN_34')) ? LANG_LAN_34 : "Please verify and correct the remaining [x] error(s) before attempting to create a language-pack."; + $message = (defined('LANG_LAN_34')) ? LANG_LAN_34 : LANG_LAN_115; $ret['message'] = str_replace("[x]",$_SESSION['lancheck'][$language]['total'],$message); return $ret; } @@ -1405,16 +1403,16 @@ function zip_up_lang($language) { $ret = array(); $ret['error'] = TRUE; - $ret['message'] = (defined('LANG_LAN_27')) ? LANG_LAN_27 : "Please verify your language files ('Verify') then try again."; + $ret['message'] = (defined('LANG_LAN_27')) ? LANG_LAN_27 : LANG_LAN_116; return $ret; } if(varset($_POST['contribute_pack']) && varset($_SESSION['lancheck'][$language]['total']) !='0') { $ret['error'] = TRUE; - $ret['message'] = (defined("LANG_LAN_29")) ? LANG_LAN_29 : "You should correct the remaining errors before contributing your language pack."; + $ret['message'] = (defined("LANG_LAN_29")) ? LANG_LAN_29 : LANG_LAN_117; $ret['message'] .= "
"; - $ret['message'] .= (defined('LANG_LAN_27')) ? LANG_LAN_27 : "Please verify your language files ('Verify') then try again."; + $ret['message'] .= (defined('LANG_LAN_27')) ? LANG_LAN_27 : LANG_LAN_118; return $ret; } @@ -1448,7 +1446,7 @@ function zip_up_lang($language) { $ret['error'] = TRUE; $file = "e107_languages/{$language}/{$language}.php"; - $def = (defined('LANG_LAN_25')) ? LANG_LAN_25 : "Please check that CORE_LC and CORE_LC2 have values in [lcpath] and try again."; + $def = (defined('LANG_LAN_25')) ? LANG_LAN_25 : LANG_LAN_119; $ret['message'] = str_replace("[lcpath]",$file,$def); // return $ret; } @@ -1459,7 +1457,7 @@ function zip_up_lang($language) if(($HANDLERS_DIRECTORY != "e107_handlers/") || ( $LANGUAGES_DIRECTORY != "e107_languages/") || ($THEMES_DIRECTORY != "e107_themes/") || ($HELP_DIRECTORY != "e107_docs/help/") || ($PLUGINS_DIRECTORY != "e107_plugins/")) { $ret['error'] = TRUE; - $ret['message'] = (defined('LANG_LAN_26')) ? LANG_LAN_26 : "Please make sure you are using default folder names in e107_config.php (eg. e107_languages/, e107_plugins/ etc.) and try again."; + $ret['message'] = (defined('LANG_LAN_26')) ? LANG_LAN_26 : LANG_LAN_120; return $ret; } @@ -1632,19 +1630,19 @@ function unused($lanfile,$script,$reverse=false) } - $mes->addDebug("Script: ".$script); + $mes->addDebug(LANG_LAN_122." ".$script); $tmp = explode(",", $lanfile); foreach($tmp as $scr) { if(!file_exists($scr)) { - $mes->addError("Couldn't Load: ".$scr); + $mes->addError(LANG_LAN_121." ".$scr); continue; } $compare[$scr] = file_get_contents($scr); - $mes->addDebug("LanFile: ".$scr); + $mes->addDebug(LANG_LAN_123." ".$scr); } @@ -1653,18 +1651,18 @@ function unused($lanfile,$script,$reverse=false) else { $lanDefines = file_get_contents($lanfile); - $mes->addDebug("LanFile: ".$lanfile); + $mes->addDebug(LANG_LAN_123." ".$lanfile); $tmp = explode(",",$script); foreach($tmp as $scr) { if(!file_exists($scr)) { - $mes->addError("Couldn't Load: ".$scr); + $mes->addError(LANG_LAN_121." ".$scr); continue; } $compare[$scr] = file_get_contents($scr); - $mes->addDebug("Script: ".$scr); + $mes->addDebug(LANG_LAN_122." ".$scr); } } @@ -1675,12 +1673,12 @@ function unused($lanfile,$script,$reverse=false) if(!$compare) { - $mes->addError("Couldn't read ".$script); + $mes->addError(LANG_LAN_121." ".$script); } if(!$lanDefines) { - $mes->addError("Couldn't read ".$lanfile); + $mes->addError(LANG_LAN_121." ".$lanfile); } $srch = array(""); @@ -1706,7 +1704,7 @@ function unused($lanfile,$script,$reverse=false) if($reverse == true) { - $text .= "Definition"; + $text .= "".LANG_LAN_124.""; } $text .= " @@ -1721,7 +1719,7 @@ function unused($lanfile,$script,$reverse=false) { if(trim($line) !="") { - $disabled = (preg_match("#^//#i",$line)) ? " (disabled)" : FALSE; + $disabled = (preg_match("#^//#i",$line)) ? " ".LANG_LAN_125 : FALSE; if($match = getDefined($line,$reverse)) { $text .= compareit($match['define'],$compare,$match['value'],$disabled,$reverse); @@ -1738,7 +1736,7 @@ function unused($lanfile,$script,$reverse=false) if(count($_SESSION['language-tools-unused'])>0 && $reverse == false) { - $text .= "
".$frm->admin_button('disabled-unused','Disable All Unused','delete'). + $text .= "
".$frm->admin_button('disabled-unused',LANG_LAN_126,'delete'). $frm->hidden('disable-unused-lanfile',$lanfile). $frm->hidden('deprecatedLans',$script). @@ -1749,11 +1747,11 @@ function unused($lanfile,$script,$reverse=false) if($reverse != true) { - $mes->addInfo("Pink items are likely to be unused LANs.
Comment out and test thoroughly.
"); + $mes->addInfo("".LANG_LAN_127."
".LANG_LAN_128."
"); } $ret['text'] = $mes->render().$text; - $ret['caption'] = "Deprecated LAN Check (experimental!)"; + $ret['caption'] = LANG_LAN_129; return $ret; } @@ -1872,13 +1870,13 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE, $reverse=false){ { $color = "background-color:#E9EAF2"; $text .= ADMIN_TRUE_ICON; - $value = "Common Term"; + $value = LANG_LAN_130; } else { $color = "background-color:yellow"; $text .= "".ADMIN_WARNING_ICON.""; - $value = "Missing from language file"; + $value = LANG_LAN_131; } } @@ -1903,7 +1901,7 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE, $reverse=false){ if($foundCommon && $found) { $color = "background-color:yellow"; - $disabled .= "
".$common." is a common phrase.
(Use ".$def." instead.)"; + $disabled .= "
".$common." ".LANG_LAN_132."
(".LANG_LAN_133." ".$def." ".LANG_LAN_134.")"; // return "".$needle .$disabled. ""; } @@ -1915,7 +1913,7 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE, $reverse=false){ // $disabled .= " " . $def.""; // $common; } - if($disabled == " (disabled)") + if($disabled == " ".LANG_LAN_125) { $color = "background-color:#DFFFDF"; } diff --git a/e107_languages/English/admin/lan_banlist.php b/e107_languages/English/admin/lan_banlist.php index 6230ca0cb..1924ff127 100644 --- a/e107_languages/English/admin/lan_banlist.php +++ b/e107_languages/English/admin/lan_banlist.php @@ -124,5 +124,6 @@ define("BANLAN_118", "Spare reason"); define("BANLAN_119", "Indicates an import error - previously imported bans"); define("BANLAN_120", "Whitelist entry"); +define("BANLAN_121", "Blacklist entry"); ?> \ No newline at end of file diff --git a/e107_languages/English/admin/lan_cron.php b/e107_languages/English/admin/lan_cron.php index d020431f4..c8d2a4d9b 100644 --- a/e107_languages/English/admin/lan_cron.php +++ b/e107_languages/English/admin/lan_cron.php @@ -60,6 +60,11 @@ define("LAN_CRON_16", "Using your server control panel (eg. cPanel, DirectAdmin, define("LAN_CRON_20_1", "Check for e107 Update"); define("LAN_CRON_20_2", "Check e107.org for Core updates"); // [eml] is automatically replaced by head admin e-mail address. define("LAN_CRON_20_3", "Recommended to keep system up to date."); +define("LAN_CRON_20_4", "Update this Git repository"); +define("LAN_CRON_20_5", "Update this e107 installation with the very latest files from github."); +define("LAN_CRON_20_6", "Recommended for developers only."); +define("LAN_CRON_20_7", "Warning!"); +define("LAN_CRON_20_8", "May cause site instability!"); define("LAN_CRON_30", "Every Minute"); define("LAN_CRON_31", "Every Other Minute"); diff --git a/e107_languages/English/admin/lan_frontpage.php b/e107_languages/English/admin/lan_frontpage.php index a90de296b..816f425fb 100644 --- a/e107_languages/English/admin/lan_frontpage.php +++ b/e107_languages/English/admin/lan_frontpage.php @@ -41,5 +41,10 @@ define("FRTLAN_53", "User Class"); define("FRTLAN_PAGE_TITLE", "Front Page"); //define("FRTLAN_54", "Are you sure?"); //define("FRTLAN_55", "Confirm delete rule?"); +define("FRTLAN_56", "duplicate definition for class:"); +define("FRTLAN_57", "Software error"); +define("FRTLAN_58", "Home"); +define("FRTLAN_59", "Post-Login"); +define("FRTLAN_60", "Front"); ?> \ No newline at end of file diff --git a/e107_languages/English/admin/lan_image.php b/e107_languages/English/admin/lan_image.php index ba599fab5..a48fe6be9 100644 --- a/e107_languages/English/admin/lan_image.php +++ b/e107_languages/English/admin/lan_image.php @@ -20,6 +20,14 @@ define("LAN_IMA_002", "Not enough memory available to rotate"); define("LAN_IMA_003", "Rotated"); define("LAN_IMA_004", "Resizing"); +// Options +define("LAN_IMA_O_001", "News Images"); +define("LAN_IMA_O_002", "News [img] bbcode"); +define("LAN_IMA_O_003", "Page [img] bbcode"); +define("LAN_IMA_O_004", "Featurebox Images"); +define("LAN_IMA_O_005", "Featurebox [img] bbcode"); +define("LAN_IMA_O_006", "[img] bbcode"); + // Work in progress (Moc) define("IMALAN_1", "Enable image display"); @@ -99,5 +107,43 @@ define('IMALAN_70', 'Non-system folder is found!'); // define("IMALAN_72", "Icons"); +define('IMALAN_73', 'Thumbnail Quality'); +define('IMALAN_74', 'Set this as low as possible before quality loss is apparent. Max. 100'); +define('IMALAN_75', 'Avatar Width'); +define('IMALAN_76', 'Avatar images will be constrained to these dimensions (in pixels)'); +define('IMALAN_77', 'Avatar Height'); +define('IMALAN_78', 'Avatar images will be constrained to these dimensions (in pixels)'); +define('IMALAN_79', 'Resize-Image Dimensions'); +define('IMALAN_80', 'Watermark Activation'); +define('IMALAN_81', 'All images with a width or height greater than this value will be given a watermark during resizing.'); +define('IMALAN_82', 'Watermark Text'); +define('IMALAN_83', 'Optional Watermark Text'); +define('IMALAN_84', 'Watermark Font'); +define('IMALAN_85', 'Optional Watermark Font. Upload more .ttf fonts to the /fonts folder in your theme directory.'); +define('IMALAN_86', 'Watermark Size'); +define('IMALAN_87', 'Size of the font in pts'); +define('IMALAN_88', 'Watermark Position'); +define('IMALAN_89', 'Watermark Position'); +define('IMALAN_90', 'Watermark Margin'); +define('IMALAN_91', 'The distance that watermark will appear from the edge of the image.'); +define('IMALAN_92', 'Watermark Color'); +define('IMALAN_93', 'Color of the watermark eg. 000000'); +define('IMALAN_94', 'Watermark Shadow-Color'); +define('IMALAN_95', 'Shadow Color of the watermark eg. ffffff'); +define('IMALAN_96', 'Watermark Opacity'); +define('IMALAN_97', 'Enter a number between 1 and 100'); +define('IMALAN_98', 'Default YouTube account'); +define('IMALAN_99', 'Used by the Media-Manager Youtube browser. Enter account name. eg. e107inc'); +define('IMALAN_100', 'Show Related Videos'); +define('IMALAN_101', 'Show Video Info'); +define('IMALAN_102', 'Show Closed-Captions by default'); +define('IMALAN_103', 'Use Modest Branding'); +define('IMALAN_104', 'Make the YouTube bbcode responsive'); +define('IMALAN_105', 'Resize images during media import'); +define('IMALAN_106', 'Leave empty to disable'); +define('IMALAN_107', 'Watermark'); +define('IMALAN_108', 'Watermark'); +define('IMALAN_109', 'Watermark'); +define('IMALAN_110', 'Watermark'); ?> \ No newline at end of file diff --git a/e107_languages/English/admin/lan_language.php b/e107_languages/English/admin/lan_language.php index 882967896..271be3e8f 100644 --- a/e107_languages/English/admin/lan_language.php +++ b/e107_languages/English/admin/lan_language.php @@ -65,4 +65,34 @@ define("LANG_LAN_103", "[x] created."); define("LANG_LAN_104", "[x] was disabled but left intact."); define("LANG_LAN_105", "Delete all tables in [x]?"); +define("LANG_LAN_106", "Language by Domain Name"); +define("LANG_LAN_107", "Domain determines the site's language. Enter domain without the 'www.'"); +define("LANG_LAN_108", "Name"); +define("LANG_LAN_109", "Version"); +define("LANG_LAN_110", "Author"); +define("LANG_LAN_111", "Release-date"); +define("LANG_LAN_112", "Compatible"); +define("LANG_LAN_113", "Download"); +define("LANG_LAN_114", "Download Pack"); +define("LANG_LAN_115", "Please verify and correct the remaining [x] error(s) before attempting to create a language-pack."); +define("LANG_LAN_116", "Please verify your language files ('Verify') then try again."); +define("LANG_LAN_117", "You should correct the remaining errors before contributing your language pack."); +define("LANG_LAN_118", "Please verify your language files ('Verify') then try again."); +define("LANG_LAN_119", "Please check that CORE_LC and CORE_LC2 have values in [lcpath] and try again."); +define("LANG_LAN_120", "Please make sure you are using default folder names in e107_config.php (eg. e107_languages/, e107_plugins/ etc.) and try again."); +define("LANG_LAN_121", "Couldn't Load:"); +define("LANG_LAN_122", "Script:"); +define("LANG_LAN_123", "LanFile:"); +define("LANG_LAN_124", "Definition"); +define("LANG_LAN_125", "(disabled)"); +define("LANG_LAN_126", "Disable All Unused"); +define("LANG_LAN_127", "Pink items are likely to be unused LANs."); +define("LANG_LAN_128", "Comment out and test thoroughly."); +define("LANG_LAN_129", "Deprecated LAN Check (experimental!)"); +define("LANG_LAN_130", "Common Term"); +define("LANG_LAN_131", "Missing from language file"); +define("LANG_LAN_132", "is a common phrase."); +define("LANG_LAN_133", "Use"); +define("LANG_LAN_134", "instead."); + ?> \ No newline at end of file From 3db8afc8d93b607a1a28ef19a5ccc405a1983de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Fri, 1 May 2015 15:55:13 +0200 Subject: [PATCH 2/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_admin/image.php | 53 +++++++++++++--------- e107_languages/English/admin/lan_image.php | 28 ++++++++++-- 2 files changed, 55 insertions(+), 26 deletions(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index 8ba5f0674..41812f16c 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -1775,7 +1775,7 @@ class media_admin_ui extends e_admin_ui if(!$typePath = $this->getPath($upload['type'])) { - $mes->addError("Couldn't generated path from upload data"); + $mes->addError(IMALAN_107); return FALSE; } $mes->addDebug(print_a($upload,TRUE)); @@ -1786,7 +1786,10 @@ class media_admin_ui extends e_admin_ui if(!rename($oldpath, e_MEDIA.$newpath)) { - $mes->add("Couldn't move file from ".$oldpath." to ".$newpath, E_MESSAGE_ERROR); + $srch = array('[x]','[y]'); + $repl = array($oldpath,$newpath); + $text = str_replace($srch,$repl,IMALAN_108); + $mes->add($text, E_MESSAGE_ERROR); return FALSE; }; @@ -1817,7 +1820,7 @@ class media_admin_ui extends e_admin_ui if(!($typePath = $this->getPath($img_data['media_type']))) { - $mes->addError("Couldn't get path ".$typePath); + $mes->addError(IMALAN_109." ".$typePath); return FALSE; } @@ -1834,7 +1837,10 @@ class media_admin_ui extends e_admin_ui if(!rename($oldpath, $newpath)) { - $mes->add("Couldn't move file from ".$oldpath." to ".str_replace('../', '', $newpath), E_MESSAGE_ERROR); + $srch = array('[x]','[y]'); + $repl = array($oldpath,str_replace('../', '', $newpath)); + $text = str_replace($srch,$repl,IMALAN_110); + $mes->add($text, E_MESSAGE_ERROR); return FALSE; } $img_data['media_url'] = $tp->createConstants($newpath, 'rel'); @@ -1890,7 +1896,8 @@ class media_admin_ui extends e_admin_ui if(!vartrue($this->mimePaths[$pmime])) { - $mes->add("Couldn't detect mime-type($mime). Upload failed.", E_MESSAGE_ERROR); + $text = str_replace('[x]',$mime,IMALAN_111); + $mes->add($text, E_MESSAGE_ERROR); return FALSE; } @@ -1900,7 +1907,8 @@ class media_admin_ui extends e_admin_ui { if(!mkdir($dir, 0755)) { - $mes->add("Couldn't create folder ($dir).", E_MESSAGE_ERROR); + $text = str_replace('[x]',$dir,IMALAN_112); + $mes->add($text, E_MESSAGE_ERROR); return FALSE; }; } @@ -1929,14 +1937,14 @@ class media_admin_ui extends e_admin_ui if(!vartrue($_POST['batch_import_selected'])) { - $mes->add("Scanning for new media (images, videos, files) in folder: ".e_IMPORT."", E_MESSAGE_INFO); + $mes->add(IMALAN_113." ".e_IMPORT."", E_MESSAGE_INFO); } if(!count($files)) { if(!vartrue($_POST['batch_import_selected'])) { - $mes->add("No media Found! Please upload some files.", E_MESSAGE_INFO); + $mes->add(IMALAN_114, E_MESSAGE_INFO); } $text = $this->uploadTab(); @@ -1958,15 +1966,15 @@ class media_admin_ui extends e_admin_ui ".e107::getForm()->checkbox_toggle('e-column-toggle', 'batch_selected')." - Preview + ".IMALAN_121." ".LAN_FILE." - Title (internal use) - Caption (seen by public) - Author - Mime Type - File Size + ".IMALAN_115." + ".IMALAN_116." + ".IMALAN_117." + ".IMALAN_118." + ".IMALAN_119." ".LAN_DATESTAMP." - Dimensions + ".IMALAN_120." "; @@ -1981,7 +1989,8 @@ class media_admin_ui extends e_admin_ui if($f['error']) { - $mes->addWarning($f['fname']." couldn't be renamed. Check file perms."); + $text = str_replace('[x]', $f['fname'], IMALAN_122); + $mes->addWarning($text); } $large = e107::getParser()->thumbUrl($f['path'].$f['fname'], 'w=800', true); @@ -2017,7 +2026,7 @@ class media_admin_ui extends e_admin_ui
- Import into Category: ".$frm->selectbox('batch_category',$this->cats, $_POST['batch_category']); + ".IMALAN_123." ".$frm->selectbox('batch_category',$this->cats, $_POST['batch_category']); // $waterMarkPath = e_THEME.e107::getPref('sitetheme')."/images/watermark.png"; // Now performed site-wide dynamically. @@ -2029,8 +2038,8 @@ class media_admin_ui extends e_admin_ui $text .= "
- ".$frm->admin_button('batch_import_selected', "Import Selected Files", 'import') - .$frm->admin_button('batch_import_delete', "Delete Selected Files", 'delete'); + ".$frm->admin_button('batch_import_selected', IMALAN_124, 'import') + .$frm->admin_button('batch_import_delete', IMALAN_125, 'delete'); $text .= "
@@ -2140,7 +2149,7 @@ class media_admin_ui extends e_admin_ui if(!count($_POST['batch_selected'])) { - $mes->addError("Please check at least one file."); + $mes->addError(IMALAN_126); return; } @@ -2181,7 +2190,7 @@ class media_admin_ui extends e_admin_ui if(!$f['mime']) { - $mes->add("Couldn't get file info from : ".$oldpath, E_MESSAGE_WARNING); + $mes->add(IMALAN_127." ".$oldpath, E_MESSAGE_WARNING); // $mes->add(print_a($f,true), E_MESSAGE_ERROR); $f['mime'] = "other/file"; } @@ -2225,7 +2234,7 @@ class media_admin_ui extends e_admin_ui if($sql->db_Insert("core_media",$insert)) { - $mes->add("Importing Media: ".$f['fname'], E_MESSAGE_SUCCESS); + $mes->add(IMALAN_128." ".$f['fname'], E_MESSAGE_SUCCESS); $this->deleteFileXml($f['fname']); } else diff --git a/e107_languages/English/admin/lan_image.php b/e107_languages/English/admin/lan_image.php index a48fe6be9..e66b25d44 100644 --- a/e107_languages/English/admin/lan_image.php +++ b/e107_languages/English/admin/lan_image.php @@ -141,9 +141,29 @@ define('IMALAN_103', 'Use Modest Branding'); define('IMALAN_104', 'Make the YouTube bbcode responsive'); define('IMALAN_105', 'Resize images during media import'); define('IMALAN_106', 'Leave empty to disable'); -define('IMALAN_107', 'Watermark'); -define('IMALAN_108', 'Watermark'); -define('IMALAN_109', 'Watermark'); -define('IMALAN_110', 'Watermark'); +define('IMALAN_107', 'Couldn\'t generated path from upload data'); +define('IMALAN_108', 'Couldn\'t move file from [x] to [y]'); +define('IMALAN_109', 'Couldn\'t get path'); +define('IMALAN_110', 'Couldn\'t move file from [x] to [y]'); +define('IMALAN_111', 'Couldn\'t detect mime-type([x]). Upload failed.'); +define('IMALAN_112', 'Couldn\'t create folder ([x]).'); +define('IMALAN_113', 'Scanning for new media (images, videos, files) in folder:'); +define('IMALAN_114', 'No media Found! Please upload some files.'); +define('IMALAN_115', 'Title (internal use)'); +define('IMALAN_116', 'Caption (seen by public)'); +define('IMALAN_117', 'Author'); +define('IMALAN_118', 'Mime Type'); +define('IMALAN_119', 'File Size'); +define('IMALAN_120', 'Dimensions'); +define('IMALAN_121', 'Preview'); +define('IMALAN_122', '[x] couldn\'t be renamed. Check file perms.'); +define('IMALAN_123', 'Import into Category:'); +define('IMALAN_124', 'Import Selected Files'); +define('IMALAN_125', 'Delete Selected Files'); +define('IMALAN_126', 'Please check at least one file.'); +define('IMALAN_127', 'Couldn\'t get file info from:'); +define('IMALAN_128', 'Importing Media:'); +define('IMALAN_129', 'Could'); +define('IMALAN_130', 'Could'); ?> \ No newline at end of file From 5096516afbf4dca44aff6dfc84a8aed471ea395e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Fri, 1 May 2015 15:55:34 +0200 Subject: [PATCH 3/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_languages/English/admin/lan_image.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/e107_languages/English/admin/lan_image.php b/e107_languages/English/admin/lan_image.php index e66b25d44..325bb1935 100644 --- a/e107_languages/English/admin/lan_image.php +++ b/e107_languages/English/admin/lan_image.php @@ -163,7 +163,5 @@ define('IMALAN_125', 'Delete Selected Files'); define('IMALAN_126', 'Please check at least one file.'); define('IMALAN_127', 'Couldn\'t get file info from:'); define('IMALAN_128', 'Importing Media:'); -define('IMALAN_129', 'Could'); -define('IMALAN_130', 'Could'); ?> \ No newline at end of file From aacd91aff1f4669683ece0fa8913dd9a5651d49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Fri, 1 May 2015 17:54:44 +0200 Subject: [PATCH 4/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_admin/links.php | 20 +- e107_admin/menus.php | 7 +- e107_admin/plugin.php | 289 ++++++++++---------- e107_languages/English/admin/lan_admin.php | 3 + e107_languages/English/admin/lan_links.php | 9 + e107_languages/English/admin/lan_menus.php | 14 +- e107_languages/English/admin/lan_plugin.php | 164 +++++++++++ 7 files changed, 350 insertions(+), 156 deletions(-) diff --git a/e107_admin/links.php b/e107_admin/links.php index ca7687463..c5ed8da94 100644 --- a/e107_admin/links.php +++ b/e107_admin/links.php @@ -83,15 +83,15 @@ class links_admin_ui extends e_admin_ui 'link_name' => array('title'=> LCLAN_15, 'width'=>'auto','type'=>'text', 'inline'=>true, 'required' => true, 'validate' => true), 'link_category' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width' => 'auto'), - 'link_parent' => array('title'=> 'Sublink of', 'type' => 'method', 'data'=>'int', 'width' => 'auto', 'batch'=>true, 'filter'=>true, 'thclass' => 'left first'), + 'link_parent' => array('title'=> LCLAN_104, 'type' => 'method', 'data'=>'int', 'width' => 'auto', 'batch'=>true, 'filter'=>true, 'thclass' => 'left first'), 'link_url' => array('title'=> LAN_URL, 'width'=>'auto', 'type'=>'method', 'inline'=>true, 'required'=>true,'validate' => true, 'writeParms'=>'size=xxlarge'), - 'link_sefurl' => array('title'=> LAN_SEFURL, 'type' => 'method', 'inline'=>false, 'width' => 'auto', 'help'=>'Enable to override URL with a dynamically created Search-Engine-Friendly URL'), //TODO LAN + 'link_sefurl' => array('title'=> LAN_SEFURL, 'type' => 'method', 'inline'=>false, 'width' => 'auto', 'help'=>LCLAN_107), 'link_class' => array('title'=> LAN_USERCLASS, 'type' => 'userclass','inline'=>true, 'writeParms' => 'classlist=public,guest,nobody,member,classes,admin,main', 'batch'=>true, 'filter'=>true, 'width' => 'auto'), 'link_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'width' => 'auto'), // 'method'=>'tinymce_plugins', ? 'link_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'width' => 'auto', 'nolist'=>false, 'inline' => true), 'link_open' => array('title'=> LCLAN_19, 'type' => 'dropdown', 'inline'=>true, 'width' => 'auto', 'batch'=>true, 'filter'=>true, 'thclass' => 'left first'), - 'link_function' => array('title'=> 'Function', 'type' => 'method', 'data'=>'str', 'width' => 'auto', 'thclass' => 'left first'), - 'link_owner' => array('title'=> 'Owned by', 'type' => 'hidden', 'data'=>'str'), + 'link_function' => array('title'=> LCLAN_105, 'type' => 'method', 'data'=>'str', 'width' => 'auto', 'thclass' => 'left first'), + 'link_owner' => array('title'=> LCLAN_106, 'type' => 'hidden', 'data'=>'str'), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class'=>'center','readParms'=>'sort=1') // quick workaround ); @@ -161,7 +161,7 @@ class links_admin_ui extends e_admin_ui $found = true; } } - if($found) e107::getMessage()->addWarning('Some selections omitted - you can\'t set Link as a Sublink of its Sublink.'); + if($found) e107::getMessage()->addWarning(LCLAN_108); if(!$selected) return; if(parent::handleListBatch($selected, $field, $value)) @@ -317,17 +317,17 @@ class links_admin_ui extends e_admin_ui if(!$pid) { - $mes->warning('Please choose a parent'); + $mes->warning(LCLAN_109); return; } if(!$subtype) { - $mes->warning('Please choose a generator module'); + $mes->warning(LCLAN_110); return; } if(!$sublink) { - $mes->error('Not valid generator module data'); + $mes->error(LCLAN_111); return; } @@ -664,7 +664,7 @@ class links_admin_form_ui extends e_admin_form_ui if(empty($config)) { - return $this->hidden('link_sefurl','')."Not available"; //TODO Generic LAN + return $this->hidden('link_sefurl','')."".LAN_NOT_AVAILABLE.""; } foreach($config as $k=>$v) @@ -706,7 +706,7 @@ class links_admin_form_ui extends e_admin_form_ui $text = str_replace(e_HTTP,'',e107::url($owner,$sef)); // dynamically created. $text .= $this->hidden('link_url',$curVal); - $text .= " Auto-generated"; + $text .= " ".LAN_AUTO_GENERATED.""; return $text; diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 9703a786f..13bb018da 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -1085,16 +1085,15 @@ class e_layout return; }; $row = $sql->fetch(); - - // TODO lan + $text = "
- Menu parameters ".$row['menu_name']." + ".MENLAN_44." ".$row['menu_name']." diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 3519cf71a..af02eabff 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -179,10 +179,10 @@ $frm = e107::getForm(); function e_help() { + $help_text = str_replace('[interval]', (PLUGIN_SCAN_INTERVAL ? PLUGIN_SCAN_INTERVAL / 60 : 0), EPL_ADLAN_228); return array( - 'caption' => "Scan for Changes", - 'text' => "Plugin folders are scanned every ".(PLUGIN_SCAN_INTERVAL ? PLUGIN_SCAN_INTERVAL / 60 : 0) ." minutes for changes. Click the button below to scan now. -

Refresh

" + 'caption' => EPL_ADLAN_227, + 'text' => $help_text."

".EPL_ADLAN_229."

" ); } @@ -413,7 +413,7 @@ class pluginManager{ private function compatibilityLabel($val='') { - $badge = (vartrue($val) > 1.9) ? "Made for v2" : '1.x'; + $badge = (vartrue($val) > 1.9) ? "".EPL_ADLAN_88."" : '1.x'; return $badge; } @@ -425,7 +425,7 @@ class pluginManager{ $tp = e107::getParser(); $frm = e107::getForm(); - $caption = "Search Online"; + $caption = EPL_ADLAN_89; $e107 = e107::getInstance(); $xml = e107::getXml(); @@ -435,7 +435,7 @@ class pluginManager{ // check for cURL if(!function_exists('curl_init')) { - $mes->addWarning("cURL is currently required to use this feature. Contact your webhosting provider to enable cURL"); // TODO LAN? + $mes->addWarning(EPL_ADLAN_90); } //TODO use admin_ui including filter capabilities by sending search queries back to the xml script. @@ -483,8 +483,8 @@ class pluginManager{ // print_a($row); $badge = $this->compatibilityLabel($row['compatibility']);; - $featured = ($row['featured']== 1) ? " Featured" : ''; - $price = ($row['price'] > 0) ? "Buy" : "Free"; + $featured = ($row['featured']== 1) ? " ".EPL_ADLAN_91."" : ''; + $price = ($row['price'] > 0) ? "".EPL_ADLAN_92."" : "".EPL_ADLAN_93.""; $data[] = array( 'plugin_id' => $row['params']['id'], @@ -635,7 +635,7 @@ class pluginManager{ // print_a($data); // Server flush useless. It's ajax ready state 4, we can't flush (sadly) before that (at least not for all browsers) - $mes->addSuccess("Connecting..."); + $mes->addSuccess(EPL_ADLAN_94); if($mp->download($data['plugin_id'], $data['plugin_mode'], 'plugin')) { @@ -646,7 +646,8 @@ class pluginManager{ } else { - echo $mes->addError('Unable to continue')->render('default', 'error'); + // Unable to continue + echo $mes->addError(EPL_ADLAN_95)->render('default', 'error'); } echo $mes->render('default', 'debug'); @@ -659,7 +660,7 @@ class pluginManager{ $text .= $frm->open('upload-url-form','post'); $text .= "
"; - $text .= ""; + $text .= ""; $text .= $frm->admin_button('upload_remote_url',1,'create','Install'); $text .= "
"; $text .= "\n\n"; @@ -822,7 +823,7 @@ class pluginManager{ } else { - $mes->addError("There was a problem extracting the .zip file to your plugin directory."); + $mes->addError(EPL_ADLAN_97); } } @@ -919,7 +920,7 @@ class pluginManager{ else { /* upload is unlocatable */ - e107::getRender()->tablerender(EPL_ADLAN_40, 'Unknown file: '.$fileList[0]['stored_filename']); + e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_98.' '.$fileList[0]['stored_filename']); } /* attempt to delete uploaded archive */ @@ -942,7 +943,7 @@ class pluginManager{ if ($text === FALSE) { // Tidy this up - $this->show_message("Error messages above this line", E_MESSAGE_ERROR); + $this->show_message(EPL_ADLAN_99, E_MESSAGE_ERROR); } else { @@ -1193,8 +1194,9 @@ class pluginManager{ } else { - //TODO LANs - $text .= ""; + $text .= ""; } $text .= " @@ -1651,7 +1653,7 @@ class pluginManager{ $var['avail']['link'] = e_SELF."?avail"; - $var['online']['text'] = "Find Plugins"; + $var['online']['text'] = EPL_ADLAN_220; $var['online']['link'] = e_SELF."?mode=online"; @@ -1661,7 +1663,7 @@ class pluginManager{ $var['upload']['link'] = e_SELF."?mode=upload"; } - $var['create']['text'] = "Plugin Builder"; + $var['create']['text'] = EPL_ADLAN_114; $var['create']['link'] = e_SELF."?mode=create"; @@ -2037,17 +2039,17 @@ class pluginLanguage // echo $text2; $tabs = array ( - 0 => array('caption'=>'Plugin Files', 'text'=> $this->renderScriptTable()), - 1 => array('caption'=>'Used', 'text'=>$used), - 2 => array('caption'=>'Unused', 'text'=>$unused), - 3 => array('caption'=>'Unsure', 'text'=>$unsure), + 0 => array('caption'=>EPL_ADLAN_222, 'text'=> $this->renderScriptTable()), + 1 => array('caption'=>EPL_ADLAN_223, 'text'=>$used), + 2 => array('caption'=>EPL_ADLAN_224, 'text'=>$unused), + 3 => array('caption'=>EPL_ADLAN_225, 'text'=>$unsure), ); - $ns->tablerender(ADLAN_98.SEP."Plugin Builder".SEP. "Language-File Check".SEP.$this->plugin, $frm->tabs($tabs)); + $ns->tablerender(ADLAN_98.SEP.EPL_ADLAN_114.SEP.EPL_ADLAN_221.SEP.$this->plugin, $frm->tabs($tabs)); } @@ -2083,7 +2085,7 @@ class pluginLanguage { foreach($match[1] as $lan) { - if($lan != 'e_LANGUAGE' && $lan != 'e_LANGUAGEDIR' && $lan != 'LAN' && $lan != 'LANGUAGE') // remove 'TODO LAN' + if($lan != 'e_LANGUAGE' && $lan != 'e_LANGUAGEDIR' && $lan != 'LAN' && $lan != 'LANGUAGE') { $this->scriptDefs[] = $lan; $this->scriptDefsData[] = array('file'=>$path, 'line'=>$ln, 'lan'=>$lan, 'value'=>$this->lanDefsRaw[$lan]); @@ -2216,15 +2218,16 @@ class pluginBuilder } $newDir[$dir] = $dir; } - - $mes->addInfo("This Wizard will build an admin area for your plugin and generate a plugin.xml meta file. - Before you start:
    -
  • Create a new writable folder in the ".e_PLUGIN." directory eg. myplugin
  • -
  • If your plugin will use sql tables, create a new file in this folder and name it the same as the directory but with _sql.php as a sufix eg. myplugin_sql.php
  • -
  • Create your table in Phpmyadmin and paste an sql dump of it into your file and save. (see e107_plugins/_blank/_blank_sql.php for an example)
  • -
  • Select your plugin's folder to begin.
  • -
- "); + + $info = EPL_ADLAN_102; + $info .= "
    "; + $info .= "
  • ".str_replace('[e_PLUGIN]', e_PLUGIN, EPL_ADLAN_103)."
  • "; + $info .= "
  • ".EPL_ADLAN_104."
  • "; + $info .= "
  • ".EPL_ADLAN_105."
  • "; + $info .= "
  • ".EPL_ADLAN_106."
  • "; + $info .= "
"; + + $mes->addInfo($info); $text = $frm->open('createPlugin','get'); $text .= "
- Parameters (query string format): + ".MENLAN_45." ".$frm->text('menu_parms', $row['menu_parms'], 900, 'class=e-save span7')."
No plugins installed - click here to install some.
"; + $text .= str_replace("[link]", "".EPL_ADLAN_100."", EPL_ADLAN_101); + $text .= "
@@ -2233,12 +2236,12 @@ class pluginBuilder - + - + "; @@ -2263,11 +2266,11 @@ class pluginBuilder $text .= $frm->close(); - $ns->tablerender(ADLAN_98.SEP."Plugin Builder", $mes->render() . $text); + $ns->tablerender(ADLAN_98.SEP.EPL_ADLAN_114, $mes->render() . $text); - // $var['lans']['text'] = "Plugin Language-file check"; + // $var['lans']['text'] = EPL_ADLAN_226; // $var['lans']['link'] = e_SELF."?mode=lans"; @@ -2317,7 +2320,7 @@ class pluginBuilder $text = $frm->open('newplugin-step3','post', e_SELF.'?mode=create&newplugin='.$newplug.'&createFiles='.$this->createFiles.'&step=3'); $text .= ""; @@ -2356,17 +2359,17 @@ class pluginBuilder $text .= "
".$frm->hidden('newplugin', $this->pluginName)." - ".$frm->admin_button('step', 3,'other','Generate')." + ".$frm->admin_button('step', 3,'other',EPL_ADLAN_111)."
"; $text .= $frm->close(); - $mes->addInfo("Review all fields and modify if necessary."); + $mes->addInfo(EPL_ADLAN_112); - $mes->addInfo("Review ALL tabs before clicking 'Generate'."); + $mes->addInfo(EPL_ADLAN_113); - $ns->tablerender(ADLAN_98.SEP."Plugin Builder".SEP."Step 2", $mes->render() . $text); + $ns->tablerender(ADLAN_98.SEP.EPL_ADLAN_114.SEP.EPL_ADLAN_115, $mes->render() . $text); } @@ -2377,22 +2380,22 @@ class pluginBuilder $text = ''; $options = array( - 'text' => "Text Box", - 'number' => "Text Box (number)", - 'url' => "Text Box (url)", - 'textarea' => "Text Area", - 'bbarea' => "Rich-Text Area", - 'boolean' => "True/False", - "method" => "Custom Function", - "image" => "Image", + 'text' => EPL_ADLAN_116, + 'number' => EPL_ADLAN_117, + 'url' => EPL_ADLAN_118, + 'textarea' => EPL_ADLAN_119, + 'bbarea' => EPL_ADLAN_120, + 'boolean' => EPL_ADLAN_121, + "method" => EPL_ADLAN_122, + "image" => EPL_ADLAN_123, - "dropdown" => "DropDown", - "userclass" => "DropDown (userclasses)", - "language" => "DropDown (languages)", + "dropdown" => EPL_ADLAN_124, + "userclass" => EPL_ADLAN_125, + "language" => EPL_ADLAN_126, - "icon" => "Icon", + "icon" => EPL_ADLAN_127, - "file" => "File", + "file" => EPL_ADLAN_128, ); @@ -2400,9 +2403,9 @@ class pluginBuilder for ($i=0; $i < 10; $i++) { $text .= "
". - $frm->text("pluginPrefs[".$i."][index]", '',40,'placeholder=Preference Name')." ". - $frm->text("pluginPrefs[".$i."][value]", '',40,'placeholder=Default Value')." ". - $frm->select("pluginPrefs[".$i."][type]", $options, '', 'class=null', 'Field Type...'). + $frm->text("pluginPrefs[".$i."][index]", '',40,'placeholder='.EPL_ADLAN_129)." ". + $frm->text("pluginPrefs[".$i."][value]", '',40,'placeholder='.EPL_ADLAN_130)." ". + $frm->select("pluginPrefs[".$i."][type]", $options, '', 'class=null', EPL_ADLAN_131). "
"; } @@ -2461,15 +2464,16 @@ class pluginBuilder if(file_put_contents(e_PLUGIN.$this->pluginName."/".$this->pluginName."_sql.php",$cont)) { - $mes->addInfo($this->pluginName."_sql.php as been generated",'default',true); + $info = str_replace('[file]', $this->pluginName."_sql.php", EPL_ADLAN_132); + $mes->addInfo($info,'default',true); $red = e107::getRedirect(); $red->redirect(e_REQUEST_URL,true); // $red->redirect(e_SELF."?mode=create&newplugin=".$this->pluginName."&createFiles=1&step=2",true); } else { - $msg = $this->pluginName."_sql.php is missing!
"; - $msg .= "Please create ".$this->pluginName."_sql.php in your plugin directory with the following content:
".$cont."
"; + $msg = str_replace('[file]', $this->pluginName."_sql.php", EPL_ADLAN_133)."
"; + $msg .= str_replace(array('[file]','[content]'), array($this->pluginName."_sql.php",$cont), EPL_ADLAN_134); $mes->addWarning($msg); } @@ -2536,14 +2540,14 @@ class pluginBuilder { case 'main-name': - $help = "The name of your plugin. (Must be written in English)"; + $help = EPL_ADLAN_135; $required = true; $pattern = "[A-Za-z0-9 -]*"; $xsize = 'medium'; break; case 'main-lang': - $help = "If you have a language file, enter the LAN_XXX value for the plugin's name"; + $help = EPL_ADLAN_136; $required = false; $placeholder= " "; $pattern = "[A-Z0-9_]*"; @@ -2551,7 +2555,7 @@ class pluginBuilder break; case 'main-date': - $help = "Creation date of your plugin"; + $help = EPL_ADLAN_137; $required = true; $xsize = 'medium'; break; @@ -2559,7 +2563,7 @@ class pluginBuilder case 'main-version': $default = '1.0'; $required = true; - $help = "The version of your plugin. Format: x.x"; + $help = EPL_ADLAN_138; $pattern = "^[\d]{1,2}\.[\d]{1,2}$"; $xsize = 'small'; break; @@ -2567,7 +2571,7 @@ class pluginBuilder case 'main-compatibility': $default = '2.0'; $required = true; - $help = "Compatible with this version of e107"; + $help = EPL_ADLAN_139; $pattern = "^[\d]{1,2}\.[\d]{1,2}$"; $xsize = 'small'; break; @@ -2575,14 +2579,14 @@ class pluginBuilder case 'author-name': $default = (vartrue($default)) ? $default : USERNAME; $required = true; - $help = "Author Name"; + $help = EPL_ADLAN_140; $pattern = "[A-Za-z \.0-9]*"; $xsize = 'medium'; break; case 'author-url': $required = true; - $help = "Author Website Url"; + $help = EPL_ADLAN_141; // $pattern = "https?://.+"; $xsize = 'medium'; break; @@ -2592,7 +2596,7 @@ class pluginBuilder //break; case 'summary-summary': - $help = "A short one-line description of the plugin
(Must be written in English)"; + $help = EPL_ADLAN_142."
".EPL_ADLAN_143; $required = true; $size = 100; $placeholder= " "; @@ -2602,7 +2606,7 @@ class pluginBuilder case 'keywords-one': case 'keywords-two': - $help = "Keyword/Tag for this plugin
(Must be written in English)"; + $help = EPL_ADLAN_144."
".EPL_ADLAN_143; $required = true; $size = 20; $placeholder= " "; @@ -2611,7 +2615,7 @@ class pluginBuilder break; case 'description-description': - $help = "A full description of the plugin
(Must be written in English)"; + $help = EPL_ADLAN_145."
".EPL_ADLAN_143; $required = true; $size = 100; $placeholder = " "; @@ -2621,7 +2625,7 @@ class pluginBuilder case 'category-category': - $help = "What category of plugin is this?"; + $help = EPL_ADLAN_146; $required = true; $size = 20; break; @@ -2649,14 +2653,14 @@ class pluginBuilder case 'category': $options = array( - 'settings' => 'settings', - 'users' => 'users', - 'content' => 'content', - 'tools' => 'tools', - 'manage' => 'manage', - 'misc' => 'misc', - 'menu' => 'menu', - 'about' => 'about' + 'settings' => EPL_ADLAN_147, + 'users' => EPL_ADLAN_148, + 'content' => EPL_ADLAN_149, + 'tools' => EPL_ADLAN_150, + 'manage' => EPL_ADLAN_151, + 'misc' => EPL_ADLAN_152, + 'menu' => EPL_ADLAN_153, + 'about' => EPL_ADLAN_154 ); $text = $frm->select($name, $options, $default,'required=1&class=null', true); @@ -2767,10 +2771,10 @@ TEMPLATE; { if(file_put_contents($path,$result) ) { - $mes->addSuccess("Saved: ".$path); + $mes->addSuccess(EPL_ADLAN_155." ".$path); } else { - $mes->addError("Couldn't Save: ".$path); + $mes->addError(EPL_ADLAN_156." ".$path); } } return htmlentities($result); @@ -2787,7 +2791,15 @@ TEMPLATE; { $frm = e107::getForm(); - $modes = array("main"=>"Main Area","cat"=>"Categories","other1"=>"Other 1","other2"=>"Other 2","other3"=>"Other 3","other4"=>"Other 4", 'exclude'=>'Exclude this table'); + $modes = array( + "main"=>EPL_ADLAN_157, + "cat"=>EPL_ADLAN_158, + "other1"=>EPL_ADLAN_159, + "other2"=>EPL_ADLAN_160, + "other3"=>EPL_ADLAN_161, + "other4"=>EPL_ADLAN_162, + 'exclude'=>EPL_ADLAN_163, + ); // echo "TABLE COUNT= ".$this->tableCount ; @@ -2828,19 +2840,19 @@ TEMPLATE; $text .= "
Build an admin-area and xml file for: ".EPL_ADLAN_107."
".$frm->open('createPlugin','get',e_SELF."?mode=create").$frm->select("newplugin",$newDir).$frm->admin_button('step', 2,'other','Go')."
".$frm->checkbox('createFiles',1,1,'Create Files').$frm->close()."
Check language files: ".EPL_ADLAN_108."
".$frm->open('checkPluginLangs','get',e_SELF."?mode=lans").$frm->select("newplugin",$lanDir).$frm->admin_button('step', 2,'other','Go')."
".$frm->close()."
- - - - - - - - - - - - - + + + + + + + + + + + + + @@ -2912,8 +2924,8 @@ TEMPLATE; case 'date': case 'datetime': $array = array( - 'text' => "Text Box", - "hidden" => "Hidden" + 'text' => EPL_ADLAN_179, + "hidden" => EPL_ADLAN_180 ); break; @@ -2922,47 +2934,47 @@ TEMPLATE; case 'bigint': case 'smallint': $array = array( - "boolean" => "True/False", - "number" => "Text Box (number)", - "dropdown" => "DropDown", - "userclass" => "DropDown (userclasses)", - "datestamp" => "Date", - "method" => "Custom Function", - "hidden" => "Hidden", - "user" => "User", + "boolean" => EPL_ADLAN_181, + "number" => EPL_ADLAN_182, + "dropdown" => EPL_ADLAN_183, + "userclass" => EPL_ADLAN_184, + "datestamp" => EPL_ADLAN_185, + "method" => EPL_ADLAN_186, + "hidden" => EPL_ADLAN_187, + "user" => EPL_ADLAN_188, ); break; case 'decimal': $array = array( - "number" => "Text Box", - "dropdown" => "DropDown", - "method" => "Custom Function", - "hidden" => "Hidden", + "number" => EPL_ADLAN_189, + "dropdown" => EPL_ADLAN_190, + "method" => EPL_ADLAN_191, + "hidden" => EPL_ADLAN_192, ); break; case 'varchar': case 'tinytext': $array = array( - 'text' => "Text Box", - "url" => "Text Box (url)", - "email" => "Text Box (email)", - "ip" => "Text Box (ip)", - "number" => "Text Box (number)", - "password" => "Text Box (password)", - "tags" => "Text Box (keywords)", + 'text' => EPL_ADLAN_193, + "url" => EPL_ADLAN_194, + "email" => EPL_ADLAN_195, + "ip" => EPL_ADLAN_196, + "number" => EPL_ADLAN_197, + "password" => EPL_ADLAN_198, + "tags" => EPL_ADLAN_199, - "dropdown" => "DropDown", - "userclass" => "DropDown (userclasses)", - "language" => "DropDown (languages)", + "dropdown" => EPL_ADLAN_200, + "userclass" => EPL_ADLAN_201, + "language" => EPL_ADLAN_202, - "icon" => "Icon", - "image" => "Image", - "file" => "File", - "method" => "Custom Function", + "icon" => EPL_ADLAN_203, + "image" => EPL_ADLAN_204, + "file" => EPL_ADLAN_205, + "method" => EPL_ADLAN_206, - "hidden" => "Hidden" + "hidden" => EPL_ADLAN_207 ); break; @@ -2970,14 +2982,14 @@ TEMPLATE; case 'mediumtext': case 'longtext': $array = array( - 'textarea' => "Text Area", - 'bbarea' => "Rich-Text Area", - 'text' => "Text Box", - "tags" => "Text Box (keywords)", - "method" => "Custom Function", - "image" => "Image (string)", - "images" => "Images (array)", - "hidden" => "Hidden" + 'textarea' => EPL_ADLAN_208, + 'bbarea' => EPL_ADLAN_209, + 'text' => EPL_ADLAN_210, + "tags" => EPL_ADLAN_211, + "method" => EPL_ADLAN_212, + "image" => EPL_ADLAN_213, + "images" => EPL_ADLAN_214, + "hidden" => EPL_ADLAN_215 ); break; } @@ -3595,21 +3607,22 @@ exit; { if(file_put_contents($generatedFile, $startPHP .$text . $endPHP)) { - $mes->addSuccess("Click Here to vist your generated admin area"); + $message = str_replace("[link]", "".EPL_ADLAN_216."", EPL_ADLAN_217); + $mes->addSuccess($message); } else { - $mes->addError("Could not write to ".$generatedFile); + $mes->addError(str_replace('[file]', $generatedFile, EPL_ADLAN_218); } } else { - $mes->addInfo("No Files have been created. Please Copy & Paste the code below into your files. "); + $mes->addInfo(EPL_ADLAN_219); } echo $mes->render(); - $ns->tablerender(ADLAN_98.SEP."Plugin Builder".SEP." plugin.xml", "
".$xmlText."
"); + $ns->tablerender(ADLAN_98.SEP.EPL_ADLAN_114.SEP." plugin.xml", "
".$xmlText."
"); $ns->tablerender("admin_config.php", "
".$text."
"); diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 6ed0c1209..6149b7ed1 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -286,6 +286,9 @@ define("LAN_DISABLED","Disabled"); define("LAN_ENABLED", "Enabled"); define("LAN_BOOL_REVERSE", "Invert"); +define("LAN_NOT_AVAILABLE","Not available"); +define("LAN_AUTO_GENERATED","Auto-generated"); + define("LAN_PRESET_CONFIRMSAVE","Save current form values as the default for this page?"); define("LAN_CONFIGURE", "Configure"); diff --git a/e107_languages/English/admin/lan_links.php b/e107_languages/English/admin/lan_links.php index 672f39772..ceaaf2b90 100644 --- a/e107_languages/English/admin/lan_links.php +++ b/e107_languages/English/admin/lan_links.php @@ -57,6 +57,15 @@ define("LCLAN_81", "Sub-menus will display only after clicking their parent. (Li // define("LCLAN_102", "New 600x400"); // define("LCLAN_103", "New 800x600"); +define("LCLAN_104", "Sublink of"); +define("LCLAN_105", "Function"); +define("LCLAN_106", "Owned by"); +define("LCLAN_107", "Enable to override URL with a dynamically created Search-Engine-Friendly URL"); +define("LCLAN_108", "Some selections omitted - you can't set Link as a Sublink of its Sublink."); +define("LCLAN_109", "Please choose a parent"); +define("LCLAN_110", "Please choose a generator module"); +define("LCLAN_111", "Not valid generator module data"); + define("LINKLAN_1", "Opens in 800x600 window"); // define("LINKLAN_2", "Parent"); // define("LINKLAN_3", "No Parent (Normal Link)"); diff --git a/e107_languages/English/admin/lan_menus.php b/e107_languages/English/admin/lan_menus.php index 479e592f7..02d0f96dc 100644 --- a/e107_languages/English/admin/lan_menus.php +++ b/e107_languages/English/admin/lan_menus.php @@ -34,9 +34,9 @@ define("MENLAN_23", "Move to bottom"); define("MENLAN_24", "Move to top"); define("MENLAN_25", "Action..."); -define("MENLAN_26", "This menu will only be SHOWN on the following pages"); //FIXME HTML -define("MENLAN_27", "This menu will only be HIDDEN on the following pages"); //FIXME HTML -define("MENLAN_28", "Enter one page per line, enter enough of the url to distinguish it properly. If you need the ending of the url to match exactly, use a ! at the end of the page name
For example: page.php?1!"); //FIXME HTML +define("MENLAN_26", "This menu will only be [b]SHOWN[/b] on the following pages"); +define("MENLAN_27", "This menu will only be [b]HIDDEN[/b] on the following pages"); +define("MENLAN_28", "Enter one page per line, enter enough of the url to distinguish it properly. If you need the ending of the url to match exactly, use a ! at the end of the page name. For example: [b]page.php?1![/b]"); define("MENLAN_29", "Select Layout"); define("MENLAN_30", "To see the menu areas and their positions for custom layouts, select the custom layout here."); @@ -57,6 +57,12 @@ define("MENLAN_41", "The position of all your menus for this layout will be lost define("MENLAN_42", "Custom"); define("MENLAN_43", "Menu Preset Activated"); - +define("MENLAN_44", "Menu parameters"); +define("MENLAN_45", "Parameters (query string format):"); +define("MENLAN_46", "Custom"); +define("MENLAN_47", "Custom"); +define("MENLAN_48", "Custom"); +define("MENLAN_49", "Custom"); +define("MENLAN_50", "Custom"); ?> \ No newline at end of file diff --git a/e107_languages/English/admin/lan_plugin.php b/e107_languages/English/admin/lan_plugin.php index 2a5371df4..448c5e20f 100644 --- a/e107_languages/English/admin/lan_plugin.php +++ b/e107_languages/English/admin/lan_plugin.php @@ -104,6 +104,170 @@ define ('EPL_ADLAN_85','Uninstall Selected'); define ('EPL_ADLAN_86','All files removed from '); define ('EPL_ADLAN_87','File deletion failed '); +define ('EPL_ADLAN_88','Made for v2'); +define ('EPL_ADLAN_89','Search Online'); +define ('EPL_ADLAN_90','cURL is currently required to use this feature. Contact your webhosting provider to enable cURL'); +define ('EPL_ADLAN_91','Featured'); +define ('EPL_ADLAN_92','Buy'); +define ('EPL_ADLAN_93','Free'); +define ('EPL_ADLAN_94','Connecting...'); +define ('EPL_ADLAN_95','Unable to continue'); +define ('EPL_ADLAN_96','eg. http://website.com/some-plugin.zip'); +define ('EPL_ADLAN_97','There was a problem extracting the .zip file to your plugin directory.'); +define ('EPL_ADLAN_98','Unknown file:'); +define ('EPL_ADLAN_99','Error messages above this line'); +define ('EPL_ADLAN_100','click here to install some'); +define ('EPL_ADLAN_101','No plugins installed - [link].'); +define ('EPL_ADLAN_102','This Wizard will build an admin area for your plugin and generate a plugin.xml meta file. Before you start:'); +define ('EPL_ADLAN_103','Create a new writable folder in the [e_PLUGIN] directory eg. [b]myplugin[/b]'); +define ('EPL_ADLAN_104','If your plugin will use sql tables, create a new file in this folder and name it the same as the directory but with [b]_sql.php[/b] as a sufix eg. [b]myplugin_sql.php[/b]'); +define ('EPL_ADLAN_105','Create your table in phpMyAdmin and paste an sql dump of it into your file and save. (see [i]e107_plugins/_blank/_blank_sql.php[/i] for an example)'); +define ('EPL_ADLAN_106','Select your plugin\'s folder to begin.'); +define ('EPL_ADLAN_107','Build an admin-area and xml file for:'); +define ('EPL_ADLAN_108','Check language files:'); +define ('EPL_ADLAN_109','Basic Info.'); +define ('EPL_ADLAN_110','Preferences'); +define ('EPL_ADLAN_111','Generate'); +define ('EPL_ADLAN_112','Review all fields and modify if necessary.'); +define ('EPL_ADLAN_113','Review ALL tabs before clicking "Generate".'); +define ('EPL_ADLAN_114','Plugin Builder'); +define ('EPL_ADLAN_115','Step 2'); + +define ('EPL_ADLAN_116','Text Box'); +define ('EPL_ADLAN_117','Text Box (number)'); +define ('EPL_ADLAN_118','Text Box (url)'); +define ('EPL_ADLAN_119','Text Area'); +define ('EPL_ADLAN_120','Rich-Text Area'); +define ('EPL_ADLAN_121','True/False'); +define ('EPL_ADLAN_122','Custom Function'); +define ('EPL_ADLAN_123','Image'); +define ('EPL_ADLAN_124','DropDown'); +define ('EPL_ADLAN_125','DropDown (userclasses)'); +define ('EPL_ADLAN_126','DropDown (languages)'); +define ('EPL_ADLAN_127','Icon'); +define ('EPL_ADLAN_128','File'); + +define ('EPL_ADLAN_129','Preference Name'); +define ('EPL_ADLAN_130','Default Value'); +define ('EPL_ADLAN_131','Field Type...'); +define ('EPL_ADLAN_132','[file] has been generated'); +define ('EPL_ADLAN_133','[file] is missing!'); +define ('EPL_ADLAN_134','Please create [b][file][/b] in your plugin directory with the following content: [content]'); +define ('EPL_ADLAN_135','The name of your plugin. (Must be written in English)'); +define ('EPL_ADLAN_136','If you have a language file, enter the LAN_XXX value for the plugin\'s name'); +define ('EPL_ADLAN_137','Creation date of your plugin'); +define ('EPL_ADLAN_138','The version of your plugin. Format: x.x'); +define ('EPL_ADLAN_139','Compatible with this version of e107'); +define ('EPL_ADLAN_140','Author Name'); +define ('EPL_ADLAN_141','Author Website URL'); +define ('EPL_ADLAN_142','A short one-line description of the plugin'); +define ('EPL_ADLAN_143','(Must be written in English)'); +define ('EPL_ADLAN_144','Keyword/Tag for this plugin'); +define ('EPL_ADLAN_145','A full description of the plugin'); +define ('EPL_ADLAN_146','What category of plugin is this?'); + +// Categories +define ('EPL_ADLAN_147','settings'); +define ('EPL_ADLAN_148','users'); +define ('EPL_ADLAN_149','content'); +define ('EPL_ADLAN_150','tools'); +define ('EPL_ADLAN_151','manage'); +define ('EPL_ADLAN_152','misc'); +define ('EPL_ADLAN_153','menu'); +define ('EPL_ADLAN_154','about'); + +define ('EPL_ADLAN_155','Saved:'); +define ('EPL_ADLAN_156','Couldn\'t Save:'); + +define ('EPL_ADLAN_157','Main Area'); +define ('EPL_ADLAN_158','Categories'); +define ('EPL_ADLAN_159','Other 1'); +define ('EPL_ADLAN_160','Other 2'); +define ('EPL_ADLAN_161','Other 3'); +define ('EPL_ADLAN_162','Other 4'); +define ('EPL_ADLAN_163','Exclude this table'); + +define ('EPL_ADLAN_164','Field'); +define ('EPL_ADLAN_165','Caption'); +define ('EPL_ADLAN_166','Type'); +define ('EPL_ADLAN_167','Data'); +define ('EPL_ADLAN_168','Width'); +define ('EPL_ADLAN_169','Batch'); +define ('EPL_ADLAN_170','Filter'); +define ('EPL_ADLAN_171','Inline'); +define ('EPL_ADLAN_172','Validate'); +define ('EPL_ADLAN_173','Display'); +define ('EPL_ADLAN_174','HelpTip'); +define ('EPL_ADLAN_175','ReadParms'); +define ('EPL_ADLAN_176','WriteParms'); +define ('EPL_ADLAN_177','Field is required to be filled'); +define ('EPL_ADLAN_178','Displayed by Default'); + +// date, datetime +define ('EPL_ADLAN_179','Text Box'); +define ('EPL_ADLAN_180','Hidden'); + +// int, tinyint, bigint, smallint +define ('EPL_ADLAN_181','True/False'); +define ('EPL_ADLAN_182','Text Box (number)'); +define ('EPL_ADLAN_183','DropDown'); +define ('EPL_ADLAN_184','DropDown (userclasses)'); +define ('EPL_ADLAN_185','Date'); +define ('EPL_ADLAN_186','Custom Function'); +define ('EPL_ADLAN_187','Hidden'); +define ('EPL_ADLAN_188','User'); + +// decimal +define ('EPL_ADLAN_189','Text Box'); +define ('EPL_ADLAN_190','DropDown'); +define ('EPL_ADLAN_191','Custom Function'); +define ('EPL_ADLAN_192','Hidden'); + +// varchar, tinytext +define ('EPL_ADLAN_193','Text Box'); +define ('EPL_ADLAN_194','Text Box (url)'); +define ('EPL_ADLAN_195','Text Box (email)'); +define ('EPL_ADLAN_196','Text Box (ip)'); +define ('EPL_ADLAN_197','Text Box (number)'); +define ('EPL_ADLAN_198','Text Box (password)'); +define ('EPL_ADLAN_199','Text Box (keywords)'); +define ('EPL_ADLAN_200','DropDown'); +define ('EPL_ADLAN_201','DropDown (userclasses)'); +define ('EPL_ADLAN_202','DropDown (languages)'); +define ('EPL_ADLAN_203','Icon'); +define ('EPL_ADLAN_204','Image'); +define ('EPL_ADLAN_205','File'); +define ('EPL_ADLAN_206','Custom Function'); +define ('EPL_ADLAN_207','Hidden'); + +// text, mediumtext, longtext +define ('EPL_ADLAN_208','Text Area'); +define ('EPL_ADLAN_209','Rich-Text Area'); +define ('EPL_ADLAN_210','Text Box'); +define ('EPL_ADLAN_211','Text Box (keywords)'); +define ('EPL_ADLAN_212','Custom Function'); +define ('EPL_ADLAN_213','Image (string)'); +define ('EPL_ADLAN_214','Images (array)'); +define ('EPL_ADLAN_215','Hidden'); + +define ('EPL_ADLAN_216','Click Here'); +define ('EPL_ADLAN_217','[link] to vist your generated admin area'); +define ('EPL_ADLAN_218','Could not write to [file]'); +define ('EPL_ADLAN_219','No Files have been created. Please Copy & Paste the code below into your files.'); + +define ('EPL_ADLAN_220','Find Plugins'); +define ('EPL_ADLAN_221','Language-File Check'); + +define ('EPL_ADLAN_222','Plugin Files'); +define ('EPL_ADLAN_223','Used'); +define ('EPL_ADLAN_224','Unused'); +define ('EPL_ADLAN_225','Unsure'); + +define ('EPL_ADLAN_226','Plugin Language-File Check'); + +define ('EPL_ADLAN_227','Scan for Changes'); +define ('EPL_ADLAN_228','Plugin folders are scanned every [interval] minutes for changes. Click the button below to scan now.'); +define ('EPL_ADLAN_229','Refresh'); define('LAN_UPGRADE_SUCCESSFUL', 'Upgrade Successful'); define('LAN_INSTALL_SUCCESSFUL', 'Installation Successful'); From e809a4f3aa12c2bb00c595988d1a2f8f7226130d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Fri, 1 May 2015 17:56:45 +0200 Subject: [PATCH 5/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_languages/English/admin/lan_menus.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/e107_languages/English/admin/lan_menus.php b/e107_languages/English/admin/lan_menus.php index 02d0f96dc..ae5f2513d 100644 --- a/e107_languages/English/admin/lan_menus.php +++ b/e107_languages/English/admin/lan_menus.php @@ -59,10 +59,5 @@ define("MENLAN_43", "Menu Preset Activated"); define("MENLAN_44", "Menu parameters"); define("MENLAN_45", "Parameters (query string format):"); -define("MENLAN_46", "Custom"); -define("MENLAN_47", "Custom"); -define("MENLAN_48", "Custom"); -define("MENLAN_49", "Custom"); -define("MENLAN_50", "Custom"); ?> \ No newline at end of file From 4b3062d0fa9e8e32fb702322c74f9aa5dbf9b162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sat, 2 May 2015 09:55:47 +0200 Subject: [PATCH 6/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_admin/cron.php | 6 +- e107_admin/db.php | 134 +++++++++++----------- e107_languages/English/admin/lan_cron.php | 2 + e107_languages/English/admin/lan_db.php | 59 ++++++++++ e107_languages/English/lan_installer.php | 6 +- 5 files changed, 134 insertions(+), 73 deletions(-) diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 1a0c6fd27..9b9a37f7a 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -442,7 +442,8 @@ class cron_admin_ui extends e_admin_ui $obj = new $class_name; if (method_exists($obj, $method_name)) { - $mes->add("Executing config function ".$class_name." : ".$method_name."()", E_MESSAGE_DEBUG); + $message = str_replace('[function]', $class_name." : ".$method_name, LAN_CRON_55); + $mes->add($message, E_MESSAGE_DEBUG); if ($return == 'boolean') { call_user_func(array($obj, $method_name)); @@ -455,7 +456,8 @@ class cron_admin_ui extends e_admin_ui } else { - $mes->add("Config function ".$method_name."() NOT found.", E_MESSAGE_DEBUG); + $message = str_replace('[method]', $method_name."()", LAN_CRON_56); + $mes->add($message, E_MESSAGE_DEBUG); } } return FALSE; diff --git a/e107_admin/db.php b/e107_admin/db.php index a140125d7..42b49246f 100644 --- a/e107_admin/db.php +++ b/e107_admin/db.php @@ -104,15 +104,15 @@ if(e_AJAX_REQUEST ) $zip = e107::getFile()->zip($data, e_BACKUP.$newFile.".zip"); - echo "File backup complete! (".$zip.")
"; + echo DBLAN_60." (".$zip.")
"; - echo "Starting database backup...
"; + echo DBLAN_61."
"; $dbfile = e107::getDb()->backup('*', $newFile.".sql", array('nologs'=>1, 'droptable'=>1)); - echo "Database backup complete! (".$dbfile.")"; + echo DBLAN_62." (".$dbfile.")"; - e107::getAdminLog()->addSuccess($zip." ".$dbfile, false)->save('Full site backup completed.'); + e107::getAdminLog()->addSuccess($zip." ".$dbfile, false)->save(DBLAN_63); } @@ -175,9 +175,9 @@ class system_tools 'importForm' => array('diz'=>DBLAN_59, 'label'=> DBLAN_59), 'exportForm' => array('diz'=>DBLAN_58, 'label'=> DBLAN_58), 'sc_override_scan' => array('diz'=>DBLAN_55, 'label'=> DBLAN_56), - 'convert_to_utf8' => array('diz'=>'Check Database Charset','label'=>'Check Charset'), - 'correct_perms' => array('diz'=>'Correct File and Directory permissions','label'=>'Correct Perms'), - 'backup' => array('diz'=>'Backup Database, Files and Folders','label'=>'Backup Site') + 'convert_to_utf8' => array('diz'=>DBLAN_64,'label'=>DBLAN_65), + 'correct_perms' => array('diz'=>DBLAN_66,'label'=>DBLAN_67), + 'backup' => array('diz'=>DBLAN_68,'label'=>DBLAN_69) ); if(vartrue($_SERVER['E_DEV'])) @@ -307,8 +307,8 @@ class system_tools $mes = e107::getMessage(); - $message = "This will create a database dump and a zipped backup of all non-core plugins, your site theme, your media files and system logs"; - $message .= "
".LAN_CREATE.""; + $message = DBLAN_70; + $message .= "
".LAN_CREATE.""; $mes->addInfo($message); @@ -339,10 +339,10 @@ class system_tools } else { - $mes->addSuccess("Folder and File permissions have been updated"); + $mes->addSuccess(DBLAN_72); } - e107::getRender()->tablerender(DBLAN_10.SEP."Correcting File and Directory Permissions", $mes->render()); + e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_73, $mes->render()); } @@ -359,14 +359,14 @@ class system_tools if($connect = $sql->connect($server,$user, $pass, true)) { - $mes->addSuccess("Connecting to server"); + $mes->addSuccess(DBLAN_74); if(vartrue($_POST['createdb'])) { if($sql->gen("CREATE DATABASE ".$database." CHARACTER SET `utf8`")) { - $mes->addSuccess("Creating Database"); + $mes->addSuccess(DBLAN_75); // $sql->gen("CREATE USER ".$user."@'".$server."' IDENTIFIED BY '".$pass."';"); $sql->gen("GRANT ALL ON `".$database."`.* TO ".$user."@'".$server."';"); @@ -374,17 +374,17 @@ class system_tools } else { - $mes->addError("Creating Database"); + $mes->addError(DBLAN_75); return; } } if(!$sql->database($database)) { - $mes->addError("Selecting database"); + $mes->addError(DBLAN_76); } - $mes->addSuccess("Selecting database"); + $mes->addSuccess(DBLAN_76); if($this->multiSiteCreateTables($sql, $prefix)) { @@ -396,7 +396,7 @@ class system_tools } else { - $mes->addSuccess("Connecting to server"); + $mes->addSuccess(DBLAN_74); } if($error = $sql->getLastErrorText()) @@ -418,7 +418,7 @@ class system_tools if (!$sql_data) { - $mes->addError("Couldn't read core sql file"); + $mes->addError(DBLAN_77); } preg_match_all("/create(.*?)(?:myisam|innodb);/si", $sql_data, $result ); @@ -455,16 +455,17 @@ class system_tools if(!isset($POST['create_multisite'])) { - $mes->addInfo("This will create a fresh installation of e107 at the domain you specify. Using your server administration software (eg. cPanel) - park your other domain on top of ".e_DOMAIN); + $info = str_replace('[domain]', e_DOMAIN, LANINS_133); + $mes->addInfo($info); } $text = $frm->open('multisite')."
FieldCaptionTypeDataWidthBatchFilterInlineValidateDisplayHelpTipReadParmsWriteParms".EPL_ADLAN_164."".EPL_ADLAN_165."".EPL_ADLAN_166."".EPL_ADLAN_167."".EPL_ADLAN_168."".EPL_ADLAN_169."".EPL_ADLAN_170."".EPL_ADLAN_171."".EPL_ADLAN_172."".EPL_ADLAN_173."".EPL_ADLAN_174."".EPL_ADLAN_175."".EPL_ADLAN_176."
- + "; @@ -597,10 +598,10 @@ class system_tools - - - - + + + + "; @@ -636,29 +637,27 @@ class system_tools if($invalidCollations == true) { - //TODO LAN - $message = ' - This function will permanently modify all tables in your database. ('.$config['mySQLdefaultdb'].')
- It is HIGHLY recommended that you first backup your database and switch your site into maintenance mode. -
-
- Please note: -
    -
  • The conversion process can take up to one minute or much much more depending on the size of your database.
  • -
  • The conversion does not work with serialized arrays.
  • -
  • Be sure that you have followed all steps of the upgrade process first.
  • -
  • Core prefs are ignored during the conversion process due to possibility of corruption.
  • -
- '; - + $message = str_replace('[database]', $config['mySQLdefaultdb'], DBLAN_82); + $message .= '
'; + $message .= DBLAN_83; + $message .= '
'; + $message .= '
'; + $message .= DBLAN_84; + $message .= '
    '; + $message .= '
  • '.DBLAN_85.'
  • '; + $message .= '
  • '.DBLAN_86.'
  • '; + $message .= '
  • '.DBLAN_87.'
  • '; + $message .= '
  • '.DBLAN_88.'
  • '; + $message .= '
'; + $mes->add($message, E_MESSAGE_WARNING); $text .= "
- "."Convert Database"." + ".DBLAN_89."
- ".$frm->admin_button('perform_utf8_convert', "Convert non-UTF8 Tables",false,"Convert non-UTF8 Tables",'class=btn-success&data-loading-text=Please wait...')." + ".$frm->admin_button('perform_utf8_convert', DBLAN_90,false,DBLAN_90,'class=btn-success&data-loading-text='.DBLAN_91)."
"; @@ -666,7 +665,7 @@ class system_tools } else { - $mes->addSuccess("Your tables are using the correct character set."); + $mes->addSuccess(DBLAN_92); } @@ -788,11 +787,11 @@ class system_tools } elseif($ERROR != TRUE) { - $message = "Database Converted successfully to UTF-8. "; + $message = DBLAN_93; //$message .= "
Please now add the following line to your e107_config.php file:
\$mySQLcharset = 'utf8';"; $mes->add($message, E_MESSAGE_SUCCESS); - $mes->addSuccess("Please make sure you have the following line in your e107_config.php file:"); + $mes->addSuccess(DBLAN_94); $mes->addSuccess('$mySQLcharset = "utf8";'); } @@ -1004,12 +1003,9 @@ class system_tools $mes = e107::getMessage(); $frm = e107::getSingleton('e_form'); - - //TODO LANs - $text = "
- Export Options + ".DBLAN_95."
- - The parked domain which will become a new e107 website. + + ".LANINS_131."
TableEngineCollationStatus".DBLAN_78."".DBLAN_79."".DBLAN_80."".DBLAN_81."
@@ -1017,8 +1013,8 @@ class system_tools - - + + @@ -1053,8 +1049,8 @@ class system_tools - - + + @@ -1067,7 +1063,7 @@ class system_tools $checked = (vartrue($_POST['xml_tables'][$name]) == $name) ? 1: 0; $text .= ""; @@ -1092,7 +1088,7 @@ class system_tools @@ -1100,13 +1096,13 @@ class system_tools
".$frm->checkbox_toggle('check-all-verify', 'xml_prefs')." PreferencesRows".$frm->checkbox_toggle('check-all-verify', 'xml_prefs')." ".DBLAN_96."".DBLAN_98."
".$frm->checkbox_toggle('check-all-verify', 'xml_tables')."TablesRows".$frm->checkbox_toggle('check-all-verify', 'xml_tables').DBLAN_97."".DBLAN_98."
- ".$frm->checkbox("xml_tables[".$name."]", $name, $checked, array('label'=>"Table Data: ".$name)). + ".$frm->checkbox("xml_tables[".$name."]", $name, $checked, array('label'=>DBLAN_99." ".$name)). " $count
"; $checked = (vartrue($_POST['package_images'])) ? 1: 0; - $text .= $frm->checkbox("package_images",'package_images', $checked)." Convert paths and package images and xml into: ".e107::getParser()->replaceConstants(EXPORT_PATH)." + $text .= $frm->checkbox("package_images",'package_images', $checked)." ".DBLAN_100." ".e107::getParser()->replaceConstants(EXPORT_PATH)."
- ".$frm->admin_button('exportXmlFile', "Export File", 'other')." + ".$frm->admin_button('exportXmlFile', DBLAN_101, 'other')."
"; - e107::getRender()->tablerender(DBLAN_10.SEP."Export Options",$mes->render(). $text); + e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_102,$mes->render(). $text); } @@ -1121,12 +1117,12 @@ class system_tools foreach($ret['success'] as $table) { - e107::getMessage()->addSuccess("Inserted $table"); + e107::getMessage()->addSuccess(DBLAN_103." $table"); } foreach($ret['failed'] as $table) { - e107::getMessage()->addError("Failed to Insert $table"); + e107::getMessage()->addError(DBLAN_104." $table"); } } @@ -1279,12 +1275,11 @@ class system_tools //$pref['sc_override'] = $scList; //save_prefs(); // $mes->add(DBLAN_57.':
'.$pref['sc_override'], E_MESSAGE_SUCCESS); - // FIXME lan e107::getRender()->tablerender( ''.DBLAN_56, DBLAN_57.': ' - .($config->get('sc_override') ? '
'.$config->get('sc_override') : '(empty)') - .'

Batch shortcodes:' - .($config->get('sc_batch_override') ? '
'.$config->get('sc_batch_override') : '(empty)') + .($config->get('sc_override') ? '
'.$config->get('sc_override') : DBLAN_106) + .'

'.DBLAN_105.'' + .($config->get('sc_batch_override') ? '
'.$config->get('sc_batch_override') : DBLAN_106) ); } @@ -1457,8 +1452,6 @@ function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE) $tp = e107::getParser(); $mes = e107::getMessage(); - //TODO LANs - if(vartrue($package)) { @@ -1473,7 +1466,8 @@ function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE) if(!is_writable($desinationFolder)) { - $mes->add($desinationFolder." is not writable", E_MESSAGE_ERROR); + $message = str_replace('[folder]', $desinationFolder, DBLAN_107); + $mes->add($message, E_MESSAGE_ERROR); return ; } } @@ -1481,7 +1475,7 @@ function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE) if($xml->e107Export($prefs,$tables,$debug)) { - $mes->add("Created: ".$desinationFolder."install.xml", E_MESSAGE_SUCCESS); + $mes->add(DBLAN_108." ".$desinationFolder."install.xml", E_MESSAGE_SUCCESS); if(varset($xml->fileConvertLog)) { foreach($xml->fileConvertLog as $oldfile) @@ -1490,11 +1484,11 @@ function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE) $newfile = $desinationFolder.$file; if($oldfile == $newfile || (copy($oldfile,$newfile))) { - $mes->add("Copied: ".$newfile, E_MESSAGE_SUCCESS); + $mes->add(DBLAN_109." ".$newfile, E_MESSAGE_SUCCESS); } else { - $mes->add("Couldn't copy: ".$newfile, E_MESSAGE_ERROR); + $mes->add(DBLAN_110." ".$newfile, E_MESSAGE_ERROR); } } } diff --git a/e107_languages/English/admin/lan_cron.php b/e107_languages/English/admin/lan_cron.php index c8d2a4d9b..95c84fd57 100644 --- a/e107_languages/English/admin/lan_cron.php +++ b/e107_languages/English/admin/lan_cron.php @@ -88,6 +88,8 @@ define("LAN_CRON_52", "Day(s):"); define("LAN_CRON_53", "Month(s):"); define("LAN_CRON_54", "Weekday(s):"); +define("LAN_CRON_55", "Executing config function [b][function][/b]"); +define("LAN_CRON_56", "Config function [b][method][/b] NOT found."); define("LAN_CRON_BACKUP", "Backup"); define("LAN_CRON_LOGGING", "Logging"); diff --git a/e107_languages/English/admin/lan_db.php b/e107_languages/English/admin/lan_db.php index 81d63ecd0..36d6cf364 100644 --- a/e107_languages/English/admin/lan_db.php +++ b/e107_languages/English/admin/lan_db.php @@ -70,4 +70,63 @@ define('DBLAN_57', 'Shortcode Override list set to'); define('DBLAN_58', "Export Site Data"); define('DBLAN_59', "Import Site Data"); +define('DBLAN_60', "File backup complete!"); +define('DBLAN_61', "Starting database backup..."); +define('DBLAN_62', "Database backup complete!"); +define('DBLAN_63', "Full site backup completed."); + +define('DBLAN_64', "Check Database Charset"); +define('DBLAN_65', "Check Charset"); +define('DBLAN_66', "Correct File and Directory permissions"); +define('DBLAN_67', "Correct Perms"); +define('DBLAN_68', "Backup Database, Files and Folders"); +define('DBLAN_69', "Backup Site"); + +define('DBLAN_70', "This will create a database dump and a zipped backup of all non-core plugins, your site theme, your media files and system logs"); +define('DBLAN_71', "Please wait..."); +define('DBLAN_72', "Folder and File permissions have been updated"); +define('DBLAN_73', "Correcting File and Directory Permissions"); +define('DBLAN_74', "Connecting to server"); +define('DBLAN_75', "Creating Database"); +define('DBLAN_76', "Selecting database"); +define('DBLAN_77', "Couldn't read core sql file"); + +define('DBLAN_78', "Table"); +define('DBLAN_79', "Engine"); +define('DBLAN_80', "Collation"); +define('DBLAN_81', "Status"); + +define('DBLAN_82', "This function will permanently modify all tables in your database. ([database])"); +define('DBLAN_83', "It is [b]HIGHLY[/b] recommended that you first backup your database and switch your site into maintenance mode."); +define('DBLAN_84', "Please note:"); +define('DBLAN_85', "The conversion process can take up to one minute or much much more depending on the size of your database."); +define('DBLAN_86', "The conversion does not work with serialized arrays."); +define('DBLAN_87', "Be sure that you have followed all steps of the upgrade process first."); +define('DBLAN_88', "Core prefs are ignored during the conversion process due to possibility of corruption."); + +define('DBLAN_89', "Convert Database"); +define('DBLAN_90', "Convert non-UTF8 Tables"); +define('DBLAN_91', "Please wait..."); +define('DBLAN_92', "Your tables are using the correct character set."); +define('DBLAN_93', "Database Converted successfully to UTF-8."); +define('DBLAN_94', "Please make sure you have the following line in your e107_config.php file:"); + +define('DBLAN_95', "Export Options"); +define('DBLAN_96', "Preferences"); +define('DBLAN_97', "Tables"); +define('DBLAN_98', "Rows"); +define('DBLAN_99', "Table Data:"); +define('DBLAN_100', "Convert paths and package images and xml into:"); +define('DBLAN_101', "Export File"); +define('DBLAN_102', "Export Options"); +define('DBLAN_103', "Inserted"); +define('DBLAN_104', "Failed to Insert"); +define('DBLAN_105', "Batch shortcodes:"); +define('DBLAN_106', "(empty)"); + +define('DBLAN_107', "[folder] is not writable"); +define('DBLAN_108', "Created:"); +define('DBLAN_109', "Copied:"); +define('DBLAN_110', "Couldn't copy:"); + ?> diff --git a/e107_languages/English/lan_installer.php b/e107_languages/English/lan_installer.php index e06265157..fa66bedeb 100644 --- a/e107_languages/English/lan_installer.php +++ b/e107_languages/English/lan_installer.php @@ -185,4 +185,8 @@ define("LANINS_126", "For security reasons you should now set the file permissio define("LANINS_127", "The database [x] already exists. Overwrite it? (any existing data will be lost)"); define("LANINS_128", "Overwrite"); define("LANINS_129", "Database not found."); - + +define('LANINS_130', "Parked Domain"); +define('LANINS_131', "The parked domain which will become a new e107 website."); +define('LANINS_132', "mydomain.com"); +define('LANINS_133', "This will create a fresh installation of e107 at the domain you specify. Using your server administration software (eg. cPanel) - park your other domain on top of [domain]"); From 4296e9d7a9f0e3aff071f227ad06a57349dce58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sat, 2 May 2015 15:57:07 +0200 Subject: [PATCH 7/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_admin/newspost.php | 70 +++++++++---------- e107_languages/English/admin/lan_admin.php | 5 +- e107_languages/English/admin/lan_newspost.php | 34 +++++++++ 3 files changed, 73 insertions(+), 36 deletions(-) diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index fa211b8f7..257588a3b 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -51,9 +51,9 @@ class news_admin extends e_admin_dispatcher 'main/create' => array('caption'=> NWSLAN_45, 'perm' => 'H'), // Create/Edit News Item // 'cat/list' => array('caption'=> NWSLAN_46, 'perm' => '7'), // Category List 'cat/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'H'), // Create Category. - 'cat/create' => array('caption'=> "Create Category", 'perm' => 'H'), // Category List + 'cat/create' => array('caption'=> LAN_NEWS_63, 'perm' => 'H'), // Category List 'main/settings' => array('caption'=> LAN_PREFS, 'perm' => '0'), // Preferences - // 'main/submitted' => array('caption'=> "Old Submitted ", 'perm' => 'N'), // Submitted News + // 'main/submitted' => array('caption'=> LAN_NEWS_64, 'perm' => 'N'), // Submitted News 'sub/list' => array('caption'=> NWSLAN_47, 'perm' => 'N'), // Submitted News // 'main/maint' => array('caption'=> LAN_NEWS_55, 'perm' => '0') // Maintenance ); @@ -90,7 +90,7 @@ class news_cat_ui extends e_admin_ui 'category_meta_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left','readParms' => 'expand=...&truncate=150&bb=1', 'readonly'=>FALSE), 'category_meta_keywords' => array('title'=> LAN_KEYWORDS, 'type' => 'tags', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), 'category_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'inline'=>true, 'width' => 'auto', 'readonly'=>FALSE), // Display name - 'category_manager' => array('title'=> "Manage Permissions",'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE), + 'category_manager' => array('title'=> LAN_MANAGER,'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE), 'category_order' => array('title'=> LAN_ORDER, 'type' => 'text', 'width' => 'auto', 'thclass' => 'right', 'class'=> 'right' ), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center', 'sort' => true) ); @@ -124,7 +124,7 @@ class news_cat_ui extends e_admin_ui if(e107::getDb()->count('news_category', '(*)', "category_sef='{$sef}'")) { - e107::getMessage()->addError('Please choose unique SEF URL string for this category'); + e107::getMessage()->addError(LAN_NEWS_65); return false; } @@ -147,7 +147,7 @@ class news_cat_ui extends e_admin_ui $sef = e107::getParser()->toDB($new_data['category_sef']); if(e107::getDb()->count('news_category', '(*)', "category_sef='{$sef}' AND category_id!=".intval($id))) { - e107::getMessage()->addError('Please choose unique SEF URL string for this category'); + e107::getMessage()->addError(LAN_NEWS_66); return false; } return $new_data; @@ -191,7 +191,7 @@ class news_sub_ui extends e_admin_ui 'submitnews_category' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), // 'submitnews_item' => array('title'=> LAN_DESCRIPTION, 'type' => 'method', 'width' => 'auto', 'thclass' => 'left','readParms' => 'expand=...&truncate=150&bb=1', 'readonly'=>TRUE), 'submitnews_name' => array('title'=> LAN_AUTHOR, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>TRUE), - 'submitnews_ip' => array('title'=> "IP", 'type' => 'ip', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>TRUE), + 'submitnews_ip' => array('title'=> LAN_IP, 'type' => 'ip', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>TRUE), 'submitnews_auth' => array('title'=> " ", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'class'=> 'left', 'readParms'=>"link=1" ), 'options' => array('title'=> LAN_OPTIONS, 'type' => "method", 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'right') ); @@ -286,7 +286,7 @@ class news_sub_form_ui extends e_admin_form_ui $text .= '

'; @@ -371,19 +371,19 @@ class news_admin_ui extends e_admin_ui 'news_meta_keywords' => array('title' => LAN_KEYWORDS, 'type' => 'tags', 'tab'=>1, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false), 'news_meta_description' => array('title' => LAN_DESCRIPTION,'type' => 'textarea', 'tab'=>1, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false), 'news_sef' => array('title' => LAN_SEFURL, 'type' => 'text', 'tab'=>1, 'writeParms'=>'size=xxlarge', 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false), - 'news_ping' => array('title' => 'Ping', 'type' => 'checkbox', 'tab'=>1, 'data'=>false, 'writeParms'=>'value=0', 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false), + 'news_ping' => array('title' => LAN_PING, 'type' => 'checkbox', 'tab'=>1, 'data'=>false, 'writeParms'=>'value=0', 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false), 'news_author' => array('title' => LAN_AUTHOR, 'type' => 'method', 'tab'=>0, 'readParms'=>'idField=user_id&nameField=user_name', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false), 'news_datestamp' => array('title' => LAN_NEWS_32, 'type' => 'datestamp', 'tab'=>2, 'writeParms'=>'type=datetime', 'data' => 'int', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'parms' => 'mask=%A %d %B %Y', 'filter'=>true), 'news_category' => array('title' => NWSLAN_6, 'type' => 'dropdown', 'tab'=>0, 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'batch'=>true, 'filter'=>true), - 'news_start' => array('title' => "Starting", 'type' => 'datestamp', 'tab'=>2, 'writeParms'=>'type=datetime', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'parms' => 'mask=%A %d %B %Y'), - 'news_end' => array('title' => "Ending", 'type' => 'datestamp', 'tab'=>2, 'writeParms'=>'type=datetime', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'parms' => 'mask=%A %d %B %Y'), + 'news_start' => array('title' => LAN_START, 'type' => 'datestamp', 'tab'=>2, 'writeParms'=>'type=datetime', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'parms' => 'mask=%A %d %B %Y'), + 'news_end' => array('title' => LAN_END, 'type' => 'datestamp', 'tab'=>2, 'writeParms'=>'type=datetime', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'parms' => 'mask=%A %d %B %Y'), 'news_class' => array('title' => LAN_VISIBILITY, 'type' => 'userclasses','tab'=>2, 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'batch'=>true, 'filter'=>true), 'news_render_type' => array('title' => LAN_TEMPLATE, 'type' => 'dropdown', 'tab'=>0, 'data'=> 'str', 'inline'=>false, 'width' => 'auto', 'thclass' => 'left', 'class' => 'left', 'nosort' => false, 'batch'=>true, 'filter'=>true), 'news_sticky' => array('title' => LAN_NEWS_28, 'type' => 'boolean', 'tab'=>2, 'data' => 'int' , 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false, 'batch'=>true, 'filter'=>true), 'news_allow_comments' => array('title' => NWSLAN_15, 'type' => 'boolean', 'tab'=>2, 'writeParms'=>'inverse=1', 'data' => 'int', 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false,'batch'=>true, 'filter'=>true,'readParms'=>'reverse=1','writeParms'=>'inverse=1'), 'news_comment_total' => array('title' => LAN_NEWS_60, 'type' => 'number', 'tab'=>2, 'noedit'=>true, 'width' => '10%', 'thclass' => '', 'class' => null, 'nosort' => false), - 'submitted_id' => array('title'=>'Submitted Item', 'type' => 'hidden', 'data'=>false, 'writeParms'=>'show=1'), + 'submitted_id' => array('title' => LAN_NEWS_68, 'type' => 'hidden', 'data'=>false, 'writeParms'=>'show=1'), 'options' => array('title' => LAN_OPTIONS, 'type' => null, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center', 'nosort' => true, 'forced' => TRUE) ); @@ -406,13 +406,13 @@ class news_admin_ui extends e_admin_ui protected $news_renderTypes = array( // TODO Placement location and template should be separate. - '0' => "Default Area", - '1' => "Default Area - Title", - '4' => "Default Area - Title/Summary", - '2' => "Sidebar - Othernews", - '3' => "Sidebar - Othernews 2", - '5' => "Carousel", - //'5' => "Featurebox" + '0' => LAN_NEWS_69, + '1' => LAN_NEWS_70, + '4' => LAN_NEWS_71, + '2' => LAN_NEWS_72, + '3' => LAN_NEWS_73, + '5' => LAN_NEWS_74, + //'5' => LAN_NEWS_75 ); public function beforeCreate($new_data) @@ -683,11 +683,11 @@ class news_admin_ui extends e_admin_ui $mes = e107::getMessage(); - $mes->addDebug("Checking for Ping Status",'default',true); + $mes->addDebug(LAN_NEWS_76,'default',true); if(!empty($_POST['news_ping']) && (count($pingServices)>0) && (in_array(e_UC_PUBLIC, $_POST['news_class']))) { - $mes->addDebug("Initiating ping",'default',true); + $mes->addDebug(LAN_NEWS_77,'default',true); include (e_HANDLER.'xmlrpc/xmlrpc.inc.php'); include (e_HANDLER.'xmlrpc/xmlrpcs.inc.php'); @@ -712,11 +712,11 @@ class news_admin_ui extends e_admin_ui if($this->ping($server, $port, $path, $weblog_name, $weblog_url, $changes_url, $cat_or_rss, $extended)) { - e107::getMessage()->addInfo("Successfully Pinged: ".$server .' with:
url: '.$changes_url .'
rss: '.$cat_or_rss , 'default', true); + e107::getMessage()->addInfo(LAN_NEWS_78." ".$server .' '.LAN_NEWS_79.'
url: '.$changes_url .'
rss: '.$cat_or_rss , 'default', true); } else { - e107::getMessage()->addDebug("Ping failed!: ".$server .' with '.$changes_url , 'default', true); + e107::getMessage()->addDebug(LAN_NEWS_80." ".$server .' '.LAN_NEWS_79.' '.$changes_url , 'default', true); } } @@ -724,9 +724,9 @@ class news_admin_ui extends e_admin_ui } else { - // $mes->addDebug("Ping not triggerred",'default',true); - // $mes->addDebug("Services: ".print_a($pingServices, true),'default', true); - // $mes->addDebug("Userclass: ".print_a($_POST['news_class'],true),'default', true); + // $mes->addDebug(LAN_NEWS_81,'default',true); + // $mes->addDebug(LAN_NEWS_82." ".print_a($pingServices, true),'default', true); + // $mes->addDebug(LAN_NEWS_83." ".print_a($_POST['news_class'],true),'default', true); } @@ -739,7 +739,7 @@ class news_admin_ui extends e_admin_ui $mes = e107::getMessage(); $log = e107::getAdminLog(); - $mes->addDebug("Attempting to ping: ".$xml_rpc_server, 'default', true); + $mes->addDebug(LAN_NEWS_84." ".$xml_rpc_server, 'default', true); $name_param = new xmlrpcval($weblog_name, 'string'); @@ -772,12 +772,12 @@ class news_admin_ui extends e_admin_ui $client = new xmlrpc_client($xml_rpc_path, $xml_rpc_server, $xml_rpc_port); $response = $client->send($message); - $this->log_ping("Request: " . $call_text); + $this->log_ping(LAN_NEWS_85." " . $call_text); $this->log_ping($message->serialize(), true); if ($response == 0) { - $error_text = "Error: " . $xml_rpc_server . ": " . $client->errno . " " . $client->errstring; + $error_text = LAN_NEWS_86." " . $xml_rpc_server . ": " . $client->errno . " " . $client->errstring; $this->report_error($error_text); $this->log_ping($error_text); $log->addArray(array('status'=>LAN_ERROR, 'service'=>$xml_rpc_server, 'url'=> $changes_url, 'response'=>$client->errstring))->save('PING_01'); @@ -787,7 +787,7 @@ class news_admin_ui extends e_admin_ui if ($response->faultCode() != 0) { - $error_text = "Error: " . $xml_rpc_server . ": " . $response->faultCode() . " " . $response->faultString(); + $error_text = LAN_NEWS_86." " . $xml_rpc_server . ": " . $response->faultCode() . " " . $response->faultString(); $this->report_error($error_text); $log->addArray(array('status'=>LAN_ERROR, 'service'=>$xml_rpc_server, 'url'=> $changes_url, 'response'=>$response->faultString()))->save('PING_01'); @@ -808,7 +808,7 @@ class news_admin_ui extends e_admin_ui // read the response if ($fl_error->scalarval() != false) { - $error_text = "Error: " . $xml_rpc_server . ": " . $message->scalarval(); + $error_text = LAN_NEWS_86." " . $xml_rpc_server . ": " . $message->scalarval(); $this->report_error($error_text); $log->addArray(array('status'=>LAN_ERROR, 'service'=>$xml_rpc_server, 'url'=> $changes_url, 'response'=>$message->scalarval()))->save('PING_01'); @@ -892,7 +892,7 @@ class news_admin_ui extends e_admin_ui $frm = e107::getForm(); $sefbaseDiz = str_replace(array("[br]","[","]"), array("
","",""), NWSLAN_128 ); - $pingOpt = array('placeholder'=>'eg. blogsearch.google.com/ping/RPC2'); + $pingOpt = array('placeholder'=>LAN_NEWS_87); $pingVal = (!empty($pref['news_ping_services'])) ? implode("\n",$pref['news_ping_services']) : ''; $newsTemplates = array('default'=>'Default', 'list'=>'List'); //TODO 'category'=>'Categories'? research 'Use non-standard template for news layout' and integrate here. @@ -911,14 +911,14 @@ class news_admin_ui extends e_admin_ui ".NWSLAN_127." ".$frm->select('news_default_template', $newsTemplates, $pref['news_default_template'])." -
Determines how the default news page should appear.
+
".LAN_NEWS_88."
Ping Services ".$frm->textarea('news_ping_services', $pingVal, 4, 100, $pingOpt)." -
Notify these services when you create/update news items.
One per line.
+
".LAN_NEWS_89."
".LAN_NEWS_90."
@@ -941,10 +941,10 @@ class news_admin_ui extends e_admin_ui - Limit for News-Listing Pages + ".LAN_NEWS_91." ".$frm->select('news_list_limit', $this->_optrange(50, false), $pref['news_list_limit'], 'class=tbox')." -
eg. news.php?all or news.php?cat.1 or news.php?tag=xxx
+
".LAN_NEWS_92."
diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 6149b7ed1..2a5f7e201 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -343,7 +343,10 @@ define("LAN_TYPE", "Type"); define("LAN_CATEGORIES", "Categories"); define("LAN_DEMO_FORBIDDEN", "Changes on this page are not possible in demo mode."); define("LAN_COPYRIGHT", "Copyright"); - +define("LAN_MANAGER", "Manage Permissions"); +define("LAN_PING", "Ping"); +define("LAN_START", "Starting"); +define("LAN_END", "Ending"); define("LAN_PREVIEW", "Preview"); diff --git a/e107_languages/English/admin/lan_newspost.php b/e107_languages/English/admin/lan_newspost.php index bf96e664d..8870bf5c2 100644 --- a/e107_languages/English/admin/lan_newspost.php +++ b/e107_languages/English/admin/lan_newspost.php @@ -194,4 +194,38 @@ define("LAN_NEWS_60", "Comment Total"); define("LAN_NEWS_61", "Also delete disallowed comments"); define("LAN_NEWS_62", "Error accessing database, or no news items found"); +define("LAN_NEWS_63", "Create Category"); +define("LAN_NEWS_64", "Old Submitted"); +define("LAN_NEWS_65", "Please choose unique SEF URL string for this category"); +define("LAN_NEWS_66", "Please choose unique SEF URL string for this category"); +define("LAN_NEWS_67", "Close"); +define("LAN_NEWS_68", "Submitted Item"); + +// News render-types +define("LAN_NEWS_69", "Default Area"); +define("LAN_NEWS_70", "Default Area - Title"); +define("LAN_NEWS_71", "Default Area - Title/Summary"); +define("LAN_NEWS_72", "Sidebar - Othernews"); +define("LAN_NEWS_73", "Sidebar - Othernews 2"); +define("LAN_NEWS_74", "Carousel"); +define("LAN_NEWS_75", "Featurebox"); + +define("LAN_NEWS_76", "Checking for Ping Status"); +define("LAN_NEWS_77", "Initiating ping"); +define("LAN_NEWS_78", "Successfully Pinged:"); +define("LAN_NEWS_79", "with:"); +define("LAN_NEWS_80", "Ping failed!:"); +define("LAN_NEWS_81", "Ping not triggerred"); +define("LAN_NEWS_82", "Services:"); +define("LAN_NEWS_83", "Userclass:"); +define("LAN_NEWS_84", "Attempting to ping:"); +define("LAN_NEWS_85", "Request:"); +define("LAN_NEWS_86", "Error:"); +define("LAN_NEWS_87", "eg. blogsearch.google.com/ping/RPC2"); +define("LAN_NEWS_88", "Determines how the default news page should appear."); +define("LAN_NEWS_89", "Notify these services when you create/update news items."); +define("LAN_NEWS_90", "One per line."); +define("LAN_NEWS_91", "Limit for News-Listing Pages"); +define("LAN_NEWS_92", "eg. news.php?all or news.php?cat.1 or news.php?tag=xxx"); + ?> \ No newline at end of file From 9d4e934877297f884bfd71d57990008558631472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sat, 2 May 2015 16:27:01 +0200 Subject: [PATCH 8/8] Issue #6: Remove and optimize (hardcoded) LANS --- e107_admin/notify.php | 2 +- e107_admin/prefs.php | 79 +++++++++---------- e107_admin/update_routines.php | 5 +- .../English/admin/lan_e107_update.php | 2 + e107_languages/English/admin/lan_notify.php | 2 + e107_languages/English/admin/lan_prefs.php | 41 ++++++++++ 6 files changed, 86 insertions(+), 45 deletions(-) diff --git a/e107_admin/notify.php b/e107_admin/notify.php index e02eb1d62..2cfc8c5a8 100644 --- a/e107_admin/notify.php +++ b/e107_admin/notify.php @@ -192,7 +192,7 @@ class notify_config } $text .= ""; - $caption = str_replace("_menu","",ucfirst($k))." Events"; //TODO LAN + $caption = str_replace("_menu","",ucfirst($k))." ".LAN_NOTIFY_01; $tab[] = array('caption'=>$caption, 'text' => $text); } diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index 94e91fa0d..db4f4cee2 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -374,27 +374,27 @@ $text .= "
".$tp->parseTemplate("{IMAGESELECTOR={$parms $sLogo = siteinfo_shortcodes::sc_logo(); */ -$text .= $frm->imagepicker('sitebutton',$pref['sitebutton'],'','help=Used by Facebook and others. Should be a square image of at least 144px in width and height.'); +$text .= $frm->imagepicker('sitebutton',$pref['sitebutton'],'','help='.PRFLAN_225); $text .= " - ".$frm->imagepicker('sitelogo',$pref['sitelogo'],'','help=Used by some themes as the header image on some pages.')." + ".$frm->imagepicker('sitelogo',$pref['sitelogo'],'','help='.PRFLAN_226)." ".$frm->textarea('sitetag', $tp->toForm($pref['sitetag']), 3, 59)." -
Used by some themes. Place 'SITETAG' in your theme to use this value.
+
".PRFLAN_227."
".$frm->textarea('sitedescription', $tp->toForm($pref['sitedescription']), 3, 80)." -
Used by some themes. Place 'SITEDESCRIPTION' in your theme to use this value.
+
".PRFLAN_228."
@@ -402,7 +402,7 @@ $text .= " ".$frm->textarea('sitedisclaimer',$tp->toForm( $pref['sitedisclaimer']), 3, 80)." -
Used by some themes. Place 'SITEDISCLAIMER' in your theme to use this value.
+
".PRFLAN_229."
@@ -803,11 +803,10 @@ $text .= " - - // TODO LAN + $text .= " - + ".$frm->select('inputdate',$inputdate, e107::getPref('inputdate')); @@ -1527,7 +1526,6 @@ $text .= " // Key registration -// TODO LAN @@ -1547,13 +1545,13 @@ $text .= " $signup_option_names = array( // "signup_option_loginname" => "Login Name", - "signup_option_email_confirm" => "Email Confirmation", + "signup_option_email_confirm" => CUSTSIG_21, "signup_option_realname" => CUSTSIG_2, "signup_option_signature" => CUSTSIG_6, "signup_option_image" => CUSTSIG_7, "signup_option_class" => CUSTSIG_17, 'signup_option_customtitle' => CUSTSIG_20, - 'signup_option_hideemail' => 'Option to hide email' + 'signup_option_hideemail' => CUSTSIG_22 ); foreach($signup_option_names as $value => $key) @@ -2006,10 +2004,10 @@ $text .= " - + ".$frm->number('failed_login_limit', varset($pref['failed_login_limit'],10), 3, array('max'=>10, 'min'=>0))." -
Failed logins from the same IP will be banned after this many attempts.
+
".PRFLAN_232."
@@ -2074,22 +2072,22 @@ $text .= " - Moderate Comments made by: + ".PRFLAN_233." ". $frm->uc_select('comments_moderate', $pref['comments_moderate'],"nobody,guest,new,bots,public,admin,main,classes"). " -
Comments will require manual approval by an admin prior to being visible to other users
+
".PRFLAN_234."
- Comment Sorting: + ".PRFLAN_235." "; $comment_sort = array( - "desc" => "Most recent comments first", //default //TODO LAN - 'asc' => "Most recent comments last" + "desc" => PRFLAN_236, //default + 'asc' => PRFLAN_237 ); $text .= $frm->select('comments_sort',$comment_sort, $pref['comments_moderate'])." @@ -2132,7 +2130,7 @@ $text .= " $text .= "
- File Uploading"; + ".PRFLAN_238.""; $upload_max_filesize = ini_get('upload_max_filesize'); @@ -2143,7 +2141,7 @@ $text .= " if($maxINI < $pref['upload_maxfilesize']) { $text .= "
"; - $text .= "The maximum upload size imposed by your php.ini settings is: ".$maxINI."
"; + $text .= PRFLAN_239." ".$maxINI."
"; $pref['upload_maxfilesize'] = $maxINI; } @@ -2183,7 +2181,7 @@ $text .= "
".UPLLAN_38."
- Filetype upload limits + ".PRFLAN_240." @@ -2207,7 +2205,7 @@ $text .= " $text .= "
-
** For security reasons these values may only be changed manually in the following file: ".str_replace("../",'',e_SYSTEM).e_READ_FILETYPES."
+
".PRFLAN_241." ".str_replace("../",'',e_SYSTEM).e_READ_FILETYPES."
@@ -2225,10 +2223,9 @@ $text .= " // Javascript Control -//TODO LANS $text .= "
- Javascript Frameworks (for testing purposes only) + ".PRFLAN_242." @@ -2237,11 +2234,11 @@ $text .= " "; $js_options = array( - 'auto' => 'Auto (on-demand)', // load based on dependency - 'admin' => 'Admin Area', // Always load in admin - 'front' => 'Front-End', // Always load in front-end - 'all' => "Both", // Always load in admin and front-end - 'none' => 'Disabled' // disabled + 'auto' => PRFLAN_243, // load based on dependency + 'admin' => PRFLAN_244, // Always load in admin + 'front' => PRFLAN_245, // Always load in front-end + 'all' => PRFLAN_246, // Always load in admin and front-end + 'none' => PRFLAN_247 // disabled ); @@ -2281,31 +2278,31 @@ $text .= " - + - + - + - + "; @@ -2447,22 +2444,22 @@ function pref_submit($post_id = '') function prefs_adminmenu() { $var['core-prefs-main']['text'] = PRFLAN_1; - $var['core-prefs-email']['text'] = "Email & Contact Info"; + $var['core-prefs-email']['text'] = PRFLAN_254; $var['core-prefs-registration']['text'] = PRFLAN_28; $var['core-prefs-signup']['text'] = PRFLAN_19; // $var['core-prefs-sociallogin']['text'] = "Social Options"; // Moved into plugin. $var['core-prefs-comments']['text'] = PRFLAN_210; - $var['core-prefs-uploads']['text'] = "File Uploading"; // TODO LAN + $var['core-prefs-uploads']['text'] = PRFLAN_255; - $var['core-prefs-header1']['header'] = "Advanced Options"; + $var['core-prefs-header1']['header'] = PRFLAN_256; $var['core-prefs-display']['text'] = PRFLAN_13; $var['core-prefs-admindisp']['text'] = PRFLAN_77; $var['core-prefs-textpost']['text'] = PRFLAN_101; $var['core-prefs-security']['text'] = PRFLAN_47; $var['core-prefs-date']['text'] = PRFLAN_21; - $var['core-prefs-javascript']['text'] = "Javascript Framework"; // TODO LAN + $var['core-prefs-javascript']['text'] = PRFLAN_257; $var['core-prefs-advanced']['text'] = PRFLAN_149; e107::getNav()->admin("Basic ".LAN_OPTIONS.'--id--prev_nav', 'core-prefs-main', $var); diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index a49d50d68..a51fa17d6 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -781,11 +781,10 @@ function update_706_to_800($type='') } } } - //TODO LAN - + if(count($chgPath)) { - $log->addWarning('Before continuing, please manually delete the following outdated folders from your system: '); + $log->addWarning(LAN_UPDATE_57.' '); array_unique($chgPath); asort($chgPath); foreach($chgPath as $cgp) diff --git a/e107_languages/English/admin/lan_e107_update.php b/e107_languages/English/admin/lan_e107_update.php index 253d6f94e..b404983b5 100644 --- a/e107_languages/English/admin/lan_e107_update.php +++ b/e107_languages/English/admin/lan_e107_update.php @@ -54,6 +54,8 @@ define('LAN_UPDATE_54', 'Missing table --TABLE-- - cannot add index --INDEX--'); define('LAN_UPDATE_55', 'Description'); define('LAN_UPDATE_56', 'System Update'); +define('LAN_UPDATE_57', 'Before continuing, please manually delete the following outdated folders from your system:'); + define('LAN_UPDATE_CAPTION_PLUGIN', 'Plugin Updates'); // Unused define('LAN_UPDATE_CAPTION_CORE', 'Core Updates'); // Unused diff --git a/e107_languages/English/admin/lan_notify.php b/e107_languages/English/admin/lan_notify.php index 19586492b..b6de501c5 100644 --- a/e107_languages/English/admin/lan_notify.php +++ b/e107_languages/English/admin/lan_notify.php @@ -34,4 +34,6 @@ define('NM_LAN_2', 'Bulk email run complete'); define("NF_LAN_1", "File Events"); define("NF_LAN_2", "File uploaded by user"); +define("LAN_NOTIFY_01", "Events"); + ?> diff --git a/e107_languages/English/admin/lan_prefs.php b/e107_languages/English/admin/lan_prefs.php index af8e5288e..91937bbcd 100644 --- a/e107_languages/English/admin/lan_prefs.php +++ b/e107_languages/English/admin/lan_prefs.php @@ -88,6 +88,8 @@ define("CUSTSIG_17", "Subscribe to content/mailouts"); define("CUSTSIG_18", "Disallow usernames"); define("CUSTSIG_19", "usernames containing the following text will be rejected, separate entries by commas"); define("CUSTSIG_20", "User Custom Title"); +define("CUSTSIG_21", "Email Confirmation"); +define("CUSTSIG_22", "Option to hide email"); define("PRFLAN_91", "If someone is attacking your site by multiple requests to your server, his IP will be automatically banned ! Best done with server config if possible!!!"); define("PRFLAN_92", "Secure signup verification -- hide password in email?"); @@ -232,4 +234,43 @@ define("PRFLAN_223", "Completely Automated Public Turing test to tell Computers define("PRFLAN_224", "User registration system"); +define("PRFLAN_225", "Used by Facebook and others. Should be a square image of at least 144px in width and height."); +define("PRFLAN_226", "Used by some themes as the header image on some pages."); +define("PRFLAN_227", "Used by some themes. Place 'SITETAG' in your theme to use this value."); +define("PRFLAN_228", "Used by some themes. Place 'SITEDESCRIPTION' in your theme to use this value."); +define("PRFLAN_229", "Used by some themes. Place 'SITEDISCLAIMER' in your theme to use this value."); +define("PRFLAN_230", "Date/Time Input-Field format"); + +define("PRFLAN_231", "Maximum failed logins before ban:"); +define("PRFLAN_232", "Failed logins from the same IP will be banned after this many attempts."); +define("PRFLAN_233", "Moderate Comments made by:"); +define("PRFLAN_234", "Comments will require manual approval by an admin prior to being visible to other users"); +define("PRFLAN_235", "Comment Sorting:"); +define("PRFLAN_236", "Most recent comments first"); +define("PRFLAN_237", "Most recent comments last"); + +define("PRFLAN_238", "File Uploading"); +define("PRFLAN_239", "The maximum upload size imposed by your php.ini settings is:"); +define("PRFLAN_240", "Filetype upload limits"); +define("PRFLAN_241", "** For security reasons these values may only be changed manually in the following file:"); + +define("PRFLAN_242", "Javascript Frameworks (for testing purposes only)"); +define("PRFLAN_243", "Auto (on-demand)"); +define("PRFLAN_244", "Admin Area"); +define("PRFLAN_245", "Front-End"); +define("PRFLAN_246", "Both"); +define("PRFLAN_247", "Disabled"); + +define("PRFLAN_248", "Disable scripts consolidation"); +define("PRFLAN_249", "If disabled, scripts will be loaded in one consolidated file"); +define("PRFLAN_250", "Enable consolidated scripts zlib compression:"); +define("PRFLAN_251", "Used only when script consolidation is enabled"); +define("PRFLAN_252", "Disable consolidated scripts server cache:"); +define("PRFLAN_253", "Disable consolidated scripts browser cache:"); + +define("PRFLAN_254", "Email & Contact Info"); +define("PRFLAN_255", "File Uploading"); +define("PRFLAN_256", "Advanced Options"); +define("PRFLAN_257", "Javascript Framework"); + ?> \ No newline at end of file
Disable scripts consolidation".PRFLAN_248." ".$frm->radio_switch('e_jslib_nocombine', $pref['e_jslib_nocombine'], LAN_YES, LAN_NO)." -
If disabled, scripts will be loaded in one consolidated file
+
".PRFLAN_249."
Enable consolidated scripts zlib compression:".PRFLAN_250." ".$frm->radio_switch('e_jslib_gzip', $pref['e_jslib_gzip'], LAN_YES, LAN_NO)." -
Used only when script consolidation is enabled
+
".PRFLAN_251."
Disable consolidated scripts server cache:".PRFLAN_252." ".$frm->radio_switch('e_jslib_nocache', $pref['e_jslib_nocache'], LAN_YES, LAN_NO)." -
Used only when script consolidation is enabled
+
".PRFLAN_251."
Disable consolidated scripts browser cache:".PRFLAN_253." ".$frm->radio_switch('e_jslib_nobcache', $pref['e_jslib_nobcache'], LAN_YES, LAN_NO)." -
Used only when script consolidation is enabled
+
".PRFLAN_251."