dehardcode title and logo URL in cmo skin and improve htaccess rules
authorZbigniew Braniecki (zbraniecki@mozilla.com)
Wed, 20 Aug 2008 15:39:14 +0200
changeset 3 ee9b6b38c000b9962f2d1ef1226c60cf7812a783
parent 2 4fe455a4470665427fb664b2c1b97cf346ac820a
child 4 4f74c6a8830444e605583a3c0637512cdb48efc7
push id1
push userroot
push dateWed, 17 Sep 2008 21:54:46 +0000
dehardcode title and logo URL in cmo skin and improve htaccess rules
mediawiki/htaccess
mediawiki/skins/cmo.php
--- a/mediawiki/htaccess
+++ b/mediawiki/htaccess
@@ -1,6 +1,6 @@
 RewriteEngine on
 RewriteBase /mozilla/como/
-RewriteCond %{REQUEST_URI} !^/mozilla/como/(skins|stylesheets|images|config)/
-RewriteCond %{REQUEST_URI} !^(redirect|texvc|index).php
+RewriteCond %{REQUEST_URI} !^/(skins|stylesheets|images|config)/
+RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
 RewriteRule ^(.*)$ index.php?title=$1 [L,QSA]
 
--- a/mediawiki/skins/cmo.php
+++ b/mediawiki/skins/cmo.php
@@ -98,29 +98,29 @@ class CMOTemplate extends QuickTemplate 
                 // use hijacked category functions
                 $this->set('catlinks', $this->getCategories());
  
                 /* compose XHTML output */
 global $wgScriptPath; 
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
   <head>
-    <title>Mozilla Community</title>
+    <title><?php $this->text('pagetitle') ?></title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <style type="text/css">
     /* <![CDATA[ */
     @import url("<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/default.css?<?php echo $GLOBALS['wgStyleVersion'] ?>");
     /* ]]> */
     </style>
     <script src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/js/jsdynamic/jsdynamic.js?<?php echo $GLOBALS['wgStyleVersion'] ?>" type="text/javascript"></script>
     <script src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/js/index.js?<?php echo $GLOBALS['wgStyleVersion'] ?>" type="text/javascript"></script>
   </head>
   <body onload="prepareAnimator()">
     <div id="header">
-      <a href="http://labs.braniecki.net/mozilla/como/"><img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/img/como-title.png" id="logo" /></a>
+      <a href="<?php echo $this->data['nav_urls']['mainpage']['href'] ?>"><img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/img/como-title.png" id="logo" /></a>
     </div>
   <div id="content">
     <ul id="breadcrumbs">
 <?php
 if($this->data['title']!='Mozilla Community') {
  ?>
       <li><a href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']) ?>">Mozilla Community</a></li>
 <?php