[geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.19,1.20
geeklog-cvs-admin at lists.geeklog.net
geeklog-cvs-admin at lists.geeklog.net
Fri Jun 27 21:36:29 EDT 2003
Update of /usr/cvs/geeklog/geeklog-1.3/system
In directory internal.geeklog.net:/tmp/cvs-serv18049/system
Modified Files:
lib-plugins.php
Log Message:
Add new Plugin API PLG_getHeaderCode. Used to return JS functions or other Header Meta Tags required by plugins. Added new variable {plg_headercode} to the template header.thtml files
Index: lib-plugins.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** lib-plugins.php 22 May 2003 21:05:46 -0000 1.19
--- lib-plugins.php 28 Jun 2003 01:36:27 -0000 1.20
***************
*** 794,796 ****
--- 794,818 ----
}
+ /**
+ * This function is called from COM_siteHeader and will return additional Header information
+ * This can be Javascript funcitons required for the plugin or extra Metatags
+ *
+ * @return string returns a concatented string of all plugins extra header code
+ */
+ function PLG_getHeaderCode()
+ {
+ global $_TABLES;
+
+ $result = DB_query("SELECT pi_name FROM {$_TABLES['plugins']} WHERE pi_enabled = 1");
+ $nrows = DB_numRows($result);
+ for ($i = 1; $i <= $nrows; $i++) {
+ $A = DB_fetchArray($result);
+ $function = 'plugin_getHeaderCode_' . $A['pi_name'];
+ if (function_exists($function)) {
+ $headercode .= $function();
+ }
+ }
+ return $headercode;
+ }
+
?>
More information about the geeklog-cvs
mailing list