1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +02:00

TinyMce upgrades.

This commit is contained in:
CaMer0n
2009-09-21 21:54:36 +00:00
parent efda62371f
commit 8abfefa2a2
2 changed files with 6 additions and 92 deletions

View File

@@ -1,90 +0,0 @@
global $sql, $tp, $ns;
$menu = $parm;
$path = $tp -> toDB(dirname($menu));
$name = $tp -> toDB(basename($menu));
$plugin_file = "";
if($path == '.')
{
$path = $menu;
}
if($sql->db_Select('menus','menu_id, menu_pages',"menu_name = '$name' AND (menu_path = '".$path."/' OR menu_path = '".$path."') AND menu_class IN (".USERCLASS_LIST.")"))
{
$row = $sql->db_Fetch();
$show_menu = TRUE;
if($row['menu_pages'])
{
list($listtype,$listpages) = explode("-",$row['menu_pages']);
$pagelist = explode("|",$listpages);
$check_url = e_SELF."?".e_QUERY;
if($listtype == '1') //show menu
{
$show_menu = FALSE;
foreach($pagelist as $p)
{
if(strpos($check_url,$p) !== FALSE)
{
$show_menu = TRUE;
break; // Speed things up a bit
}
}
}
elseif($listtype == '2') //hide menu
{
$show_menu = TRUE;
foreach($pagelist as $p)
{
if(strpos($check_url,$p) !== FALSE)
{
$show_menu = FALSE;
break; // Speed things up a bit
}
}
}
}
if($show_menu)
{
$sql->db_Mark_Time($name);
$plugin_file = e_PLUGIN.$path."/".$name.".php";
}
}
else
{
if(is_readable(e_PLUGIN.$path."/".$name.".php"))
{
$sql->db_Mark_Time($name);
$plugin_file = e_PLUGIN.$path."/".$name.".php";
}
}
if($plugin_file != "")
{
// If we're showing anything, we'll need the lan file (unless 'custom') (use same logic as menu shortcode)
if($path != 'custom')
{
if (is_readable(e_PLUGIN.$path."/languages/".e_LANGUAGE.".php"))
{
include_once(e_PLUGIN.$path."/languages/".e_LANGUAGE.".php");
}
elseif (is_readable(e_PLUGIN.$path."/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"))
{
include_once(e_PLUGIN.$path."/languages/".e_LANGUAGE."/".e_LANGUAGE.".php");
}
elseif (is_readable(e_PLUGIN.$path."/languages/English.php"))
{
include_once(e_PLUGIN.$path."/languages/English.php");
}
elseif (is_readable(e_PLUGIN.$path."/languages/English/English.php"))
{
include_once(e_PLUGIN.$path."/languages/English/English.php");
}
}
ob_start();
include(e_PLUGIN.$path."/".$name.".php");
$buff = ob_get_contents();
ob_end_clean();
$sql->db_Mark_Time("(After $name)");
return $buff;
}

View File

@@ -9,8 +9,8 @@
* Plugin Administration - gsitemap
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/tinymce/admin_config.php,v $
* $Revision: 1.5 $
* $Date: 2009-07-14 11:05:54 $
* $Revision: 1.6 $
* $Date: 2009-09-21 21:54:26 $
* $Author: e107coders $
*
*/
@@ -21,6 +21,10 @@ if(!getperms("P") || !plugInstalled('tinymce'))
exit();
}
//TODO save prefs to separate config row.
// List all forms of access, and allow the user to choose between simple/advanced or 'custom' settings.
require_once (e_HANDLER.'message_handler.php');
$emessage = &eMessage::getInstance();