[geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.13,1.14

blaine at geeklog.net blaine at geeklog.net
Thu Feb 13 23:36:34 EST 2003


Update of /usr/cvs/geeklog/geeklog-1.3/system
In directory internal.geeklog.net:/tmp/cvs-serv8038/system

Modified Files:
	lib-plugins.php 
Log Message:
Added new Plugin function to support Center Blocks 
Added call to PLG_showCenterblock in index.php


Index: lib-plugins.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** lib-plugins.php	3 Dec 2002 03:20:57 -0000	1.13
--- lib-plugins.php	14 Feb 2003 04:36:32 -0000	1.14
***************
*** 562,564 ****
--- 562,590 ----
  }
  
+ /**
+ * This function will show the centerblock for any plugin 
+ * It will be display before any news and after any defined staticpage content.
+ * The plugin is responsible to format the output correctly.
+ *
+ * @return  Formatted center block content
+ *
+ */
+ function PLG_showCenterblock() 
+ {
+     global $_TABLES;
+ 
+     $result = DB_query("SELECT * FROM {$_TABLES['plugins']} WHERE pi_enabled = 1");
+     $nrows = DB_numRows($result);
+     $plugin = new Plugin();
+     $counter = 0;
+     for ($i = 1; $i <= $nrows; $i++) {
+         $A = DB_fetchArray($result);
+         $function = 'plugin_centerblock_' . $A['pi_name'];
+         if (function_exists($function)) {
+ 		   $retval .= $function();
+         }
+     }
+     return $retval;
+ }
+ 
  ?>





More information about the geeklog-cvs mailing list