1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Language selection simplification

work in progress
This commit is contained in:
marj
2009-08-03 18:36:24 +00:00
parent 980a2486c8
commit 493db815df
2 changed files with 24 additions and 26 deletions

View File

@@ -9,9 +9,9 @@
* Custom Menus/Pages Administration * Custom Menus/Pages Administration
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $
* $Revision: 1.18 $ * $Revision: 1.19 $
* $Date: 2009-07-24 19:18:50 $ * $Date: 2009-08-03 18:36:24 $
* $Author: e107steved $ * $Author: marj_nl_fr $
* *
*/ */
@@ -29,8 +29,6 @@ $frm = new e_form(true);
$emessage = &eMessage::getInstance(); $emessage = &eMessage::getInstance();
$page = new page; $page = new page;
$custpage_lang = ($sql->mySQLlanguage) ? $sql->mySQLlanguage : $pref['sitelanguage'];
if (e_QUERY) if (e_QUERY)
{ {
$tmp = explode(".", e_QUERY); $tmp = explode(".", e_QUERY);

View File

@@ -9,9 +9,9 @@
* Administration Area - Meta Tags * Administration Area - Meta Tags
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/meta.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/meta.php,v $
* $Revision: 1.6 $ * $Revision: 1.7 $
* $Date: 2009-01-07 15:40:06 $ * $Date: 2009-08-03 18:36:24 $
* $Author: secretr $ * $Author: marj_nl_fr $
* *
*/ */
require_once("../class2.php"); require_once("../class2.php");
@@ -24,7 +24,7 @@ require_once("auth.php");
require_once(e_HANDLER."message_handler.php"); require_once(e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance(); $emessage = &eMessage::getInstance();
$current_lang = ($sql->mySQLlanguage != "") ? $sql->mySQLlanguage : $pref['sitelanguage']; e_LANGUAGE = ($sql->mySQLlanguage != "") ? $sql->mySQLlanguage : $pref['sitelanguage'];
if (isset($_POST['metasubmit'])) if (isset($_POST['metasubmit']))
{ {
@@ -39,11 +39,11 @@ if (isset($_POST['metasubmit']))
$meta_author[$lan] = $pref['meta_author'][$lan]; $meta_author[$lan] = $pref['meta_author'][$lan];
} }
$meta_tag[$current_lang] = strip_if_magic(chop($_POST['meta'])); $meta_tag[e_LANGUAGE] = strip_if_magic(chop($_POST['meta']));
$meta_diz[$current_lang] = strip_if_magic(chop($_POST['meta_description'])); $meta_diz[e_LANGUAGE] = strip_if_magic(chop($_POST['meta_description']));
$meta_keywords[$current_lang] = strip_if_magic(chop($_POST['meta_keywords'])); $meta_keywords[e_LANGUAGE] = strip_if_magic(chop($_POST['meta_keywords']));
$meta_copyright[$current_lang] = strip_if_magic(chop($_POST['meta_copyright'])); $meta_copyright[e_LANGUAGE] = strip_if_magic(chop($_POST['meta_copyright']));
$meta_author[$current_lang] = strip_if_magic(chop($_POST['meta_author'])); $meta_author[e_LANGUAGE] = strip_if_magic(chop($_POST['meta_author']));
$pref['meta_news_summary'] = intval($_POST['meta_news_summary']); $pref['meta_news_summary'] = intval($_POST['meta_news_summary']);
$pref['meta_tag'] = $meta_tag; $pref['meta_tag'] = $meta_tag;
@@ -53,13 +53,13 @@ if (isset($_POST['metasubmit']))
$pref['meta_author'] = $meta_author; $pref['meta_author'] = $meta_author;
/* /*
if($pref['meta_tag'][$current_lang] == ""){ if($pref['meta_tag'][e_LANGUAGE] == ""){
unset($meta_tag[$current_lang]); unset($meta_tag[e_LANGUAGE]);
}*/ }*/
$admin_log->log_event('META_01','meta_news_summary=>'.$pref['meta_news_summary'].'[!br!]'.$current_lang,E_LOG_INFORMATIVE,''); $admin_log->log_event('META_01', 'meta_news_summary=>'.$pref['meta_news_summary'].'[!br!]'.e_LANGUAGE, E_LOG_INFORMATIVE, '');
save_prefs(); save_prefs();
$emessage->add(METLAN_1." ({$current_lang})", E_MESSAGE_SUCCESS); $emessage->add(METLAN_1." (".e_LANGUAGE.")", E_MESSAGE_SUCCESS);
} }
$meta = $pref['meta_tag']; $meta = $pref['meta_tag'];
@@ -71,7 +71,7 @@ $meta_author = $pref['meta_author'];
$text = " $text = "
<form method='post' action='".e_SELF."' id='dataform'> <form method='post' action='".e_SELF."' id='dataform'>
<fieldset id='core-meta-settings'> <fieldset id='core-meta-settings'>
<legend class='e-hideme'>".METLAN_8." (".$current_lang.")"."</legend> <legend class='e-hideme'>".METLAN_8." (".e_LANGUAGE.")"."</legend>
<table cellpadding='0' cellspacing='0' class='adminform'> <table cellpadding='0' cellspacing='0' class='adminform'>
<colgroup span='2'> <colgroup span='2'>
<col class='col-label' /> <col class='col-label' />
@@ -81,27 +81,27 @@ $text = "
<tr> <tr>
<td class='label'>".METLAN_9."</td> <td class='label'>".METLAN_9."</td>
<td class='control'> <td class='control'>
<textarea class='tbox textarea' title='meta_description' id='meta_description' name='meta_description' cols='70' rows='4'>".$tp->toForm($meta_diz[$current_lang])."</textarea> <textarea class='tbox textarea' title='meta_description' id='meta_description' name='meta_description' cols='70' rows='4'>".$tp->toForm($meta_diz[e_LANGUAGE])."</textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class='label'>".METLAN_10."</td> <td class='label'>".METLAN_10."</td>
<td class='control'> <td class='control'>
<textarea class='tbox textarea' title='meta_keywords' id='meta_keywords' name='meta_keywords' cols='70' rows='4'>".$tp->toForm($meta_keywords[$current_lang])."</textarea> <textarea class='tbox textarea' title='meta_keywords' id='meta_keywords' name='meta_keywords' cols='70' rows='4'>".$tp->toForm($meta_keywords[e_LANGUAGE])."</textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class='label'>".METLAN_11."</td> <td class='label'>".METLAN_11."</td>
<td class='control'> <td class='control'>
<input class='tbox input-text' size='70' type='text' name='meta_copyright' value='".$meta_copyright[$current_lang]."' /> <input class='tbox input-text' size='70' type='text' name='meta_copyright' value='".$meta_copyright[e_LANGUAGE]."' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td class='label'>".METLAN_13."</td> <td class='label'>".METLAN_13."</td>
<td class='control'> <td class='control'>
<input class='tbox input-text' size='70' type='text' name='meta_author' value=\"".$meta_author[$current_lang]."\" /> <input class='tbox input-text' size='70' type='text' name='meta_author' value=\"".$meta_author[e_LANGUAGE]."\" />
</td> </td>
</tr> </tr>
@@ -109,7 +109,7 @@ $text = "
<td class='label'>".METLAN_2."</td> <td class='label'>".METLAN_2."</td>
<td class='control'> <td class='control'>
<textarea class='tbox textarea' title=\"eg. <meta name='author' content='your name' />\" id='meta' name='meta' cols='70' <textarea class='tbox textarea' title=\"eg. <meta name='author' content='your name' />\" id='meta' name='meta' cols='70'
rows='10' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>".str_replace("<","&lt;",$tp->toForm($meta[$current_lang]))."</textarea> rows='10' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>".str_replace("<","&lt;",$tp->toForm($meta[e_LANGUAGE]))."</textarea>
<div class='smalltext field-help'>eg. &lt;meta name='author' content='your name' /&gt; </div> <div class='smalltext field-help'>eg. &lt;meta name='author' content='your name' /&gt; </div>
</td> </td>
</tr> </tr>
@@ -125,14 +125,14 @@ $text = "
</tbody> </tbody>
</table> </table>
<div class='buttons-bar center'> <div class='buttons-bar center'>
<button class='create' type='submit' name='metasubmit' value='".METLAN_3."'><span>".METLAN_3."</span></button> <button class='create' type='submit' name='metasubmit'><span>".METLAN_3."</span></button>
</div> </div>
</fieldset> </fieldset>
</form> </form>
"; ";
$e107->ns->tablerender(METLAN_8." (".$current_lang.")", $emessage->render().$text); $e107->ns->tablerender(METLAN_8." (".e_LANGUAGE.")", $emessage->render().$text);
require_once("footer.php"); require_once("footer.php");
/** /**