mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
InfoPanel "Website Stats" moved to e107_plugins/user/e_dashboard.php .
FlexPanel drag-n-drop now working with plugin e_dashboard addons.
This commit is contained in:
@@ -212,11 +212,11 @@ class adminstyle_flexpanel extends adminstyle_infopanel
|
||||
|
||||
|
||||
// --------------------- Website Status ---------------------------
|
||||
$ns->setStyle('flexpanel');
|
||||
/* $ns->setStyle('flexpanel');
|
||||
$ns->setUniqueId('core-infopanel_website_status');
|
||||
$coreInfoPanelWebsiteStatus = $ns->tablerender(LAN_WEBSITE_STATUS, $this->renderWebsiteStatus(), "core-infopanel_website_status", true);
|
||||
$coreInfoPanelWebsiteStatus = '';// 'hi';/// "<div id='core-infopanel_website_status'>".$this->renderAddonDashboards()."</div>"; $ns->tablerender(LAN_WEBSITE_STATUS, $this->renderAddonDashboards(), "core-infopanel_website_status", true);
|
||||
$info = $this->getMenuPosition('core-infopanel_website_status');
|
||||
$panels[$info['area']][$info['weight']] .= $coreInfoPanelWebsiteStatus;
|
||||
$panels[$info['area']][$info['weight']] .= $coreInfoPanelWebsiteStatus;*/
|
||||
|
||||
|
||||
// --------------------- Latest Comments --------------------------
|
||||
@@ -254,6 +254,26 @@ class adminstyle_flexpanel extends adminstyle_infopanel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// --------------------- Plugin Addon Dashboards ---------------------- eg. e107_plugin/user/e_dashboard.php
|
||||
$dashboards = $this->getAddonDashboards();
|
||||
if(!empty($dashboards))
|
||||
{
|
||||
$ns->setStyle('flexpanel');
|
||||
foreach($dashboards as $val)
|
||||
{
|
||||
$id = $val['mode'];
|
||||
$ns->setUniqueId($id);
|
||||
$inc = $ns->tablerender($val['caption'], $val['text'], $val['mode'], true);
|
||||
|
||||
$info = $this->getMenuPosition($id);
|
||||
|
||||
$panels[$info['area']][$info['weight']] .= $inc;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Sorting panels.
|
||||
foreach($panels as $key => $value)
|
||||
{
|
||||
@@ -292,7 +312,7 @@ class adminstyle_flexpanel extends adminstyle_infopanel
|
||||
{
|
||||
$user_pref = $this->getUserPref();
|
||||
|
||||
if(varset($user_pref['core-flexpanel-order'][$id]))
|
||||
if(!empty($user_pref['core-flexpanel-order'][$id]))
|
||||
{
|
||||
return $user_pref['core-flexpanel-order'][$id];
|
||||
}
|
||||
@@ -311,6 +331,14 @@ class adminstyle_flexpanel extends adminstyle_infopanel
|
||||
return $positions[$layout][$id];
|
||||
}
|
||||
|
||||
if(strpos($id,'plug-infopanel-') === 0) // addon dashboards default to area 2.
|
||||
{
|
||||
$default = array(
|
||||
'area' => 'menu-area-02',
|
||||
'weight' => 1000,
|
||||
);
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user