logo       

CVS: squirrelmail/class/template template.class.php,1.9,1.10: msg#00080

Subject: CVS: squirrelmail/class/template template.class.php,1.9,1.10
Update of /cvsroot/squirrelmail/squirrelmail/class/template
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17891/class/template

Modified Files:
        template.class.php 
Log Message:
Added ability for template authors to include additional stylesheets.  This 
allows them to add additional CSS defs while maintaining SQM default defintions.

Index: template.class.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/class/template/template.class.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -r1.9 -r1.10
--- template.class.php  24 Feb 2006 22:32:11 -0000      1.9
+++ template.class.php  28 Mar 2006 22:17:23 -0000      1.10
@@ -66,6 +66,14 @@
   var $provided_js_files = array();
   
   /**
+   * Additional stylesheets provided by the template.  This allows template
+   * authors (namely me to begin with :p) to provide additional CSS sheets
+   * to templates while using the default template set stylesheet for other
+   * definitions.
+   */
+  var $additional_css_sheets = array(); 
+  
+  /**
    * Constructor
    *
    * @param string $sTplDir where the template set is located
@@ -78,9 +86,7 @@
        $this->templates_provided = is_array($templates_provided) ? 
$templates_provided : array();
        $this->required_js_files = is_array($required_js_files) ? 
$required_js_files : array();
        $this->provided_js_files = is_array($provided_js_files) ? 
$provided_js_files: array();
-
-#       echo 'Template Dir: '.$this->template_dir.': ';
-#       var_dump($this->templates_provided);
+       $this->additional_css_sheets = is_array($additional_css_sheets) ? 
$additional_css_sheets : array();
   }
 
 
@@ -236,6 +242,24 @@
     
     return $paths;
   }
+
+  /**
+   * Return any additional stylsheets provided by the template.  Used when
+   * generating page headers.
+   * 
+   * @return array $paths
+   */
+  function getAdditionalStyleSheets () {
+    $paths = array();
+    foreach ($this->additional_css_sheets as $css) {
+        $css = basename($css);
+        if (strtolower($css) == 'stylesheet.tpl') {
+            continue;
+        }
+        $paths[] = $css;
+    }
+    return $paths;
+  }
 }
 
 ?>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe