Skip to content

Commit

Permalink
PINGCHARTS_DEFAULT option implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Nov 16, 2020
1 parent c1c0fc5 commit 7b562d0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.2 rev 7783
1.1.2 rev 7784
10 changes: 9 additions & 1 deletion api/libs/api.userprofile.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,20 @@ protected function loadPlugins() {
if (!empty($this->login)) {
$rawPlugins = $this->loadPluginsRaw('plugins.ini');
if (!empty($rawPlugins)) {
$graphPing = (@$this->alterCfg['PINGCHARTS_DEFAULT']) ? true : false;
foreach ($rawPlugins as $modulename => $eachplugin) {
if (isset($eachplugin['overlay'])) {
$overlaydata = $this->loadPluginsOverlay($eachplugin['overlaydata']) . wf_delimiter();
$this->plugins .= wf_modal(wf_img_sized('skins/' . $eachplugin['icon'], __($eachplugin['name']), '', self::MAIN_PLUGINS_SIZE), __($eachplugin['name']), $overlaydata, '', 850, 650);
} else {
$this->plugins .= wf_Link('?module=' . $modulename . '&username=' . $this->login, wf_img_sized('skins/' . $eachplugin['icon'], __($eachplugin['name']), '', self::MAIN_PLUGINS_SIZE), false, '') . wf_delimiter();
$pluginUrl = '?module=' . $modulename . '&username=' . $this->login;
//appenging optional graphical ping if required
if ($graphPing) {
if (ispos($modulename, 'ping')) {
$pluginUrl .= '&charts=true';
}
}
$this->plugins .= wf_Link($pluginUrl, wf_img_sized('skins/' . $eachplugin['icon'], __($eachplugin['name']), '', self::MAIN_PLUGINS_SIZE), false, '') . wf_delimiter();
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion config/alter.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1084,4 +1084,6 @@ BANDWIDTHD_PROXY=0
;Enables user karama control based on /etc/stargazer/dn default OnConnected users.
KARMA_CONTROL=0
;Hide user email due user profile rendering. Optional option.
EMAILHIDE=0
EMAILHIDE=0
;Set graphical ping display as default view
PINGCHARTS_DEFAULT=1
3 changes: 2 additions & 1 deletion content/updates/configs/1.1.2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ ONUREG_LOOPDETECT_DEFAULT=0
PRINCESS_LIST=""
BANDWIDTHD_PROXY=0
KARMA_CONTROL=0
TRASSIRHLS_ENABLED=0
TRASSIRHLS_ENABLED=0
PINGCHARTS_DEFAULT=1

0 comments on commit 7b562d0

Please sign in to comment.