mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
More menu_class.php work. menu parms added.
This commit is contained in:
16
class2.php
16
class2.php
@@ -9,9 +9,9 @@
|
|||||||
* General purpose file
|
* General purpose file
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||||
* $Revision: 1.128 $
|
* $Revision: 1.129 $
|
||||||
* $Date: 2009-08-16 16:30:56 $
|
* $Date: 2009-08-16 23:58:30 $
|
||||||
* $Author: secretr $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//
|
//
|
||||||
@@ -885,7 +885,7 @@ if (!class_exists('e107table'))
|
|||||||
|
|
||||||
public $eMenuCount = 0;
|
public $eMenuCount = 0;
|
||||||
public $eMenuArea;
|
public $eMenuArea;
|
||||||
public $eMenuTotal = 0;
|
public $eMenuTotal = array();
|
||||||
public $eSetStyle;
|
public $eSetStyle;
|
||||||
|
|
||||||
function tablerender($caption, $text, $mode = 'default', $return = false)
|
function tablerender($caption, $text, $mode = 'default', $return = false)
|
||||||
@@ -917,7 +917,7 @@ if (!class_exists('e107table'))
|
|||||||
$this->eMenuCount++;
|
$this->eMenuCount++;
|
||||||
}
|
}
|
||||||
ob_start();
|
ob_start();
|
||||||
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>$this->eMenuTotal,'setStyle'=>$this->eSetStyle));
|
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>$this->eMenuTotal[$this->eMenuArea],'setStyle'=>$this->eSetStyle));
|
||||||
$ret=ob_get_contents();
|
$ret=ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
@@ -930,7 +930,7 @@ if (!class_exists('e107table'))
|
|||||||
{
|
{
|
||||||
$this->eMenuCount++;
|
$this->eMenuCount++;
|
||||||
}
|
}
|
||||||
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>$this->eMenuTotal,'setStyle'=>$this->eSetStyle));
|
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>$this->eMenuTotal[$this->eMenuArea],'setStyle'=>$this->eSetStyle));
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1488,7 +1488,7 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
|||||||
// Create the data to be stored
|
// Create the data to be stored
|
||||||
if($sql->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('SitePrefs', '".$eArrayStorage->WriteArray($_pref)."') "))
|
if($sql->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('SitePrefs', '".$eArrayStorage->WriteArray($_pref)."') "))
|
||||||
{
|
{
|
||||||
ecache::clear_sys('SitePrefs');
|
ecache::clear_sys('Config_core');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1504,7 +1504,7 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
|||||||
|
|
||||||
if($sql->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('IconPool', '".$eArrayStorage->WriteArray($_iconpool)."') "))
|
if($sql->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('IconPool', '".$eArrayStorage->WriteArray($_iconpool)."') "))
|
||||||
{
|
{
|
||||||
ecache::clear_sys('IconPool');
|
ecache::clear_sys('Config_ipool');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/sql/core_sql.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/sql/core_sql.php,v $
|
||||||
| $Revision: 1.19 $
|
| $Revision: 1.20 $
|
||||||
| $Date: 2009-07-09 02:47:12 $
|
| $Date: 2009-08-16 23:58:31 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -293,6 +293,7 @@ CREATE TABLE menus (
|
|||||||
menu_pages text NOT NULL,
|
menu_pages text NOT NULL,
|
||||||
menu_path varchar(100) NOT NULL default '',
|
menu_path varchar(100) NOT NULL default '',
|
||||||
menu_layout varchar(100) NOT NULL default '',
|
menu_layout varchar(100) NOT NULL default '',
|
||||||
|
menu_parms text NOT NULL,
|
||||||
PRIMARY KEY (menu_id)
|
PRIMARY KEY (menu_id)
|
||||||
) TYPE=MyISAM;
|
) TYPE=MyISAM;
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/* $Id: menu.php,v 1.6 2009-08-16 16:30:56 secretr Exp $ */
|
/* $Id: menu.php,v 1.7 2009-08-16 23:58:31 e107coders Exp $ */
|
||||||
|
|
||||||
function menu_shortcode($parm)
|
function menu_shortcode($parm)
|
||||||
{
|
{
|
||||||
return e107::getMenu()->render($parm);
|
return e107::getMenu()->renderArea($parm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
18
e107_files/shortcode/plugin.php
Normal file
18
e107_files/shortcode/plugin.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
/* $Id: plugin.php,v 1.1 2009-08-16 23:58:31 e107coders Exp $ */
|
||||||
|
|
||||||
|
function plugin_shortcode($parm)
|
||||||
|
{
|
||||||
|
global $sql, $tp, $ns;
|
||||||
|
|
||||||
|
$menu = $parm;
|
||||||
|
|
||||||
|
$path = $tp -> toDB(dirname($menu));
|
||||||
|
$name = $tp -> toDB(basename($menu));
|
||||||
|
|
||||||
|
if($path == '.')
|
||||||
|
{
|
||||||
|
$path = $menu;
|
||||||
|
}
|
||||||
|
return e107::getMenu()->renderMenu($path,$name);
|
||||||
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
+ ----------------------------------------------------------------------------+
|
||||||
| e107 website system
|
| e107 website system
|
||||||
@@ -10,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
|
||||||
| $Revision: 1.8 $
|
| $Revision: 1.9 $
|
||||||
| $Date: 2009-08-16 16:30:56 $
|
| $Date: 2009-08-16 23:58:31 $
|
||||||
| $Author: secretr $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT'))
|
if (!defined('e107_INIT'))
|
||||||
@@ -20,103 +21,106 @@ if(!defined('e107_INIT'))
|
|||||||
exit ();
|
exit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class e_menu
|
class e_menu
|
||||||
{
|
{
|
||||||
public $eMenuArea;
|
public $eMenuActive = array();
|
||||||
public $eMenuList;
|
// public $eMenuList = array();
|
||||||
public $eMenuActive;
|
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init
|
* Init
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$menu_layout_field = THEME_LAYOUT != e107 :: getPref('sitetheme_deflayout') ? THEME_LAYOUT : "";
|
$menu_layout_field = THEME_LAYOUT != e107 :: getPref('sitetheme_deflayout') ? THEME_LAYOUT : "";
|
||||||
$menu_data = e107 :: getCache()->retrieve_sys("menus_".USERCLASS_LIST."_".md5(e_LANGUAGE.$menu_layout_field));
|
$menu_data = e107 :: getCache()->retrieve_sys("menus_".USERCLASS_LIST."_".md5(e_LANGUAGE.$menu_layout_field));
|
||||||
$menu_data = e107 :: getArrayStorage()->ReadArray($menu_data);
|
$menu_data = e107 :: getArrayStorage()->ReadArray($menu_data);
|
||||||
$eMenuList = array();
|
|
||||||
$eMenuActive = array();
|
|
||||||
$eMenuArea = array();
|
$eMenuArea = array();
|
||||||
|
// $eMenuList = array();
|
||||||
|
// $eMenuActive = array(); // DEPRECATED
|
||||||
|
|
||||||
if (!is_array($menu_data))
|
if (!is_array($menu_data))
|
||||||
{
|
{
|
||||||
|
|
||||||
$menu_qry = 'SELECT * FROM #menus WHERE menu_location > 0 AND menu_class IN ('.USERCLASS_LIST.') AND menu_layout = "'.$menu_layout_field.'" ORDER BY menu_location,menu_order';
|
$menu_qry = 'SELECT * FROM #menus WHERE menu_location > 0 AND menu_class IN ('.USERCLASS_LIST.') AND menu_layout = "'.$menu_layout_field.'" ORDER BY menu_location,menu_order';
|
||||||
if (e107 :: getDb()->db_Select_gen($menu_qry))
|
if (e107 :: getDb()->db_Select_gen($menu_qry))
|
||||||
{
|
{
|
||||||
while ($row = e107 :: getDb()->db_Fetch())
|
while ($row = e107 :: getDb()->db_Fetch())
|
||||||
{
|
{
|
||||||
$eMenuList[$row['menu_location']][] = $row;
|
$eMenuArea[$row['menu_location']][] = $row;
|
||||||
$eMenuArea[$row['menu_location']][$row['menu_name']] = 1;
|
|
||||||
$eMenuActive[$row['menu_name']] = $row['menu_name'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$menu_data['menu_area'] = $eMenuArea;
|
|
||||||
$menu_data['menu_list'] = $eMenuList;
|
|
||||||
$menu_data['menu_active'] = $eMenuActive;
|
|
||||||
$menu_data = e107::getArrayStorage()->WriteArray($menu_data, false);
|
|
||||||
e107::getCache()->set_sys('menus_'.USERCLASS_LIST.'_'.md5(e_LANGUAGE), $menu_data);
|
|
||||||
|
|
||||||
unset($menu_data,$menu_layout_field,$menu_qry);
|
$menu_data['menu_area'] = $eMenuArea;
|
||||||
|
|
||||||
|
$menuData = e107 :: getArrayStorage()->WriteArray($menu_data,false);
|
||||||
|
e107 :: getCache()->set_sys('menus_'.USERCLASS_LIST.'_'.md5(e_LANGUAGE.$menu_layout_field),$menuData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$eMenuArea = $menu_data['menu_area'];
|
$eMenuArea = $menu_data['menu_area'];
|
||||||
$eMenuList = $menu_data['menu_list'];
|
}
|
||||||
$eMenuActive = $menu_data['menu_active'];
|
$total = array();
|
||||||
unset($menu_data);
|
foreach ($eMenuArea as $area => $val)
|
||||||
|
{
|
||||||
|
foreach ($val as $row)
|
||||||
|
{
|
||||||
|
if ($this->isVisible($row))
|
||||||
|
{
|
||||||
|
$path = str_replace("/","",$row['menu_path']);
|
||||||
|
if (!isset ($total[$area]))
|
||||||
|
{
|
||||||
|
$total[$area] = 0;
|
||||||
|
}
|
||||||
|
$this->eMenuActive[$area][] = $row;
|
||||||
|
$total[$area]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e107 :: getRender()->eMenuTotal = $total;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->eMenuActive = $eMenuActive;
|
|
||||||
$this->eMenuArea = $eMenuArea;
|
|
||||||
$this->eMenuList = $eMenuList;
|
|
||||||
}
|
|
||||||
|
|
||||||
function render($parm = '')
|
private function isVisible($row)
|
||||||
{
|
{
|
||||||
|
$show_menu = TRUE;
|
||||||
global $sql, $ns, $tp, $sc_style;
|
|
||||||
global $error_handler;
|
|
||||||
$e107 = e107::getInstance();
|
|
||||||
|
|
||||||
$eMenuList = $this->eMenuList;
|
|
||||||
|
|
||||||
$tmp = explode(':',$parm);
|
|
||||||
|
|
||||||
$buffer_output = true; // Default - return all output.
|
|
||||||
if (isset($tmp[1]) && $tmp[1] == 'echo') { $buffer_output = false; }
|
|
||||||
|
|
||||||
if (!array_key_exists($tmp[0], $eMenuList)) { return; }
|
|
||||||
|
|
||||||
if ($buffer_output)
|
|
||||||
{
|
|
||||||
ob_start();
|
|
||||||
}
|
|
||||||
|
|
||||||
e107::getRender()->eMenuArea = $tmp[0];
|
|
||||||
|
|
||||||
|
|
||||||
foreach($eMenuList[$tmp[0]] as $row)
|
|
||||||
{
|
|
||||||
$pkey = str_replace("/","",$row['menu_path']);
|
|
||||||
$show_menu[$pkey] = $row['menu_name'];
|
|
||||||
|
|
||||||
if ($row['menu_pages'])
|
if ($row['menu_pages'])
|
||||||
{
|
{
|
||||||
list($listtype, $listpages) = explode('-', $row['menu_pages'], 2);
|
list($listtype,$listpages) = explode("-",$row['menu_pages'],2);
|
||||||
$pagelist = explode('|',$listpages);
|
$pagelist = explode("|",$listpages);
|
||||||
$check_url = e_SELF.(e_QUERY ? '?'.e_QUERY : '');
|
$check_url = e_SELF.(e_QUERY ? "?".e_QUERY : '');
|
||||||
|
|
||||||
if($listtype == '1') //show menu
|
switch ($listtype)
|
||||||
{
|
{
|
||||||
//$show_menu[$pkey] = FALSE;
|
case '1' : //show menu
|
||||||
unset($show_menu[$pkey]);
|
|
||||||
|
$show_menu = false;
|
||||||
|
foreach ($pagelist as $p)
|
||||||
|
{
|
||||||
|
if (substr($p,- 1) === '!')
|
||||||
|
{
|
||||||
|
$p = substr($p,0,- 1);
|
||||||
|
$show_menu = TRUE;
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
|
elseif (strpos($check_url,$p) !== FALSE)
|
||||||
|
{
|
||||||
|
$show_menu = TRUE;
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '2' : //hide menu
|
||||||
|
|
||||||
|
$show_menu = TRUE;
|
||||||
foreach ($pagelist as $p)
|
foreach ($pagelist as $p)
|
||||||
{
|
{
|
||||||
if (substr($p,- 1) == '!')
|
if (substr($p,- 1) == '!')
|
||||||
@@ -124,63 +128,80 @@ class e_menu
|
|||||||
$p = substr($p,0,- 1);
|
$p = substr($p,0,- 1);
|
||||||
if (substr($check_url,strlen($p) * - 1) == $p)
|
if (substr($check_url,strlen($p) * - 1) == $p)
|
||||||
{
|
{
|
||||||
// $show_menu[$pkey] = TRUE;
|
$show_menu = FALSE;
|
||||||
$show_menu[$pkey] = $row['menu_name'];
|
break 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
elseif (strpos($check_url,$p) !== FALSE)
|
||||||
{
|
{
|
||||||
if(strpos($check_url,$p) !== FALSE)
|
$show_menu = FALSE;
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} //end switch
|
||||||
|
|
||||||
|
} //endif menu_pages
|
||||||
|
|
||||||
|
return $show_menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function renderArea($parm = '')
|
||||||
{
|
{
|
||||||
// $show_menu[$pkey] = TRUE;
|
global $sql,$ns,$tp,$sc_style;
|
||||||
$show_menu[$pkey] = $row['menu_name'];
|
global $error_handler;
|
||||||
}
|
$e107 = e107 :: getInstance();
|
||||||
}
|
$tmp = explode(':',$parm);
|
||||||
}
|
$buffer_output = true; // Default - return all output.
|
||||||
}
|
|
||||||
elseif($listtype == '2') //hide menu
|
if (isset ($tmp[1]) && $tmp[1] == 'echo')
|
||||||
{
|
{
|
||||||
// $show_menu[$pkey] = TRUE;
|
$buffer_output = false;
|
||||||
$show_menu[$pkey] = $row['menu_name'];
|
}
|
||||||
foreach($pagelist as $p) {
|
if (!array_key_exists($tmp[0],$this->eMenuActive))
|
||||||
if(substr($p, -1) == '!')
|
|
||||||
{
|
{
|
||||||
$p = substr($p, 0, -1);
|
return;
|
||||||
if(substr($check_url, strlen($p)*-1) == $p)
|
}
|
||||||
|
if ($buffer_output)
|
||||||
{
|
{
|
||||||
// $show_menu[$pkey] = FALSE;
|
ob_start();
|
||||||
unset($show_menu[$pkey]);
|
|
||||||
}
|
}
|
||||||
}
|
e107 :: getRender()->eMenuArea = $tmp[0];
|
||||||
else
|
foreach ($this->eMenuActive[$tmp[0]] as $row)
|
||||||
{
|
{
|
||||||
if(strpos($check_url, $p) !== FALSE)
|
$this->renderMenu($row['menu_path'],$row['menu_name'],$row['menu_parms']);
|
||||||
|
}
|
||||||
|
e107 :: getRender()->eMenuCount = 0;
|
||||||
|
e107 :: getRender()->eMenuArea = null;
|
||||||
|
if ($buffer_output)
|
||||||
{
|
{
|
||||||
// $show_menu[$pkey] = FALSE;
|
$ret = ob_get_contents();
|
||||||
unset($show_menu[$pkey]);
|
ob_end_clean();
|
||||||
}
|
return $ret;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
e107::getRender()->eMenuTotal = count($show_menu);
|
|
||||||
|
|
||||||
foreach($show_menu as $mpath=>$mname)
|
public function renderMenu($mpath,$mname,$parm = '')
|
||||||
{
|
{
|
||||||
// $mname = $row['menu_name'];
|
global $sql; // required at the moment.
|
||||||
|
global $ns,$tp,$sc_style;
|
||||||
|
$e107 = e107 :: getInstance();
|
||||||
|
|
||||||
if ($error_handler->debug == true)
|
if ($error_handler->debug == true)
|
||||||
{
|
{
|
||||||
echo "\n<!-- Menu Start: ".$mname." -->\n";
|
echo "\n<!-- Menu Start: ".$mname." -->\n";
|
||||||
}
|
}
|
||||||
$sql->db_Mark_Time($mname);
|
|
||||||
|
e107 :: getDB()->db_Mark_Time($mname);
|
||||||
|
|
||||||
if (is_numeric($mpath))
|
if (is_numeric($mpath))
|
||||||
{
|
{
|
||||||
$sql->db_Select("page","*","page_id='".$mpath."' ");
|
$sql->db_Select("page","*","page_id='".$mpath."' ");
|
||||||
$page = $sql->db_Fetch();
|
$page = $sql->db_Fetch();
|
||||||
$caption = $e107->tp->toHTML($page['page_title'], TRUE, 'parse_sc, constants');
|
$caption = $e107->tp->toHTML($page['page_title'],true,'parse_sc, constants');
|
||||||
$text = $e107->tp->toHTML($page['page_text'], TRUE, 'parse_sc, constants');
|
$text = $e107->tp->toHTML($page['page_text'],true,'parse_sc, constants');
|
||||||
e107 :: getRender()->tablerender($caption,$text);
|
e107 :: getRender()->tablerender($caption,$text);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -201,30 +222,19 @@ class e_menu
|
|||||||
{
|
{
|
||||||
include_once (e_PLUGIN.$mpath."/languages/English/English.php");
|
include_once (e_PLUGIN.$mpath."/languages/English/English.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(e_PLUGIN.$mpath."/".$mname.".php"))
|
if (file_exists(e_PLUGIN.$mpath."/".$mname.".php"))
|
||||||
{
|
{
|
||||||
include_once (e_PLUGIN.$mpath."/".$mname.".php");
|
include_once (e_PLUGIN.$mpath."/".$mname.".php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql->db_Mark_Time("(After ".$mname.")");
|
|
||||||
|
e107 :: getDB()->db_Mark_Time("(After ".$mname.")");
|
||||||
if ($error_handler->debug == true)
|
if ($error_handler->debug == true)
|
||||||
{
|
{
|
||||||
echo "\n<!-- Menu End: ".$mname." -->\n";
|
echo "\n<!-- Menu End: ".$mname." -->\n";
|
||||||
}
|
}
|
||||||
unset($caption,$text); // clear variables for proceeding menus.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
e107::getRender()->eMenuCount = 0;
|
|
||||||
e107::getRender()->eMenuArea = null;
|
|
||||||
|
|
||||||
|
|
||||||
if ($buffer_output)
|
|
||||||
{
|
|
||||||
$ret = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -10,9 +10,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/menumanager_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/menumanager_class.php,v $
|
||||||
| $Revision: 1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2009-08-16 16:30:56 $
|
| $Date: 2009-08-16 23:58:31 $
|
||||||
| $Author: secretr $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -213,7 +213,7 @@ class e_menuManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$file = urldecode($_GET['path']).".php";
|
$file = urldecode($_GET['path']).".php";
|
||||||
$newurl = e_PLUGIN_ABS.$file;
|
$newurl = e_PLUGIN_ABS.$file."?id=".$_GET['id'];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@@ -1053,7 +1053,7 @@ class e_menuManager {
|
|||||||
|
|
||||||
if($conf)
|
if($conf)
|
||||||
{
|
{
|
||||||
$text .= '<a href="'.e_SELF.'?lay='.$this->curLayout.'&mode=conf&path='.urlencode($conf).'">
|
$text .= '<a href="'.e_SELF.'?lay='.$this->curLayout.'&mode=conf&path='.urlencode($conf).'&id='.$menu_id.'">
|
||||||
'.ADMIN_CONFIGURE_ICON.'
|
'.ADMIN_CONFIGURE_ICON.'
|
||||||
</a>';
|
</a>';
|
||||||
}
|
}
|
||||||
|
@@ -11,12 +11,12 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/siteinfo_menu/sitebutton_menu.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/siteinfo_menu/sitebutton_menu.php,v $
|
||||||
| $Revision: 1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2007-03-23 22:42:40 $
|
| $Date: 2009-08-16 23:58:31 $
|
||||||
| $Author: lisa_ $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
echo "parm=".$parm; //FIXME - just for testing only.
|
||||||
$ns->tablerender(SITEBUTTON_MENU_L1, "<div style='text-align:center'>\n<a href='".SITEURL."'><img src='".(strstr(SITEBUTTON, "http:") ? SITEBUTTON : e_IMAGE.SITEBUTTON)."' alt='".SITEBUTTON_MENU_L1."' style='border: 0px; width: 88px; height: 31px' /></a>\n</div>", 'sitebutton');
|
$ns->tablerender(SITEBUTTON_MENU_L1, "<div style='text-align:center'>\n<a href='".SITEURL."'><img src='".(strstr(SITEBUTTON, "http:") ? SITEBUTTON : e_IMAGE_ABS.SITEBUTTON)."' alt='".SITEBUTTON_MENU_L1."' style='border: 0px; width: 88px; height: 31px' /></a>\n</div>", 'sitebutton');
|
||||||
?>
|
?>
|
@@ -1,30 +1,37 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Dummy Theme Configuration File.
|
// Dummy Theme Configuration File.
|
||||||
|
class theme__blank
|
||||||
function _blank_process()
|
|
||||||
{
|
{
|
||||||
global $theme_pref;
|
var $themePref;
|
||||||
|
|
||||||
|
function process()
|
||||||
|
{
|
||||||
|
$theme_pref = array();
|
||||||
|
|
||||||
|
$pref = e107::getConfig();
|
||||||
$theme_pref['example'] = $_POST['_blank_example'];
|
$theme_pref['example'] = $_POST['_blank_example'];
|
||||||
$theme_pref['example2'] = $_POST['_blank_example2'];
|
$theme_pref['example2'] = $_POST['_blank_example2'];
|
||||||
save_prefs('theme');
|
|
||||||
|
// print_a($theme_pref);
|
||||||
|
$pref->add('sitetheme_pref', $theme_pref);
|
||||||
|
print_a($pref->get('sitetheme_pref'));
|
||||||
|
var_dump($pref->add('sitetheme_pref', $theme_pref)->save(FALSE));
|
||||||
|
// save_prefs($pref['sitetheme_pref']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function config()
|
||||||
function _blank_config()
|
|
||||||
{
|
{
|
||||||
global $theme_pref;
|
|
||||||
|
|
||||||
$var[0]['caption'] = "Sample configuration field";
|
$var[0]['caption'] = "Sample configuration field";
|
||||||
$var[0]['html'] = "<input type='text' name='_blank_example' value='".$theme_pref['_blank_example']."' />";
|
$var[0]['html'] = "<input type='text' name='_blank_example' value='".e107::getThemePref('example')."' />";
|
||||||
|
|
||||||
$var[1]['caption'] = "Another Example";
|
$var[1]['caption'] = "Another Example";
|
||||||
$var[1]['html'] = "<input type='text' name='_blank_example2' value='".$theme_pref['_blank_example2']."' />";
|
$var[1]['html'] = "<input type='text' name='_blank_example2' value='".e107::getThemePref('example2')."' />";
|
||||||
|
var_dump(e107::getThemePref());
|
||||||
return $var;
|
return $var;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _blank_help()
|
function help()
|
||||||
{
|
{
|
||||||
return "
|
return "
|
||||||
<div class='block-text' style='text-align:left;margin-left:auto;margin-right:auto;width:80%'>
|
<div class='block-text' style='text-align:left;margin-left:auto;margin-right:auto;width:80%'>
|
||||||
@@ -53,6 +60,7 @@ function _blank_help()
|
|||||||
";
|
";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Dummy Theme Configuration File.
|
// Dummy Theme Configuration File.
|
||||||
|
class theme_e107v4a
|
||||||
function e107v4a_process()
|
{
|
||||||
|
function process()
|
||||||
{
|
{
|
||||||
global $theme_pref;
|
global $theme_pref;
|
||||||
$theme_pref['example'] = $_POST['e1074a_example'];
|
$theme_pref['example'] = $_POST['e1074a_example'];
|
||||||
@@ -12,7 +13,7 @@ function e107v4a_process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function e107v4a_config()
|
function config()
|
||||||
{
|
{
|
||||||
global $theme_pref;
|
global $theme_pref;
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ function e107v4a_config()
|
|||||||
|
|
||||||
return $var;
|
return $var;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_themes/e107v4a/theme.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_themes/e107v4a/theme.php,v $
|
||||||
| $Revision: 1.5 $
|
| $Revision: 1.6 $
|
||||||
| $Date: 2009-08-14 22:31:09 $
|
| $Date: 2009-08-16 23:58:33 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -74,6 +74,7 @@ $HEADER['3_column'] =
|
|||||||
|
|
||||||
$FOOTER['3_column'] =
|
$FOOTER['3_column'] =
|
||||||
"</td><td style='width:20%; vertical-align:top'>
|
"</td><td style='width:20%; vertical-align:top'>
|
||||||
|
{PLUGIN=user_menu/usertheme_menu}
|
||||||
{SETSTYLE=rightmenu}
|
{SETSTYLE=rightmenu}
|
||||||
{MENU=2}
|
{MENU=2}
|
||||||
</td></tr>
|
</td></tr>
|
||||||
@@ -254,6 +255,7 @@ define(LINKALIGN, "left");
|
|||||||
function tablestyle($caption, $text,$id, $dataArray)
|
function tablestyle($caption, $text,$id, $dataArray)
|
||||||
{
|
{
|
||||||
// global $style; // Not needed - see $dataArray;
|
// global $style; // Not needed - see $dataArray;
|
||||||
|
// print_a($dataArray);
|
||||||
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
|
Reference in New Issue
Block a user