Przeglądaj źródła

Core update (espresso remix)

markseu 10 lat temu
rodzic
commit
4b5ef43f7f

+ 1 - 1
README.md

@@ -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)
 

+ 3 - 3
system/core/core-webinterface.php

@@ -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";

+ 4 - 3
system/core/core.php

@@ -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;
 	}

+ 1 - 0
system/themes/snippets/footer.php

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

+ 1 - 1
system/themes/snippets/header.php

@@ -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">