[geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.37,1.38

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sun Aug 8 04:56:00 EDT 2004


Update of /var/cvs/geeklog-1.3/plugins/staticpages
In directory www:/tmp/cvs-serv26321/plugins/staticpages

Modified Files:
	functions.inc 
Log Message:
The plugin now checks for template files in the current theme's directory before falling back to the default template files


Index: functions.inc
===================================================================
RCS file: /var/cvs/geeklog-1.3/plugins/staticpages/functions.inc,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** functions.inc	2 Aug 2004 18:38:51 -0000	1.37
--- functions.inc	8 Aug 2004 08:55:57 -0000	1.38
***************
*** 645,647 ****
--- 645,676 ----
  }
  
+ /**
+ * Get path for the template files.
+ *
+ * @param    string  $path   subdirectory within the base template path
+ * @return   string          full path to template directory
+ *
+ */
+ function staticpages_templatePath ($path = '')
+ {
+     global $_CONF;
+ 
+     if (empty ($path)) {
+         $layout_path = $_CONF['path_layout'] . staticpages;
+     } else {
+         $layout_path = $_CONF['path_layout'] . staticpages . '/' . $path;
+     }
+ 
+     if (is_dir ($layout_path)) {
+         $retval = $layout_path;
+     } else {
+         $retval = $_CONF['path'] . 'plugins/staticpages/templates';
+         if (!empty ($path)) {
+             $retval .= '/' . $path;
+         }
+     }
+ 
+     return $retval;
+ }
+ 
  ?>




More information about the geeklog-cvs mailing list