mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Load admin phrases ASAP
This commit is contained in:
14
class2.php
14
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.108 $
|
* $Revision: 1.109 $
|
||||||
* $Date: 2009-07-16 02:55:18 $
|
* $Date: 2009-07-18 10:17:56 $
|
||||||
* $Author: e107coders $
|
* $Author: marj_nl_fr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//
|
//
|
||||||
@@ -963,17 +963,19 @@ $isPluginDir = strpos(e_SELF,'/'.$PLUGINS_DIRECTORY) !== FALSE; // True if we'r
|
|||||||
$e107Path = str_replace($e107->base_path, '', e_SELF); // Knock off the initial bits
|
$e107Path = str_replace($e107->base_path, '', e_SELF); // Knock off the initial bits
|
||||||
if (
|
if (
|
||||||
(!$isPluginDir && strpos($e107Path, $ADMIN_DIRECTORY) === 0 ) // Core admin directory
|
(!$isPluginDir && strpos($e107Path, $ADMIN_DIRECTORY) === 0 ) // Core admin directory
|
||||||
|| ($isPluginDir && (strpos(e_PAGE,'admin_') === 0 || strpos($e107Path, 'admin/') !== false)) // Plugin admin file or directory
|
|| ($isPluginDir && (strpos(e_PAGE,'admin_') === 0 || strpos($e107Path, 'admin/') !== FALSE)) // Plugin admin file or directory
|
||||||
|| (varsettrue($eplug_admin)) // Admin forced
|
|| (varsettrue($eplug_admin)) // Admin forced
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$inAdminDir = true;
|
$inAdminDir = TRUE;
|
||||||
|
// Load admin phrases ASAP
|
||||||
|
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!defined('THEME'))
|
if(!defined('THEME'))
|
||||||
{
|
{
|
||||||
if ($inAdminDir && varsettrue($pref['admintheme'])&& (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === false))
|
if ($inAdminDir && varsettrue($pref['admintheme'])&& (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE))
|
||||||
{
|
{
|
||||||
/* if (strpos(e_SELF, "newspost.php") !== FALSE)
|
/* if (strpos(e_SELF, "newspost.php") !== FALSE)
|
||||||
{
|
{
|
||||||
|
@@ -9,20 +9,23 @@
|
|||||||
* Administration Area Authorization
|
* Administration Area Authorization
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/auth.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/auth.php,v $
|
||||||
* $Revision: 1.8 $
|
* $Revision: 1.9 $
|
||||||
* $Date: 2009-07-07 06:50:55 $
|
* $Date: 2009-07-18 10:17:56 $
|
||||||
* $Author: e107coders $
|
* $Author: marj_nl_fr $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
/* done in class2
|
||||||
@include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php");
|
@include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php");
|
||||||
@include_once(e_LANGUAGEDIR."English/admin/lan_admin.php");
|
@include_once(e_LANGUAGEDIR."English/admin/lan_admin.php");
|
||||||
|
*/
|
||||||
if (ADMIN)
|
if (ADMIN)
|
||||||
{
|
{
|
||||||
define("ADMIN_PAGE", true);
|
define("ADMIN_PAGE", true);
|
||||||
//don't include it if it'a an AJAX call or not wanted
|
//don't include it if it'a an AJAX call or not wanted
|
||||||
if(!e_AJAX_REQUEST && !defset('NO_HEADER')) require_once(e_ADMIN."header.php");
|
if(!e_AJAX_REQUEST && !defset('NO_HEADER'))
|
||||||
|
require_once(e_ADMIN."header.php");
|
||||||
/*
|
/*
|
||||||
* FIXME - missing $style for tablerender
|
* FIXME - missing $style for tablerender
|
||||||
* The Solution: parse_admin() without sending it to the browser if it's an ajax call
|
* The Solution: parse_admin() without sending it to the browser if it's an ajax call
|
||||||
|
@@ -9,9 +9,9 @@
|
|||||||
* News Administration
|
* News Administration
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $
|
||||||
* $Revision: 1.44 $
|
* $Revision: 1.45 $
|
||||||
* $Date: 2009-07-17 07:53:13 $
|
* $Date: 2009-07-18 10:17:56 $
|
||||||
* $Author: e107coders $
|
* $Author: marj_nl_fr $
|
||||||
*/
|
*/
|
||||||
require_once("../class2.php");
|
require_once("../class2.php");
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ $pst->form = "core-newspost-create-form"; // form id of the form that will have
|
|||||||
$pst->page = "newspost.php?create"; // display preset options on which page(s).
|
$pst->page = "newspost.php?create"; // display preset options on which page(s).
|
||||||
$pst->id = "admin_newspost";
|
$pst->id = "admin_newspost";
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
require_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php"); // maybe this should be put in class2.php when 'admin' is detected.
|
// done in class2: require_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php"); // maybe this should be put in class2.php when 'admin' is detected.
|
||||||
$newspost = new admin_newspost(e_QUERY, $pst);
|
$newspost = new admin_newspost(e_QUERY, $pst);
|
||||||
$gen = new convert();
|
$gen = new convert();
|
||||||
|
|
||||||
@@ -1837,4 +1837,3 @@ function newspost_adminmenu()
|
|||||||
global $newspost;
|
global $newspost;
|
||||||
$newspost->show_options();
|
$newspost->show_options();
|
||||||
}
|
}
|
||||||
?>
|
|
@@ -9,9 +9,9 @@
|
|||||||
* Administration - Site Preferences
|
* Administration - Site Preferences
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/prefs.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/prefs.php,v $
|
||||||
* $Revision: 1.31 $
|
* $Revision: 1.32 $
|
||||||
* $Date: 2009-07-09 02:47:11 $
|
* $Date: 2009-07-18 10:17:56 $
|
||||||
* $Author: e107coders $
|
* $Author: marj_nl_fr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require_once ("../class2.php");
|
require_once ("../class2.php");
|
||||||
@@ -129,7 +129,7 @@ if(isset($_POST['updateprefs']))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
// done in class2: include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
||||||
$emessage->add(LAN_NO_CHANGE);
|
$emessage->add(LAN_NO_CHANGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1176,4 +1176,3 @@ function headerjs()
|
|||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
?>
|
|
@@ -1,27 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| <20>Steve Dunstan 2001-2002
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| jalist@e107.org
|
*
|
||||||
|
|
* Administration menu
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/admin_menu/admin_menu.php,v $
|
||||||
|
|
* $Revision: 1.2 $
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/admin_menu/admin_menu.php,v $
|
* $Date: 2009-07-18 10:17:56 $
|
||||||
| $Revision: 1.1.1.1 $
|
* $Author: marj_nl_fr $
|
||||||
| $Date: 2006-12-02 04:34:43 $
|
|
||||||
| $Author: mcfly_e107 $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//@TODO make it 0.8 compatible
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
global $tp;
|
global $tp;
|
||||||
if (ADMIN == TRUE) {
|
if (ADMIN == TRUE)
|
||||||
@include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php");
|
{
|
||||||
@include_once(e_LANGUAGEDIR."English/admin/lan_admin.php");
|
// We're not in admin - load generic admin phrases
|
||||||
|
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
||||||
|
|
||||||
require_once(e_HANDLER."userclass_class.php");
|
require_once(e_HANDLER."userclass_class.php");
|
||||||
require_once(e_ADMIN."ad_links.php");
|
require_once(e_ADMIN."ad_links.php");
|
||||||
@@ -29,10 +29,13 @@ if (ADMIN == TRUE) {
|
|||||||
|
|
||||||
$array_functions[] = array(e_ADMIN."plugin.php", ADLAN_98, "Z");
|
$array_functions[] = array(e_ADMIN."plugin.php", ADLAN_98, "Z");
|
||||||
|
|
||||||
if ($sql->db_Select("plugin", "*", "plugin_installflag=1")) {
|
if ($sql->db_Select("plugin", "*", "plugin_installflag=1"))
|
||||||
while ($row = $sql->db_Fetch()) {
|
{
|
||||||
|
while ($row = $sql->db_Fetch())
|
||||||
|
{
|
||||||
include(e_PLUGIN.$row['plugin_path']."/plugin.php");
|
include(e_PLUGIN.$row['plugin_path']."/plugin.php");
|
||||||
if ($eplug_conffile) {
|
if ($eplug_conffile)
|
||||||
|
{
|
||||||
$array_functions[] = array(e_PLUGIN.$row['plugin_path']."/".$eplug_conffile, $tp->toHtml($eplug_name,"","defs,emotes_off, no_make_clickable"), "P".$row['plugin_id']);
|
$array_functions[] = array(e_PLUGIN.$row['plugin_path']."/".$eplug_conffile, $tp->toHtml($eplug_name,"","defs,emotes_off, no_make_clickable"), "P".$row['plugin_id']);
|
||||||
}
|
}
|
||||||
unset($eplug_conffile, $eplug_name, $eplug_caption, $eplug_icon_small);
|
unset($eplug_conffile, $eplug_name, $eplug_caption, $eplug_icon_small);
|
||||||
@@ -44,7 +47,8 @@ if (ADMIN == TRUE) {
|
|||||||
$amtext = "<div style='text-align:center'>
|
$amtext = "<div style='text-align:center'>
|
||||||
<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>
|
<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>
|
||||||
<option>".LAN_SELECT."</option>\n";
|
<option>".LAN_SELECT."</option>\n";
|
||||||
foreach ($array_functions as $link_value) {
|
foreach ($array_functions as $link_value)
|
||||||
|
{
|
||||||
$amtext .= render_admin_links($link_value[0], $link_value[1], $link_value[2]);
|
$amtext .= render_admin_links($link_value[0], $link_value[1], $link_value[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,9 +57,10 @@ if (ADMIN == TRUE) {
|
|||||||
$ns->tablerender(LAN_ADMIN, $amtext, 'admin_menu');
|
$ns->tablerender(LAN_ADMIN, $amtext, 'admin_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function render_admin_links($link, $title, $perms) {
|
function render_admin_links($link, $title, $perms)
|
||||||
if (getperms($perms)) {
|
{
|
||||||
|
if (getperms($perms))
|
||||||
|
{
|
||||||
return "<option value='".$link."'>".$title."</option>";
|
return "<option value='".$link."'>".$title."</option>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Reference in New Issue
Block a user