diff --git a/e107_admin/lancheck.php b/e107_admin/lancheck.php
index dfa884a76..1d59c58a3 100644
--- a/e107_admin/lancheck.php
+++ b/e107_admin/lancheck.php
@@ -1,21 +1,19 @@
add(LAN_CHECK_17, E_MESSAGE_ERROR);
}
else
{
- $caption = LAN_SAVED." $lan/".$writeit."";
+ $caption = LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24;
+ $emessage->add(sprintf(LAN_CHECK_23, basename($writeit)), E_MESSAGE_SUCCESS);
}
fclose($writeit);
- $message .= "
";
+ $message .= "
+ ";
-
- $ns -> tablerender($caption, $message);
+ $e107->ns->tablerender($caption, $emessage->render().$message);
require_once(e_ADMIN."footer.php");
exit;
}
@@ -174,98 +184,154 @@ if($f != ""){
// ===========================================================================
$core_plugins = array(
-"alt_auth","banner_menu","blogcalendar_menu","calendar_menu","chatbox_menu",
-"clock_menu","comment_menu","content","featurebox","forum","gsitemap",
-"links_page","linkwords","list_new","log","login_menu","newforumposts_main",
-"newsfeed","newsletter","online","other_news_menu","pdf","pm","poll",
-"rss_menu","search_menu","siteinfo_menu","trackback","tree_menu","user_menu"
+ "alt_auth","banner_menu","blogcalendar_menu","calendar_menu","chatbox_menu",
+ "clock_menu","comment_menu","content","featurebox","forum","gsitemap",
+ "links_page","linkwords","list_new","log","login_menu","newforumposts_main",
+ "newsfeed","newsletter","online","other_news_menu","pdf","pm","poll",
+ "rss_menu","search_menu","siteinfo_menu","trackback","tree_menu","user_menu"
);
$core_themes = array("crahan","e107v4a","human_condition","interfectus","jayya",
-"khatru","kubrick","lamb","leaf","reline","sebes","vekna_blue");
+"khatru","kubrick","lamb","leaf","reline","sebes","vekna_blue","_blank");
-if(isset($_POST['language_sel']) && isset($_POST['language'])){
+if(isset($_POST['language_sel']) && isset($_POST['language']))
+{
- $ns -> tablerender(LAN_CHECK_3.": ".$_POST['language'],check_core_lanfiles($_POST['language']));
- $ns -> tablerender(LAN_CHECK_3.": ".$_POST['language']."/admin",check_core_lanfiles($_POST['language'],"admin/"));
+ $text = check_core_lanfiles($_POST['language']).check_core_lanfiles($_POST['language'],"admin/");
- $plug_text = "
-
- ".LAN_PLUGIN." |
- ".LAN_CHECK_16." |
- ".$_POST['language']." |
- ".LAN_OPTIONS." |
";
+ $text .= "
+
+
+ ";
- $theme_text = "
-
- ".LAN_CHECK_21." |
- ".LAN_CHECK_16." |
- ".$_POST['language']." |
- ".LAN_OPTIONS." |
";
+ $text .= "
+
+
+ ";
- $ns -> tablerender(LAN_CHECK_22,$theme_text);
+ $ns->tablerender(LAN_CHECK_25, $text);
require_once(e_ADMIN."footer.php");
exit;
}
function check_core_lanfiles($checklan,$subdir=''){
- global $lanfiles,$_POST;
-
+ global $frm;
+
$English = get_comp_lan_phrases(e_LANGUAGEDIR."English/".$subdir,$checklan);
$check = get_comp_lan_phrases(e_LANGUAGEDIR.$checklan."/".$subdir,$checklan);
-
- $text .= "
-
- ".LAN_CHECK_16." |
- ".$_POST['language'].' '.LAN_CHECK_20." |
- ".LAN_OPTIONS." |
";
+ $legend_txt = LAN_CHECK_3.": ".$_POST['language']."/".$subdir;
+ $fieldset_id = $subdir ? str_replace('/', '', $_POST['language'])."-".str_replace('/', '', $subdir) : str_replace('/', '', $_POST['language']);
+ $text .= "
+
+
+ ";
+
return $text;
}
@@ -382,9 +467,10 @@ function get_comp_lan_phrases($comp_dir,$lang,$depth=0)
}
// for plugins and themes - checks what kind of language files directory structure we have
-function check_lanfiles($mode,$comp_name,$base_lan="English",$target_lan){
- global $ns,$sql;
-
+function check_lanfiles($mode, $comp_name, $base_lan="English", $target_lan)
+{
+ global $frm;
+
$folder['P'] = e_PLUGIN.$comp_name;
$folder['T'] = e_THEME.$comp_name;
$comp_dir = $folder[$mode];
@@ -396,29 +482,34 @@ function check_lanfiles($mode,$comp_name,$base_lan="English",$target_lan){
$keys = array_keys($baselang);
sort($keys);
+ $i = 0;
foreach($keys as $k)
{
$lnk = $k;
//echo "klucz ".$k."
";
$k_check = str_replace("English",$target_lan,$k);
+ $text .= "
+
+ ";
if(array_key_exists($k_check,$check))
{
- $text .= "
-
- ";
+ $text .= "
+ ".$comp_name." |
+ ".str_replace("English/","",$lnk)." |
+ ";
$subkeys = array_keys($baselang[$k]);
- $er="";
+ $er = "";
$utf_error = "";
$bomkey = str_replace(".php","",$k_check);
- $bom_error = ($check['bom'][$bomkey]) ? "".LAN_CHECK_15."
" : ""; // illegal chars
+ $bom_error = ($check['bom'][$bomkey]) ? "".LAN_CHECK_15."
" : ""; // illegal chars
foreach($subkeys as $sk)
{
if($utf_error == "" && !is_utf8($check[$k_check][$sk]))
{
- $utf_error = "".LAN_CHECK_19."
";
+ $utf_error = "".LAN_CHECK_19."
";
}
if(!array_key_exists($sk,$check[$k_check]) || (trim($check[$k_check][$sk]) == "" && $baselang[$k][$sk] != ""))
@@ -428,33 +519,43 @@ function check_lanfiles($mode,$comp_name,$base_lan="English",$target_lan){
}
}
- $style = ($er) ? "forumheader2" : "forumheader3";
- $text .= "";
+ $style = ($er) ? "warning" : "success";
+ $text .= "
+
+
+ ";
$text .= $bom_error . $utf_error;
$text .= (!$er && !$bom_error && !$utf_error) ? LAN_OK : $er." ";
- $text .= " | ";
+ $text .= "
+
+ |
+ ";
}
else
{
- $text .= "
-
-
- ";
+ $text .= "
+ ".$comp_name." |
+ ".str_replace("English/","",$lnk)." |
+ ".LAN_CHECK_4." |
+ ";
}
- $text .="
";
+ $text .="
+
+ ".$frm->admin_button('but-corelan-'.str_replace(array('/', '\\'), '-', $comp_dir).$i, LAN_EDIT, 'edit', '', array('other'=> "onclick=\"window.location='".e_SELF."?".$comp_dir."/languages/".$lnk."|".$target_lan."|file'\""))."
+ ";
+ $text .="
+ |
+
+ ";
+ $i++;
}
-
-
- // if (!$known) {$text = LAN_CHECK_18." : --> ".$fname." :: ".$dname;}
return $text;
}
function edit_lanfiles($dir1,$dir2,$f1,$f2){
- global $ns,$sql,$lan;
+ global $e107, $emessage, $lan;
/* echo "
dir1 = $dir1";
echo "
file1 = $f1";
@@ -484,9 +585,25 @@ function edit_lanfiles($dir1,$dir2,$f1,$f2){
$keys = array_keys($trans);
sort($keys);
- $text = "";
+
+
+ ";
- $text .= "";
+ $text .= "
+
+ ";
-
- $caption = LAN_CHECK_3." ".$dir2.$f2." -> ".$lan."";
- $ns -> tablerender($caption, $text);
+ $e107->ns->tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24, $text);
require_once(e_ADMIN."footer.php");
exit;
@@ -659,19 +787,19 @@ function lancheck_adminmenu() {
$action = "db";
}
$var['main']['text'] = LAN_PREFS;
- $var['main']['link'] = e_ADMIN."language.php";
+ $var['main']['link'] = e_ADMIN_ABS."language.php";
if(isset($pref['multilanguage']) && $pref['multilanguage']){
$var['db']['text'] = LANG_LAN_03;
- $var['db']['link'] = e_ADMIN."language.php?db";
+ $var['db']['link'] = e_ADMIN_ABS."language.php?db";
}
$var['tools']['text'] = ADLAN_CL_6;
- $var['tools']['link'] = e_ADMIN."language.php?tools";
+ $var['tools']['link'] = e_ADMIN_ABS."language.php?tools";
show_admin_menu(ADLAN_132, $action, $var);
}
- $ns -> tablerender(LAN_CHECK_1, 'No data');
+ $ns -> tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_1, LAN_CHECK_26);
require_once(e_ADMIN."footer.php");
diff --git a/e107_admin/language.php b/e107_admin/language.php
index ec61b7508..095ac35b3 100644
--- a/e107_admin/language.php
+++ b/e107_admin/language.php
@@ -9,8 +9,8 @@
* Administration Area - Languages
*
* $Source: /cvs_backup/e107_0.8/e107_admin/language.php,v $
- * $Revision: 1.12 $
- * $Date: 2008-12-15 17:03:25 $
+ * $Revision: 1.13 $
+ * $Date: 2008-12-15 21:16:31 $
* $Author: secretr $
*
*/
@@ -28,7 +28,6 @@ require_once("auth.php");
require_once(e_HANDLER."form_handler.php");
require_once(e_HANDLER."message_handler.php");
-$rs = new form;
$frm = new e_form();
$emessage = &eMessage::getInstance();
@@ -454,7 +453,7 @@ function table_list() {
// ------------- render form ---------------------------------------------------
function multilang_db(){
- global $pref, $e107, $tp, $rs, $frm, $emessage, $lanlist, $tabs;
+ global $pref, $e107, $tp, $frm, $emessage, $lanlist, $tabs;
if(isset($pref['multilanguage']) && $pref['multilanguage']){
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index 77b08be4f..a66768edd 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -9,8 +9,8 @@
* Form Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
- * $Revision: 1.6 $
- * $Date: 2008-12-12 23:29:32 $
+ * $Revision: 1.7 $
+ * $Date: 2008-12-15 21:16:32 $
* $Author: secretr $
*
*/
@@ -165,7 +165,7 @@ class e_form
return "get_attributes($options, $name, $value)." />";
}
- function admin_button($name, $value, $action = '', $label = '', $options = array())
+ function admin_button($name, $value, $action = 'submit', $label = '', $options = array())
{
$options['class'] = $action; //additional classes in options not allowed
$btype = 'submit';
diff --git a/e107_languages/English/admin/lan_lancheck.php b/e107_languages/English/admin/lan_lancheck.php
index a6e9caf38..24fb5eb03 100644
--- a/e107_languages/English/admin/lan_lancheck.php
+++ b/e107_languages/English/admin/lan_lancheck.php
@@ -4,9 +4,9 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_lancheck.php,v $
-| $Revision: 1.2 $
-| $Date: 2008-01-08 20:23:00 $
-| $Author: e107steved $
+| $Revision: 1.3 $
+| $Date: 2008-12-15 21:16:32 $
+| $Author: secretr $
+----------------------------------------------------------------------------+
*/
define("LAN_CHECK_1", "Verify/Edit Language Files"); // modified in 0.7.6
@@ -34,5 +34,10 @@ define('LAN_CHECK_20', 'File');
define('LAN_CHECK_21', 'Theme');
define('LAN_CHECK_22', 'Themes');
+define('LAN_CHECK_23', '%s saved');
-?>
+define('LAN_CHECK_PAGE_TITLE', 'Languages');
+define('LAN_CHECK_24', 'Edit/Create file');
+define('LAN_CHECK_25', 'Language verification');
+define('LAN_CHECK_26', 'No data');
+?>
\ No newline at end of file
diff --git a/e107_themes/_blank/admin_style.css b/e107_themes/_blank/admin_style.css
index 37ddf313a..7b43125b5 100644
--- a/e107_themes/_blank/admin_style.css
+++ b/e107_themes/_blank/admin_style.css
@@ -207,7 +207,7 @@ label { cursor: pointer; }
/* message text (overall) */
.warning { color: #FF6600 }
-.success {}
+.success { color: green; }
.error { color: #FF0000 }
.info {}
@@ -307,6 +307,7 @@ input.edit {}
.admin-header-content { border: 1px solid #DDDDDD; }
.admin-page-body { padding: 20px 15px 0; }
.admin-footer {}
+legend { font-size: 16px; font-weight: bold; }
/******** Layout */
.main-table { width: 100%; border: 0 none; }
@@ -318,7 +319,6 @@ input.edit {}
/******** Horizontal navigation ADMIN_NAV_ALT */
.admin-navigation { border: 1px solid #DDDDDD;}
-
/******** Side Navigation
- Admin Navigation
- Plugin Navigation
@@ -339,7 +339,7 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
/******** Block Elements */
.block { border: 1px solid #DDDDDD; margin-bottom: 10px;}
.block-text { padding: 10px 10px 10px; }
-.block h4 { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; }
+.block h2, .block h4 { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; }
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
.page-info p { padding: 10px; }
diff --git a/e107_themes/_blank/admin_template.php b/e107_themes/_blank/admin_template.php
index 848bb986f..4392e0b7b 100644
--- a/e107_themes/_blank/admin_template.php
+++ b/e107_themes/_blank/admin_template.php
@@ -9,8 +9,8 @@
* Admin template - _blank theme
*
* $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
- * $Revision: 1.4 $
- * $Date: 2008-12-12 11:23:05 $
+ * $Revision: 1.5 $
+ * $Date: 2008-12-15 21:16:31 $
* $Author: secretr $
*
*/
@@ -45,6 +45,7 @@ $ADMIN_HEADER = "
+ {SETSTYLE=admin_content}
";
/*
{SETSTYLE=admin_menu}
diff --git a/e107_themes/_blank/menu/menu.css b/e107_themes/_blank/menu/menu.css
index 02263ee32..8ae881f72 100644
--- a/e107_themes/_blank/menu/menu.css
+++ b/e107_themes/_blank/menu/menu.css
@@ -15,9 +15,9 @@
display: block;
font-family: Verdana, Arial, Helvetica, sans-serif;
text-align: center;
- font-size: 12px;
+ font-size: 14px;
color: #13394E;
- font-weight: bold;
+ font-weight: normal;
text-decoration: none;
}
@@ -55,8 +55,8 @@ ul.sub {border-top: 1px solid #DDDDDD;}
background-image: none;
background-color: #FFFFFF;
line-height: 28px;
- font-size: 11px;
- font-weight: bold;
+ font-size: 12px;
+ font-weight: normal;
padding-left: 10px;
padding-right: 0px;
border-left: 1px solid #DDDDDD;
diff --git a/e107_themes/_blank/theme.php b/e107_themes/_blank/theme.php
index 2797acad6..c328252dc 100644
--- a/e107_themes/_blank/theme.php
+++ b/e107_themes/_blank/theme.php
@@ -64,6 +64,18 @@ function tablestyle($caption, $text){
';
break;
+
+ case 'admin_content':
+ echo '
+
+ '.$caption.'
+
+ '.$text.'
+
+
+ ';
+ break;
+
default:
echo '
|