[Xfce4-commits] <wiki:master> Include right xfce banner depending on hostname

Mike Massonnet noreply at xfce.org
Thu Jan 10 00:12:01 CET 2013


Updating branch refs/heads/master
         to a4ccfe5944053e4ebd6f33f9fad488f6f0c58b99 (commit)
       from 6a62571f3d3460202062dc378b1e0cd13383cb74 (commit)

commit a4ccfe5944053e4ebd6f33f9fad488f6f0c58b99
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Thu Jan 10 00:10:42 2013 +0100

    Include right xfce banner depending on hostname

 lib/tpl/xfce/main.php                              |    9 ++++++++-
 ...-header.html => xfce-header-docs-xfce-org.html} |    4 ++--
 ...-header.html => xfce-header-wiki-xfce-org.html} |    0
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/tpl/xfce/main.php b/lib/tpl/xfce/main.php
index 1fdd575..36e13f2 100644
--- a/lib/tpl/xfce/main.php
+++ b/lib/tpl/xfce/main.php
@@ -27,7 +27,14 @@ $showSidebar = $hasSidebar && ($ACT=='show');
 
 <body>
 
-<?php tpl_includeFile('xfce-header.html') ?>
+<?php
+if (strstr(DOKU_URL, "wiki.xfce.org")) {
+    tpl_includeFile('xfce-header-wiki-xfce-org.html');
+}
+else if (strstr(DOKU_URL, "docs.xfce.org")) {
+    tpl_includeFile('xfce-header-docs-xfce-org.html');
+}
+?>
 
     <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
     <div id="dokuwiki__site"><div id="dokuwiki__top"
diff --git a/lib/tpl/xfce/xfce-header.html b/lib/tpl/xfce/xfce-header-docs-xfce-org.html
similarity index 94%
copy from lib/tpl/xfce/xfce-header.html
copy to lib/tpl/xfce/xfce-header-docs-xfce-org.html
index 215fccb..b41911e 100644
--- a/lib/tpl/xfce/xfce-header.html
+++ b/lib/tpl/xfce/xfce-header-docs-xfce-org.html
@@ -5,9 +5,9 @@
      
     <ul>
       <li><a href="http://www.xfce.org" title="Go to the homepage">Home</a></li>
-      <li><a href="http://docs.xfce.org" title="Official documentation">Docs</a></li>
+      <li><a href="http://docs.xfce.org" title="Official documentation" class="active">Docs</a></li>
       <li><a href="http://archive.xfce.org" title="Download location of tarballs">Archive</a></li>
-      <li><a href="http://wiki.xfce.org" title="Community documentation" class="active">Wiki</a></li>
+      <li><a href="http://wiki.xfce.org" title="Community documentation">Wiki</a></li>
       <li><a href="http://forum.xfce.org" title="Community forums">Forum</a></li>
       <li><a href="https://bugzilla.xfce.org" title="Report and track bugs">Bugs</a></li>
       <li><a href="http://blog.xfce.org" title="Visit the blog">Blog</a></li>
diff --git a/lib/tpl/xfce/xfce-header.html b/lib/tpl/xfce/xfce-header-wiki-xfce-org.html
similarity index 100%
rename from lib/tpl/xfce/xfce-header.html
rename to lib/tpl/xfce/xfce-header-wiki-xfce-org.html


More information about the Xfce4-commits mailing list