mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +02:00
Issue #6 Language-file optimization.
This commit is contained in:
parent
c3d8cd9236
commit
9c6cfc0b86
@ -641,6 +641,7 @@ if(is_readable($customLan2)) // FASTER - if exist, should be done 'once' by the
|
||||
}
|
||||
unset($customLan, $customLan2);
|
||||
|
||||
$lng->bcDefs(); // defined v1.x definitions for old templates.
|
||||
|
||||
$sql->db_Mark_Time('Start: Global Language Files');
|
||||
if(isset($pref['lan_global_list']))
|
||||
|
@ -1269,7 +1269,7 @@ class lancheck
|
||||
else
|
||||
{
|
||||
$this->checkLog('file',1);
|
||||
$this->newFile(e_LANGUAGEDIR.$checklan."/".$subdir.$lnk,$checklan);
|
||||
// $this->newFile(e_LANGUAGEDIR.$checklan."/".$subdir.$lnk,$checklan);
|
||||
$text .= "<tr>
|
||||
<td class='forumheader3' style='width:45%'>{$lnk}</td>
|
||||
<td class='forumheader' style='width:50%'>".LAN_CHECK_4."</td>"; // file missing.
|
||||
@ -1694,8 +1694,9 @@ class lancheck
|
||||
$f2 = $lan."_custom.php";
|
||||
$root_file = e_LANGUAGEDIR.$lan."/".$lan."_custom.php";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->newFile($dir2.$f2,$lan);
|
||||
|
||||
$writable = (is_writable($dir2)) ? TRUE : FALSE;
|
||||
$trans = $this->get_lan_file_phrases($dir1,$dir2,$f1,$f2);
|
||||
$keys = array_keys($trans);
|
||||
|
@ -20,10 +20,10 @@ e107::coreLan('language', true);
|
||||
|
||||
$e_sub_cat = 'language';
|
||||
|
||||
if(!empty($_GET['iframe']))
|
||||
{
|
||||
define('e_IFRAME', true);
|
||||
}
|
||||
if(!empty($_GET['iframe']))
|
||||
{
|
||||
define('e_IFRAME', true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -13,11 +13,11 @@ if(!isset($SEARCH_SHORTCODE))
|
||||
{
|
||||
|
||||
$SEARCH_SHORTCODE = "<input class='tbox search' type='text' name='q' size='20' value='' maxlength='50' />
|
||||
<input class='btn btn-default button search' type='submit' name='s' value=\"".LAN_180."\" />";
|
||||
<input class='btn btn-default button search' type='submit' name='s' value=\"".LAN_SEARCH."\" />";
|
||||
|
||||
/* // Image Version Example
|
||||
$SEARCH_SHORTCODE = "<input class='tbox search' type='text' name='q' size='20' value='Default Value' maxlength='50' onclick=\"this.value=''\" />
|
||||
<input type='image' name='s' src='".e_PLUGIN_ABS."search_menu/images/search.png' value='".LAN_180."' style='width: 16px; height: 16px; border: 0px; vertical-align: middle' />";
|
||||
<input type='image' name='s' src='".e_PLUGIN_ABS."search_menu/images/search.png' value='".LAN_SEARCH."' style='width: 16px; height: 16px; border: 0px; vertical-align: middle' />";
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -665,4 +665,27 @@ class language{
|
||||
return $this->list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function bcDefs()
|
||||
{
|
||||
|
||||
$bcList = array(
|
||||
'LAN_180' => 'LAN_SEARCH'
|
||||
|
||||
);
|
||||
|
||||
|
||||
foreach($bcList as $old => $new)
|
||||
{
|
||||
if(!defined($old) && defined($new))
|
||||
{
|
||||
define($old, constant($new));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ define("LAN_TITLE", "Title");
|
||||
define("LAN_USER", "User");
|
||||
define("LAN_EMAIL","Email address");
|
||||
define("LAN_WROTE", "wrote"); // as in John wrote.." ";
|
||||
define("LAN_SEARCH", "Search");
|
||||
|
||||
define("LAN_ENTER_USRNAME_EMAIL", "Please enter your username or email"); // admin php hover field admin name
|
||||
define("LAN_PWD_REQUIRED", "Password is required"); // admin php hover field admin password
|
||||
|
@ -9,7 +9,7 @@
|
||||
define("PAGE_NAME", "Search");
|
||||
|
||||
define("LAN_140", "Members");
|
||||
define("LAN_180", "Search");
|
||||
// define("LAN_180", "Search");
|
||||
define("LAN_192", "All categories");
|
||||
define("LAN_193", "Event Calendar");
|
||||
define("LAN_194", "All Categories");
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/search_menu/languages/English.php,v $
|
||||
| $Revision$
|
||||
| $Date$
|
||||
| $Author$
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
define("LAN_180", "Search");
|
||||
|
||||
?>
|
@ -16,7 +16,9 @@
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
include_lan(e_PLUGIN."search_menu/languages/".e_LANGUAGE.".php");
|
||||
// include_lan(e_PLUGIN."search_menu/languages/".e_LANGUAGE.".php");
|
||||
|
||||
|
||||
if (strstr(e_PAGE, "news.php")) {
|
||||
$page = 0;
|
||||
} elseif(strstr(e_PAGE, "comment.php")) {
|
||||
@ -46,11 +48,11 @@ if (isset($custom_query[1]) && $custom_query[1] != '')
|
||||
$image_file = ($custom_query[1] != 'default') ? $custom_query[1] : e_PLUGIN_ABS.'search_menu/images/search.png';
|
||||
$width = (isset($custom_query[2]) && $custom_query[2]) ? $custom_query[2] : '16';
|
||||
$height = (isset($custom_query[3]) && $custom_query[3]) ? $custom_query[3] : '16';
|
||||
$search_button = "<input type='image' src='".$image_file."' value='".LAN_180."' style='width: ".$width."px; height: ".$height."px; border: 0px; vertical-align: middle' name='s' />";
|
||||
$search_button = "<input type='image' src='".$image_file."' value='".LAN_SEARCH."' style='width: ".$width."px; height: ".$height."px; border: 0px; vertical-align: middle' name='s' />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$search_button = "<input class='btn btn-default button search' type='submit' name='s' value='".LAN_180."' />";
|
||||
$search_button = "<input class='btn btn-default button search' type='submit' name='s' value='".LAN_SEARCH."' />";
|
||||
}
|
||||
|
||||
if (isset($custom_query[5]) && $custom_query[5]) {
|
||||
@ -108,6 +110,6 @@ if (isset($searchflat) && $searchflat)
|
||||
{
|
||||
echo $text;
|
||||
} else {
|
||||
$ns->tablerender(LAN_180." ".SITENAME, "<div style='text-align:center'>".$text."</div>", 'search');
|
||||
$ns->tablerender(LAN_SEARCH." ".SITENAME, "<div style='text-align:center'>".$text."</div>", 'search');
|
||||
}
|
||||
?>
|
@ -174,7 +174,7 @@ class search extends e_shortcode
|
||||
|
||||
function sc_search_main_submit($parm='')
|
||||
{
|
||||
return "<input class='btn btn-primary button' type='submit' name='s' value='".LAN_180."' />
|
||||
return "<input class='btn btn-primary button' type='submit' name='s' value='".LAN_SEARCH."' />
|
||||
<input type='hidden' name='r' value='0' />";
|
||||
}
|
||||
|
||||
@ -1110,7 +1110,7 @@ if ($search_prefs['selector'] == 1)
|
||||
$SEARCH_VARS->SEARCH_MAIN_UNCHECKALL = "<input type='button' name='UnCheckAll' value='".LAN_SEARCH_2."' onclick='uncheckAll(this); uncheckG();' />";
|
||||
}
|
||||
*/
|
||||
//$SEARCH_VARS->SEARCH_MAIN_SUBMIT = "<input type='hidden' name='r' value='0' /><input type='submit' name='s' value='".LAN_180."' />";
|
||||
//$SEARCH_VARS->SEARCH_MAIN_SUBMIT = "<input type='hidden' name='r' value='0' /><input type='submit' name='s' value='".LAN_SEARCH."' />";
|
||||
|
||||
//$SEARCH_VARS->ENHANCED_ICON = "<img src='".e_IMAGE_ABS."generic/search_basic.png' style='width: 16px; height: 16px; vertical-align: top'
|
||||
//alt='".LAN_SEARCH_23."' title='".LAN_SEARCH_23."' onclick=\"expandit('en_in'); expandit('en_ex'); expandit('en_ep'); expandit('en_be')\"/>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user