Add do=brmstatus
This commit is contained in:
parent
cc99471482
commit
1818e93635
1 changed files with 44 additions and 22 deletions
|
@ -5,6 +5,12 @@
|
||||||
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
|
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
* @author Dominik Pantůček <dominik.pantucek@trustica.cz>
|
* @author Dominik Pantůček <dominik.pantucek@trustica.cz>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// must be run within DokuWiki
|
||||||
|
if(!defined('DOKU_INC')) die();
|
||||||
|
|
||||||
|
require_once("common.php");
|
||||||
|
|
||||||
class action_plugin_hackerbase extends DokuWiki_Action_Plugin
|
class action_plugin_hackerbase extends DokuWiki_Action_Plugin
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -30,6 +36,22 @@ class action_plugin_hackerbase extends DokuWiki_Action_Plugin
|
||||||
echo file_get_contents($this->getConf("htmlexports") . '/' . $user . ".html");
|
echo file_get_contents($this->getConf("htmlexports") . '/' . $user . ".html");
|
||||||
die();
|
die();
|
||||||
} else if ($act === 'brmstatus') {
|
} else if ($act === 'brmstatus') {
|
||||||
|
$spaceapi_status_json = $this->getConf("spaceapijson");
|
||||||
|
$status = hackerbase_spaceapi_html_snippet($spaceapi_status_json);
|
||||||
|
// The following was taken from original /var/www/status-renderer/status.php verbatim for now:
|
||||||
|
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
|
||||||
|
echo '<html>';
|
||||||
|
echo '<head>';
|
||||||
|
echo '<title>Brmlab space status page</title>';
|
||||||
|
echo '<style>';
|
||||||
|
echo 'p {font: 80% "Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif;}';
|
||||||
|
echo 'h3 {font: 1em "Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif; font-weight: bold;}';
|
||||||
|
echo '</style>';
|
||||||
|
echo '</head>';
|
||||||
|
echo '<body>';
|
||||||
|
echo $status;
|
||||||
|
echo '</body>';
|
||||||
|
echo '</html>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue