From e34e1a01f3989a6e5bdfe73922384db62d6b332e Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 8 Nov 2009 16:39:12 +0000 Subject: Add ability for extra headlinks on webpages --- includes/header.php | 10 ++++++++-- includes/render-webpage.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/header.php b/includes/header.php index e03a7d6..3452612 100644 --- a/includes/header.php +++ b/includes/header.php @@ -22,7 +22,7 @@ if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) else header("Content-Type: text/html; charset=utf-8"); -function xhtml_header($title) +function xhtml_header($title, $headlinks = null) { $newtitle = str_replace("&", "&", stripslashes($title)); @@ -37,7 +37,13 @@ function xhtml_header($title) - + '); + if(!empty($headlinks)) { + foreach($headlinks as $headlink) { + print("\n\t" . $headlink); + } + } + print(' diff --git a/includes/render-webpage.php b/includes/render-webpage.php index cb059d3..cc25a73 100644 --- a/includes/render-webpage.php +++ b/includes/render-webpage.php @@ -21,7 +21,7 @@ function render_xhtml($path) include($path); include($_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"); - xhtml_header($title); + xhtml_header($title, $headlinks); print($body); -- cgit v1.2.3