logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: phpwiki/themes/blog themeinfo.php,1.6,1.7: msg#00015

Subject: CVS: phpwiki/themes/blog themeinfo.php,1.6,1.7
Update of /cvsroot/phpwiki/phpwiki/themes/blog
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28390/themes/blog

Modified Files:
        themeinfo.php 
Log Message:
themes are now easier derivable classes from other themes.
removed global code setters, switched to $WikiTheme->load() in main


Index: themeinfo.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/themes/blog/themeinfo.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -2 -b -p -d -r1.6 -r1.7
--- themeinfo.php       7 Jan 2007 18:48:20 -0000       1.6
+++ themeinfo.php       1 Jul 2007 09:36:10 -0000       1.7
@@ -114,27 +114,24 @@ class Theme_blog extends Theme {
         return $link;
     }
-}
-
-$WikiTheme = new Theme_blog('blog');
-define("PAGETRAIL_ARROW", " » ");
 
-// CSS file defines fonts, colors and background images for this
-// style.
+    function load() {
+       // CSS file defines fonts, colors and background images for this
+       // style.
 
-// override sidebar definitions:
-$WikiTheme->setDefaultCSS(_("blog"), 'Kubrick.css');
+       // override sidebar definitions:
+       $this->setDefaultCSS(_("blog"), 'Kubrick.css');
 
-$WikiTheme->addButtonAlias(_("(diff)"), "[diff]" );
-$WikiTheme->addButtonAlias("...", "alltime");
+       $this->addButtonAlias(_("(diff)"), "[diff]" );
+       $this->addButtonAlias("...", "alltime");
 
-$WikiTheme->setButtonSeparator("");
+       $this->setButtonSeparator("");
 
-/**
+       /**
  * WikiWords can automatically be split by inserting spaces between
  * the words. The default is to leave WordsSmashedTogetherLikeSo.
  */
-$WikiTheme->setAutosplitWikiWords(false);
+       $this->setAutosplitWikiWords(false);
 
-/**
+       /**
  * If true (default) show create '?' buttons on not existing pages, even if 
the 
  * user is not signed in.
@@ -142,7 +139,7 @@ $WikiTheme->setAutosplitWikiWords(false)
  * cannot easily fix missing pages.
  */
-$WikiTheme->setAnonEditUnknownLinks(false);
+       $this->setAnonEditUnknownLinks(false);
 
-/*
+       /*
  * You may adjust the formats used for formatting dates and times
  * below.  (These examples give the default formats.)
@@ -152,7 +149,13 @@ $WikiTheme->setAnonEditUnknownLinks(fals
  * user's time zone.
  */
-//$WikiTheme->setDateFormat("%B %d, %Y");
-$WikiTheme->setDateFormat("%A, %B %e, %Y"); // must not contain time
-$WikiTheme->setTimeFormat("%H:%M:%S");
+       //$this->setDateFormat("%B %d, %Y");
+       $this->setDateFormat("%A, %B %e, %Y"); // must not contain time
+       $this->setTimeFormat("%H:%M:%S");
+    }
+}
+
+$WikiTheme = new Theme_blog('blog');
+define("PAGETRAIL_ARROW", " » ");
+
 
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
phpwiki-checkins mailing list
phpwiki-checkins@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/phpwiki-checkins
<Prev in Thread] Current Thread [Next in Thread>