1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Menu Manager: Text to Lans and Removal of Unused #6

Menu Manager: Text to Lans and Removal of Unused #6 - and a little bit
in Theme Handler
This commit is contained in:
MikeyGMT
2016-12-20 20:26:00 +00:00
parent 73028d2e2e
commit 192fd304f2
5 changed files with 55 additions and 42 deletions

View File

@@ -667,7 +667,7 @@ if($_SERVER['E_DEV_MENU'] == 'true')
</div>"; </div>";
return array('caption'=>'DragNDrop Items','text'=>$text); return array('caption'=>MENLAN_57,'text'=>$text);
} }
//} //}
@@ -1143,7 +1143,7 @@ class e_layout
<table class='table adminform'> <table class='table adminform'>
<tr> <tr>
<td> <td>
".MENLAN_4." ". ".LAN_VISIBLE_TO." ".
r_userclass('menu_class', intval($_GET['class']), "off", "public,member,guest,admin,main,classes,nobody")." r_userclass('menu_class', intval($_GET['class']), "off", "public,member,guest,admin,main,classes,nobody")."
</td> </td>
</tr> </tr>
@@ -1314,7 +1314,7 @@ class e_layout
// $ns->frontend = false; // $ns->frontend = false;
$ns->tablerender("Menu Layout",$text); $ns->tablerender(MENLAN_55,$text);
} }

View File

@@ -2,7 +2,7 @@
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2013 e107 Inc (e107.org) * Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
@@ -10,7 +10,7 @@
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
require_once(e_HANDLER."form_handler.php"); $frm = e107::getForm();
class e_menuManager { class e_menuManager {
@@ -562,7 +562,7 @@ class e_menuManager {
if(!is_object($obj)) if(!is_object($obj))
{ {
$text .= "<tr><td colspan='2' class='alert alert-danger'>{$plug} object not found. Try re-scanning plugin directories in Tools > Database. </td></tr>"; $text .= "<tr><td colspan='2' class='alert alert-danger'>".$tp->lanVars(MENLAN_46, $plug)."</td></tr>";
} }
else else
{ {
@@ -610,7 +610,7 @@ class e_menuManager {
} }
else else
{ {
$text .= "<tr><td colspan='2' class='alert alert-danger'>No Fields Set in ".$row['menu_path']."e_menu.php</td></tr>"; $text .= "<tr><td colspan='2' class='alert alert-danger'>".MENLAN_47.": ".$row['menu_path']."e_menu.php</td></tr>";
} }
} }
@@ -661,7 +661,7 @@ class e_menuManager {
if(!$sql->select("menus", "*", "menu_id=".intval($_GET['vis']))) if(!$sql->select("menus", "*", "menu_id=".intval($_GET['vis'])))
{ {
$this->menuAddMessage("Couldn't Load Menu",E_MESSAGE_ERROR); $this->menuAddMessage(MENLAN_48,E_MESSAGE_ERROR);
return; return;
} }
@@ -679,7 +679,7 @@ class e_menuManager {
<tr> <tr>
<td> <td>
<input type='hidden' name='menuAct[{$row['menu_id']}]' value='sv.{$row['menu_id']}' /> <input type='hidden' name='menuAct[{$row['menu_id']}]' value='sv.{$row['menu_id']}' />
".MENLAN_4." ". ".LAN_VISIBLE_TO." ".
$frm->userclass('menu_class', $row['menu_class'], 'dropdown', array('options'=>"public,member,guest,admin,main,classes,nobody", 'class'=>'e-save'))." $frm->userclass('menu_class', $row['menu_class'], 'dropdown', array('options'=>"public,member,guest,admin,main,classes,nobody", 'class'=>'e-save'))."
</td> </td>
</tr> </tr>
@@ -1034,7 +1034,7 @@ class e_menuManager {
$color = (varset($color) == "white") ? "#DDDDDD" : "white"; $color = (varset($color) == "white") ? "#DDDDDD" : "white";
if($row['menu_pages'] == "dbcustom") if($row['menu_pages'] == "dbcustom")
{ {
$pdeta = MENLAN_42; $pdeta = LAN_CUSTOM;
} }
else else
{ {
@@ -1149,14 +1149,14 @@ class e_menuManager {
} }
$text .= "<tr><th colspan='2'>Your Menus</th></tr>"; $text .= "<tr><th colspan='2'>".MENLAN_49."</th></tr>";
foreach($pageMenu as $row) foreach($pageMenu as $row)
{ {
$text .= $this->renderOptionRow($row); $text .= $this->renderOptionRow($row);
} }
$text .= "<tr><th colspan='2' >Plugin Menus</th></tr>"; $text .= "<tr><th colspan='2' >".MENLAN_50."</th></tr>";
foreach($pluginMenu as $row) foreach($pluginMenu as $row)
{ {
$text .= $this->renderOptionRow($row); $text .= $this->renderOptionRow($row);
@@ -1189,12 +1189,12 @@ class e_menuManager {
if(!count($this->menu_areas)) if(!count($this->menu_areas))
{ {
$text = "<div class='alert alert-block alert-warning text-left'>"; $text = "<div class='alert alert-block alert-warning text-left'>";
$text .= "This layout does NOT contain any dynamic {MENU} areas.<br />"; $text .= MENLAN_51."<br />";
if(isset($this->customMenu) && count($this->customMenu)) if(isset($this->customMenu) && count($this->customMenu))
{ {
$text .= "<p>It DOES contain the following custom menus: <ul ><li>".implode("</li><li>",$this->customMenu)."</li></ul></p>"; $text .= "<p>".MENLAN_52."<ul ><li>".implode("</li><li>",$this->customMenu)."</li></ul></p>";
$text .= "<p><a href='".e_ADMIN."cpage.php?mode=menu&action=list&tab=2' class='button btn btn-primary'>Go to Custom-Menu area</a></p>"; $text .= "<p><a href='".e_ADMIN."cpage.php?mode=menu&action=list&tab=2' class='button btn btn-primary'>".MENLAN_53."</a></p>";
} }
$text .= "</div>"; $text .= "</div>";
@@ -1226,7 +1226,7 @@ class e_menuManager {
// onchange=\"urljump(this.options[selectedIndex].value);\" // onchange=\"urljump(this.options[selectedIndex].value);\"
$text = "<form class='form-inline' method='post' action='".e_SELF."?configure=".$this->curLayout."'>"; $text = "<form class='form-inline' method='post' action='".e_SELF."?configure=".$this->curLayout."'>";
$text .= "<div class='buttons-bar'>Theme Layout: "; $text .= "<div class='buttons-bar'>".MENLAN_54.": ";
$text .= "<select name='custom_select' style='width:auto' id='menuManagerSelect' >\n"; //tbox class will break links. // window.frames['menu_iframe'].location=this.options[selectedIndex].value ??? $text .= "<select name='custom_select' style='width:auto' id='menuManagerSelect' >\n"; //tbox class will break links. // window.frames['menu_iframe'].location=this.options[selectedIndex].value ???
@@ -1365,7 +1365,7 @@ class e_menuManager {
} }
elseif(strstr($str, "LANGUAGELINKS")) elseif(strstr($str, "LANGUAGELINKS"))
{ {
echo "<div class=text style='padding: 2px; text-align: center'>[Language]</div>"; echo "<div class=text style='padding: 2px; text-align: center'>[".LAN_LANGUAGE."]</div>";
} }
elseif(strstr($str, "CUSTOM")) elseif(strstr($str, "CUSTOM"))
{ {
@@ -1395,7 +1395,7 @@ class e_menuManager {
}*/ }*/
elseif(strstr($str, "{FEATUREBOX")) elseif(strstr($str, "{FEATUREBOX"))
{ {
echo "<div class=text style='padding: 80px; text-align: center'>[Featurebox Area]</div>"; echo "<div class=text style='padding: 80px; text-align: center'>[".LAN_PLUGIN_FEATUREBOX_NAME."]</div>";
// echo $this->renderPanel('Embedded Custom Menu',$cust); // echo $this->renderPanel('Embedded Custom Menu',$cust);
} }
// Display embedded Plugin information. // Display embedded Plugin information.
@@ -1608,12 +1608,12 @@ class e_menuManager {
if($conf) if($conf)
{ {
$text .= '<a data-modal-caption="Configure Menu" class="e-modal-menumanager menu-btn" target="_top" href="'.e_SELF.'?lay='.$this->curLayout.'&amp;mode=conf&amp;path='.urlencode($conf).'&amp;id='.$menu_id.'&iframe=1" $text .= '<a data-modal-caption="'.LAN_OPTIONS.'" class="e-modal-menumanager menu-btn" target="_top" href="'.e_SELF.'?lay='.$this->curLayout.'&amp;mode=conf&amp;path='.urlencode($conf).'&amp;id='.$menu_id.'&iframe=1"
title="Configure menu"><i class="S16 e-configure-16"></i></a>'; title="'.LAN_OPTIONS.'"><i class="S16 e-configure-16"></i></a>';
} }
$editLink = e_SELF."?enc=".base64_encode('lay='.$this->curLayout.'&parmsId='.$menu_id.'&iframe=1'); $editLink = e_SELF."?enc=".base64_encode('lay='.$this->curLayout.'&parmsId='.$menu_id.'&iframe=1');
$text .= '<a data-modal-caption="Configure parameters" class="e-menumanager-option menu-btn" target="_top" href="'.$editLink.'" title="Configure parameters"><i class="S16 e-edit-16" ></i></a>'; $text .= '<a data-modal-caption="'.LAN_CONFIGURE.'" class="e-menumanager-option menu-btn" target="_top" href="'.$editLink.'" title="'.LAN_CONFIGURE.'"><i class="S16 e-edit-16" ></i></a>';
$text .= '<a title="'.LAN_DELETE.'" id="remove-'.$menu_id.'-'.$menu_location.'" class="delete e-menumanager-delete menu-btn" href="'.e_SELF.'?configure='.$this->curLayout.'&amp;mode=deac&amp;id='.$menu_id.'"><i class="S16 e-delete-16"></i></a> $text .= '<a title="'.LAN_DELETE.'" id="remove-'.$menu_id.'-'.$menu_location.'" class="delete e-menumanager-delete menu-btn" href="'.e_SELF.'?configure='.$this->curLayout.'&amp;mode=deac&amp;id='.$menu_id.'"><i class="S16 e-delete-16"></i></a>

View File

@@ -2,7 +2,7 @@
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2013 e107 Inc (e107.org) * Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
@@ -1811,10 +1811,8 @@ class themeHandler
if($core->save()) if($core->save())
{ {
//TODO LANs $mes->addDebug(MENLAN_31.": ".$deflayout);
$mes->addDebug(MENLAN_56.": ".print_a($customPages,true));
$mes->addDebug("Default Layout: ".$deflayout);
$mes->addDebug("Custom Pages: ".print_a($customPages,true));
$med = e107::getMedia(); $med = e107::getMedia();
$med->import('_common_image', e_THEME.$name, "^.*?logo.*?(\.png|\.jpeg|\.jpg|\.JPG|\.GIF|\.PNG)$"); $med->import('_common_image', e_THEME.$name, "^.*?logo.*?(\.png|\.jpeg|\.jpg|\.JPG|\.GIF|\.PNG)$");

View File

@@ -365,6 +365,8 @@ define("LAN_ID", "ID");
define("LAN_VISIBILITY", "Visibility"); define("LAN_VISIBILITY", "Visibility");
define("LAN_VISIBLE_TO", "Visible To");
define("LAN_ICON", "Icon"); define("LAN_ICON", "Icon");
define("LAN_LOADING", "Loading..."); define("LAN_LOADING", "Loading...");

View File

@@ -1,27 +1,27 @@
<?php <?php
/* /*
* Copyright (C) 2008-2013 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt) * Copyright (C) 2008-2016 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* *
* Admin Language File * Admin Language File
* *
*/ */
define("MENLAN_1", "Visible to all"); //define("MENLAN_1", "Visible to all");
define("MENLAN_2", "Visible to members only"); //define("MENLAN_2", "Visible to members only");
define("MENLAN_3", "Visible to administrators only"); //define("MENLAN_3", "Visible to administrators only");
define("MENLAN_4", "Only visible to:"); //define("MENLAN_4", "Only visible to:");//LAN_VISIBLE_TO
// define("MENLAN_5", "class"); // define("MENLAN_5", "class");
define("MENLAN_6", "Save visibility options"); //define("MENLAN_6", "Save visibility options");
define("MENLAN_7", "Configure visibility options for"); define("MENLAN_7", "Configure visibility options for");
define("MENLAN_8", "Visibility options updated"); //define("MENLAN_8", "Visibility options updated");
define("MENLAN_9", "New custom menu installed"); //define("MENLAN_9", "New custom menu installed");
define("MENLAN_10", "New menu installed"); define("MENLAN_10", "New menu installed");
define("MENLAN_11", "Menu removed"); define("MENLAN_11", "Menu removed");
define("MENLAN_12", "Activate: choose area"); //define("MENLAN_12", "Activate: choose area");
define("MENLAN_13", "Activate in Area"); define("MENLAN_13", "Activate in Area");
define("MENLAN_14", "Area"); define("MENLAN_14", "Area");
define("MENLAN_15", "Deactivate"); define("MENLAN_15", "Deactivate");
// define("MENLAN_16", "Configure"); // now in lan_admin.php //define("MENLAN_16", "Configure"); // now in lan_admin.php
define("MENLAN_17", "Move Up"); define("MENLAN_17", "Move Up");
define("MENLAN_18", "Move Down"); define("MENLAN_18", "Move Down");
define("MENLAN_19", "Move to Area"); define("MENLAN_19", "Move to Area");
@@ -38,26 +38,39 @@ 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_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_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_29", "Select Layout");
define("MENLAN_30", "To see the menu areas and their positions for custom layouts, select the custom layout here."); define("MENLAN_30", "To see the menu areas and their positions for custom layouts, select the custom layout here.");
define("MENLAN_31", "Default Layout"); define("MENLAN_31", "Default Layout");
define("MENLAN_32", "Newsheader Layout"); //define("MENLAN_32", "Newsheader Layout");
define("MENLAN_33", "Custom Layout"); define("MENLAN_33", "Custom Layout");
define("MENLAN_34", "Embedded"); define("MENLAN_34", "Embedded");
// define("MENLAN_35", "Configure Menus"); now in lan_admin.php //define("MENLAN_35", "Configure Menus"); now in lan_admin.php
define("MENLAN_36", "Choose the menu(s) to activate"); define("MENLAN_36", "Choose the menu(s) to activate");
define("MENLAN_37", "and where to activate them."); define("MENLAN_37", "and where to activate them.");
define("MENLAN_38", "Hold down CTRL to select multiple menus."); //define("MENLAN_38", "Hold down CTRL to select multiple menus.");
// -- // --
define("MENLAN_39", "Preset Area"); define("MENLAN_39", "Preset Area");
define("MENLAN_40", "Use Menu Presets"); define("MENLAN_40", "Use Menu Presets");
define("MENLAN_41", "The position of all your menus for this layout will be lost. Do you still wish to continue?"); define("MENLAN_41", "The position of all your menus for this layout will be lost. Do you still wish to continue?");
define("MENLAN_42", "Custom"); //define("MENLAN_42", "Custom");//LAN_CUSTOM
define("MENLAN_43", "Menu Preset Activated"); define("MENLAN_43", "Menu Preset Activated");
define("MENLAN_44", "Menu parameters"); define("MENLAN_44", "Menu parameters");
define("MENLAN_45", "Parameters (query string format):"); define("MENLAN_45", "Parameters (query string format):");
?> define("MENLAN_46", "[x] object not found. Try re-scanning plugin directories in Tools > Database.");
define("MENLAN_47", "No Fields Set in");
define("MENLAN_48", "Menu could not be loaded");
define("MENLAN_49", "Your Menus");
define("MENLAN_50", "Plugin Menus");
define("MENLAN_51", "This layout does NOT contain any dynamic {MENU} areas.");
define("MENLAN_52", "It DOES contain the following custom menus: ");
define("MENLAN_53", "Go to Custom-Menu Area");
define("MENLAN_54", "Theme Layout");
define("MENLAN_55", "Menu Layout");
define("MENLAN_56", "Custom Pages");
define("MENLAN_57", "Drag-and-Drop Menus");
?>