Core update (espresso remix)

This commit is contained in:
markseu 2015-05-04 13:11:33 +02:00
parent 433ea20b1b
commit 4b5ef43f7f
5 changed files with 10 additions and 8 deletions

View file

@ -1,4 +1,4 @@
Yellow 0.5.5
Yellow 0.5.6
============
[![Yellow](https://raw.githubusercontent.com/wiki/datenstrom/yellow/images/yellow.jpg)](http://datenstrom.se/yellow)

View file

@ -5,7 +5,7 @@
// Web interface core plugin
class YellowWebinterface
{
const Version = "0.5.4";
const Version = "0.5.6";
var $yellow; //access to API
var $active; //web interface is active? (boolean)
var $userLoginFailed; //web interface login failed? (boolean)
@ -73,10 +73,10 @@ class YellowWebinterface
}
// Handle page extra HTML data
function onExtra()
function onExtra($name)
{
$output = "";
if($this->isActive())
if($this->isActive() && $name=="header")
{
$location = $this->yellow->config->getHtml("serverBase").$this->yellow->config->getHtml("pluginLocation");
$output .= "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"{$location}core-webinterface.css\" />\n";

View file

@ -5,7 +5,7 @@
// Yellow main class
class Yellow
{
const Version = "0.5.5";
const Version = "0.5.6";
var $page; //current page
var $pages; //pages from file system
var $files; //files from file system
@ -712,12 +712,13 @@ class YellowPage
}
// Return page extra HTML data
function getExtra()
function getExtra($name = "")
{
$output = "";
if(empty($name)) list($name) = $this->yellow->getSnippetArgs();
foreach($this->yellow->plugins->plugins as $key=>$value)
{
if(method_exists($value["obj"], "onExtra")) $output .= $value["obj"]->onExtra();
if(method_exists($value["obj"], "onExtra")) $output .= $value["obj"]->onExtra($name);
}
return $output;
}

View file

@ -3,5 +3,6 @@
<a href="http://datenstrom.se/yellow">Made with Yellow</a>.
</div>
</div>
<?php echo $yellow->page->getExtra("footer") ?>
</body>
</html>

View file

@ -11,7 +11,7 @@
<title><?php echo $yellow->page->getHtml("titleHeader") ?></title>
<link rel="shortcut icon" href="<?php echo $yellow->config->get("serverBase").$yellow->config->get("imageLocation")."icon.png" ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $yellow->config->get("serverBase").$yellow->config->get("themeLocation").$yellow->page->get("theme").".css" ?>" />
<?php echo $yellow->page->getExtra() ?>
<?php echo $yellow->page->getExtra("header") ?>
</head>
<body>
<div class="page">