mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
e_dashboard.php upgrades. (replacing e_latest.php and e_status.php)
This commit is contained in:
@@ -457,7 +457,8 @@ class admin_shortcodes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$configs = e107::getAddonConfig('e_latest');
|
|
||||||
|
$configs = e107::getAddonConfig('e_dashboard','latest');
|
||||||
$allconfigs = array_merge($oldconfigs,$configs);
|
$allconfigs = array_merge($oldconfigs,$configs);
|
||||||
|
|
||||||
$allconfigs = multiarray_sort($allconfigs,'title'); //XXX FIXME - not sorting correctly.
|
$allconfigs = multiarray_sort($allconfigs,'title'); //XXX FIXME - not sorting correctly.
|
||||||
@@ -1119,7 +1120,8 @@ class admin_shortcodes
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New in v2.x
|
// New in v2.x
|
||||||
$configs = e107::getAddonConfig('e_status');
|
// $configs = e107::getAddonConfig('e_status');
|
||||||
|
$configs = e107::getAddonConfig('e_dashboard','status');
|
||||||
|
|
||||||
if(!is_array($configs))
|
if(!is_array($configs))
|
||||||
{
|
{
|
||||||
|
@@ -2,11 +2,11 @@
|
|||||||
/*
|
/*
|
||||||
* e107 website system
|
* e107 website system
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
* Copyright (C) 2008-2015 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)
|
||||||
*
|
*
|
||||||
* Chatbox plugin - Status
|
* Chatbox plugin - Dashboard (Status)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -20,9 +20,16 @@
|
|||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
class chatbox_menu_status // include plugin-folder in the name.
|
class chatbox_menu_dashboard // include plugin-folder in the name.
|
||||||
{
|
{
|
||||||
function config()
|
function chart()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function status()
|
||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$chatbox_posts = $sql->count('chatbox');
|
$chatbox_posts = $sql->count('chatbox');
|
||||||
@@ -31,7 +38,7 @@ class chatbox_menu_status // include plugin-folder in the name.
|
|||||||
$var[0]['title'] = ADLAN_115;
|
$var[0]['title'] = ADLAN_115;
|
||||||
$var[0]['url'] = e_PLUGIN."chatbox_menu/admin_chatbox.php";
|
$var[0]['url'] = e_PLUGIN."chatbox_menu/admin_chatbox.php";
|
||||||
$var[0]['total'] = $chatbox_posts;
|
$var[0]['total'] = $chatbox_posts;
|
||||||
|
echo "BLA";
|
||||||
return $var;
|
return $var;
|
||||||
}
|
}
|
||||||
}
|
}
|
43
e107_plugins/forum/e_dashboard.php
Normal file
43
e107_plugins/forum/e_dashboard.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
|
||||||
|
class forum_dashboard // include plugin-folder in the name.
|
||||||
|
{
|
||||||
|
|
||||||
|
function chart()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function status()
|
||||||
|
{
|
||||||
|
$sql = e107::getDb();
|
||||||
|
$forum_posts = $sql->count('forum_post');
|
||||||
|
|
||||||
|
$var[0]['icon'] = E_16_FORUM;
|
||||||
|
$var[0]['title'] = ADLAN_113;
|
||||||
|
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php";
|
||||||
|
$var[0]['total'] = $forum_posts;
|
||||||
|
|
||||||
|
return $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function latest()
|
||||||
|
{
|
||||||
|
$sql = e107::getDb();
|
||||||
|
$reported_posts = $sql->count('generic', '(*)', "WHERE gen_type='reported_post' OR gen_type='Reported Forum Post'");
|
||||||
|
|
||||||
|
$var[0]['icon'] = E_16_FORUM;
|
||||||
|
$var[0]['title'] = ADLAN_LAT_6;
|
||||||
|
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php?sr";
|
||||||
|
$var[0]['total'] = $reported_posts;
|
||||||
|
|
||||||
|
return $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
|
||||||
|
|
||||||
|
|
||||||
class forum_latest // include plugin-folder in the name.
|
|
||||||
{
|
|
||||||
function config()
|
|
||||||
{
|
|
||||||
$sql = e107::getDb();
|
|
||||||
$reported_posts = $sql->count('generic', '(*)', "WHERE gen_type='reported_post' OR gen_type='Reported Forum Post'");
|
|
||||||
|
|
||||||
$var[0]['icon'] = E_16_FORUM;
|
|
||||||
$var[0]['title'] = ADLAN_LAT_6;
|
|
||||||
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php?sr";
|
|
||||||
$var[0]['total'] = $reported_posts;
|
|
||||||
|
|
||||||
return $var;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
@@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
|
||||||
|
|
||||||
|
|
||||||
class forum_status // include plugin-folder in the name.
|
|
||||||
{
|
|
||||||
function config()
|
|
||||||
{
|
|
||||||
$sql = e107::getDb();
|
|
||||||
$forum_posts = $sql->count('forum_post');
|
|
||||||
|
|
||||||
$var[0]['icon'] = E_16_FORUM;
|
|
||||||
$var[0]['title'] = ADLAN_113;
|
|
||||||
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php";
|
|
||||||
$var[0]['total'] = $forum_posts;
|
|
||||||
|
|
||||||
return $var;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
Reference in New Issue
Block a user