Oxygen (and general): cleaned up sidebar CSS, wikitext blocks are now sent through alternate block
authorDan
Sat, 04 Apr 2009 22:24:49 -0400
changeset 892 668e6a9adf99
parent 891 d75c81630571
child 893 b24601274cd2
Oxygen (and general): cleaned up sidebar CSS, wikitext blocks are now sent through alternate block
includes/template.php
themes/oxygen/css/bleu.css
--- a/includes/template.php	Sat Apr 04 22:19:11 2009 -0400
+++ b/includes/template.php	Sat Apr 04 22:24:49 2009 -0400
@@ -1666,7 +1666,7 @@
     }
     
     // URLs
-    preg_match_all('/\{url:([A-z0-9]+):([^\s\}]+?)(?:;([^\s\}]+?))?(?:\|(escape))?\}/i', $text, $matches);
+    preg_match_all('/\{url:([A-z0-9]+):([^\}]+?)(?:;([^\s\}]+?))?(?:\|(escape))?\}/i', $text, $matches);
     foreach ( $matches[1] as $i => $string_id )
     {
       $namespace =& $matches[1][$i];
@@ -2301,7 +2301,7 @@
     switch($row['block_type'])
     {
       case BLOCK_WIKIFORMAT:
-        $parser = $this->makeParserText($vars['sidebar_section']);
+        $parser = $this->makeParserText($vars['sidebar_section_raw']);
         $c = RenderMan::render($row['block_content']);
         break;
         
@@ -2508,6 +2508,21 @@
     return $ob;
   }
   
+  /**
+   * Parse a system message.
+   * @param string message
+   * @return string
+   */
+  
+  function parse_system_message($text)
+  {
+    ob_start();
+    eval( '?>' . $text );
+    $result = ob_get_contents();
+    ob_end_clean();
+    return $this->parse($result);
+  }
+  
 } // class template
 
 /**
@@ -2538,7 +2553,7 @@
   $text = str_replace('\'', '\\\'', $text);
   
   // Initialize the PHP compiled code
-  $text = 'ob_start(); echo \''.$text.'\'; $tpl_code = ob_get_contents(); ob_end_clean(); return $tpl_code;';
+  $text = 'ob_start(); global $paths, $template; echo \''.$text.'\'; $tpl_code = ob_get_contents(); ob_end_clean(); return $tpl_code;';
   
   ##
   ## Main rules
@@ -2643,7 +2658,7 @@
   //
   
   // System messages
-  $text = preg_replace('/<!-- SYSMSG ([A-z0-9\._-]+?) -->/is', '\' . $template->tplWikiFormat($paths->sysMsg(\'\\1\')) . \'', $text);
+  $text = preg_replace('/<!-- SYSMSG ([A-z0-9\._-]+?) -->/is', '\' . $this->parse_system_message($paths->sysMsg(\'\\1\')) . \'', $text);
   
   // Hooks
   $text = preg_replace('/<!-- HOOK ([A-z0-9_]+) -->/', '\' . $this->get_theme_hook(\'\\1\') . \'', $text);
--- a/themes/oxygen/css/bleu.css	Sat Apr 04 22:19:11 2009 -0400
+++ b/themes/oxygen/css/bleu.css	Sat Apr 04 22:24:49 2009 -0400
@@ -61,12 +61,12 @@
   width: 140px;
 }
 
-div.sidebar, .dbx-group {
+div.sidebar {
   width: 138px;
   background-color: #F8F8F8; border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding: 1px 0px 0px 0px;
 }
 
-div.sidebar .head, .dbx-handle {
+div.sidebar .head {
   background-color: #F0F0F0;
   display: block;
   margin: 0px 1px 1px 1px;
@@ -79,7 +79,7 @@
   font-weight: bold;
 }
 
-div.sidebar .head:hover, .dbx-handle:hover {
+div.sidebar .head:hover {
   background-color: #F4F4F4;
   display: block;
   margin: 0px 1px 1px 1px;
@@ -92,7 +92,7 @@
   font-weight: bold;
 }
 
-div.sidebar div.slideblock a, .dbx-content li {
+div.sidebar div.slideblock a {
   background-color: #DDD;
   display: block;
   margin: 0px 1px;
@@ -106,17 +106,8 @@
   list-style-type: none;
 }
 
-div.sidebar div.slideblock a:hover, .dbx-content li:hover {
+div.sidebar div.slideblock a:hover {
   background-color: #EEE;
-  display: block;
-  margin: 0px 1px;
-  border-bottom: 1px solid #FFF;
-  font-family: Trebuchet MS, Arial, helvetica, sans-serif;
-  font-size: 7pt;
-  cursor: pointer;
-  text-decoration: none;
-  color: #666;
-  padding: 5px 5px 5px 9px;
 }
 
 div.recttop {
@@ -174,6 +165,11 @@
   background-color: #DDD;
   margin: 0px 1px 0px 1px;
   border-bottom: 1px solid #FFF;
+  font-size: 8pt;
+}
+
+div.slideblock2 p {
+  margin: 7px 4px;
 }
 
 .dbx-handle {