Преглед изворни кода

added support for SE/config/.footer.html to footer in default theme

Piotr Labudda пре 8 година
родитељ
комит
dde6fa45ab
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      SE/se-lib/ThemeDefault.php

+ 6 - 2
SE/se-lib/ThemeDefault.php

@@ -21,8 +21,12 @@ class ThemeDefault {
 	}
 	function footer() { // inside UI::dol()
 		$version = (file_exists(APP_PATH_ROOT . '/VERSION'))? file_get_contents(APP_PATH_ROOT . '/VERSION') : null;
-		if ($version) {
-			echo '<div style="' . UI::fixFooterPosition('footer_style') . 'border-top:1px solid #ddd; margin-top:10px; padding:0 30px; font-size:xx-small; color:#888">version: '.$version.'</div>';
+		$footerHtml = (file_exists(APP_PATH_ROOT . '/config/.footer.html'))? file_get_contents(APP_PATH_ROOT . '/config/.footer.html') : null;
+		if ($version || $footerHtml) {
+			echo '<div style="' . UI::fixFooterPosition('footer_style') . 'border-top:1px solid #ddd; margin-top:10px; padding:0 30px; font-size:xx-small; color:#888">';
+			if ($version) echo 'version: '.$version . ' ';
+			if ($footerHtml) echo $footerHtml;
+			echo '</div>';
 		}
 		echo UI::fixFooterPosition('footer_js_tag');
 	}