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

Part 2 of more plugin.xml support (should be pretty much it). Also plugin.xml for log plugin didn't commit last time

This commit is contained in:
e107steved
2008-08-25 13:43:08 +00:00
parent 99939cd62b
commit 85a57d46bc
2 changed files with 52 additions and 12 deletions

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $
| $Revision: 1.8 $
| $Date: 2008-08-14 11:23:10 $
| $Author: secretr $
| $Revision: 1.9 $
| $Date: 2008-08-25 13:43:00 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
@@ -288,11 +288,13 @@ if (strpos(e_QUERY, 'configure') === FALSE)
$file['fname'] = str_replace(".php","",$file['fname']);
$valid_menu = FALSE;
$existing_menu = $sql->db_Count("menus", "(*)", "WHERE menu_name='{$file['fname']}'");
if (file_exists(e_PLUGIN.$parent_dir."/plugin.php"))
if (file_exists(e_PLUGIN.$parent_dir."/plugin.xml") ||
file_exists(e_PLUGIN.$parent_dir."/plugin.php"))
{
include(e_PLUGIN.$parent_dir."/plugin.php");
if ($sql->db_Select("plugin", "*", "plugin_path='".$eplug_folder."' AND plugin_installflag='1' "))
{ // Its a 'new style' plugin with a plugin.php file - ionly include if plugin installed
// include(e_PLUGIN.$parent_dir."/plugin.php");
if (isset($pref['plug_installed'][$parent_dir]))
// if ($sql->db_Select("plugin", "*", "plugin_path='".$eplug_folder."' AND plugin_installflag='1' "))
{ // Its a 'new style' plugin with a plugin.php file, or an even newer one with plugin.xml file - only include if plugin installed
$valid_menu = TRUE; // Whether new or existing, include in list
}
}
@@ -313,10 +315,13 @@ if (strpos(e_QUERY, 'configure') === FALSE)
//Reorder all menus into 1...x order
if (!is_object($sql2)) $sql2 = new db; // Shouldn't be needed
foreach ($menu_areas as $menu_act) {
if ($sql->db_Select("menus", "menu_id", "menu_location={$menu_act} ORDER BY menu_order ASC")) {
foreach ($menu_areas as $menu_act)
{
if ($sql->db_Select("menus", "menu_id", "menu_location={$menu_act} ORDER BY menu_order ASC"))
{
$c = 1;
while ($row = $sql->db_Fetch()) {
while ($row = $sql->db_Fetch())
{
$sql2->db_Update("menus", "menu_order={$c} WHERE menu_id=".$row['menu_id']);
$c++;
}
@@ -347,7 +352,8 @@ if (strpos(e_QUERY, 'configure') === FALSE)
else
{
if ($CUSTOMPAGES) {
if ($CUSTOMPAGES)
{
if ($menu_act != 'adv') {
$text = "<form method='post' action='".e_SELF."?configure.".$menus_equery[1]."'><div style='width: 100%'>
<table class='fborder' style='".ADMIN_WIDTH."'>
@@ -412,7 +418,7 @@ else
$text .= "<tr><td style='width:50%;text-align:center;padding-bottom:4px'>".MENLAN_36."...</td><td style='width:50%;padding-bottom:4px;text-align:center'>...".MENLAN_37."</td></tr>";
$text .= "<tr><td style='width:50%;vertical-align:top;text-align:center'>";
$text .= "<select name='menuselect[]' class='tbox' multiple='multiple' style='height:200px;width:95%'>";
$text .= "<select name='menuselect[]' class='tbox' multiple='multiple' style='height:200px;width:95%'>\n";
while ($row = $sql->db_Fetch())
{
if($row['menu_pages'] == "dbcustom")

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<e107Plugin>
<!-- $Id: plugin.xml,v 1.1 2008-08-25 13:43:08 e107steved Exp $ -->
<name>ADSTAT_L3</name>
<version>2.1</version>
<author>jalist</author>
<authorUrl>http://e107.org</authorUrl>
<authorEmail>jalist@e107.org</authorEmail>
<description>ADSTAT_L1</description>
<compatibility>e107v0.7</compatibility>
<installRequired>true</installRequired>
<folder>log</folder>
<logLanguageFile filename="languages/admin/--LAN--.php" />
<administration>
<configFile>admin_config.php</configFile>
<icon>images/stats_32.png</icon>
<iconSmall>images/stats_16.png</iconSmall>
<caption>ADSTAT_L33</caption>
<installDone>ADSTAT_L2</installDone>
</administration>
<menuLink name="ADSTAT_L34" url="log/stats.php?1" />
<mainPrefs>
<pref name="statActivate" value="0" />
<pref name="statUserclass" value="" />
<pref name="statBrowser" value="1" />
<pref name="statOs" value="1" />
<pref name="statScreen" value="1" />
<pref name="statDomain" value="1" />
<pref name="statRefer" value="1" />
<pref name="statQuery" value="1" />
<pref name="statRecent" value="1" />
<pref name="statPrevMonth" value="0" />
</mainPrefs>
</e107Plugin>