[geeklog-cvs] geeklog-1.3/system lib-custom.php,1.15,1.16 lib-plugins.php,1.58,1.59
blaine at iowaoutdoors.org
blaine at iowaoutdoors.org
Sun Apr 3 17:52:25 EDT 2005
Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv18377/system
Modified Files:
lib-custom.php lib-plugins.php
Log Message:
Modified CRON API to be called plugin_runScheduledTask()
Modified PLG_templateSetVars API to also check for a custom function [Blaine]
Users can now set header template using CUSTOM_templatesetvars()
Added basic custom function to lib-custom.php
Index: lib-custom.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-custom.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** lib-custom.php 26 Mar 2005 03:03:06 -0000 1.15
--- lib-custom.php 3 Apr 2005 21:52:22 -0000 1.16
***************
*** 141,149 ****
/**
! * Include any code in this function that will be called by the GL internal CRON Process
* The interval between runs is determined by $_CONF['cron_schedule_interval']
*/
! function CUSTOM_runSheduledJob() {
}
--- 141,161 ----
/**
! * Include any code in this function that will be called by the internal CRON API
* The interval between runs is determined by $_CONF['cron_schedule_interval']
*/
! function CUSTOM_runSheduledTask() {
!
! }
!
!
! /**
! * Include any code in this function that will be called by Plugin API to set template variables
! * Initially this API is only called in the COM_siteHeader function to set header.thtml variables
! */
! function CUSTOM_templatesetvars($templatename, &$template) {
+ if ($type == 'header') {
+ $template->set_var( 'myvar', $mycontent );
+ }
}
Index: lib-plugins.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** lib-plugins.php 26 Mar 2005 03:03:06 -0000 1.58
--- lib-plugins.php 3 Apr 2005 21:52:22 -0000 1.59
***************
*** 922,925 ****
--- 922,929 ----
global $_PLUGINS;
+ if (function_exists(CUSTOM_templatesetvars)) {
+ CUSTOM_templatesetvars($templatename, $template);
+ }
+
foreach ($_PLUGINS as $pi_name) {
$function = 'plugin_templatesetvars_' . $pi_name;
***************
*** 1341,1352 ****
* The interval between runs is determined by $_CONF['cron_schedule_interval']
*/
! function PLG_runScheduledJob ()
{
global $_PLUGINS;
foreach ($_PLUGINS as $pi_name) {
! $function = 'plugin_runScheduledJob_' . $pi_name;
if (function_exists ($function)) {
- echo " ... Exists";
$function ();
}
--- 1345,1358 ----
* The interval between runs is determined by $_CONF['cron_schedule_interval']
*/
! function PLG_runScheduledTask ()
{
global $_PLUGINS;
+ if (function_exists(CUSTOM_runSheduledTask)) {
+ CUSTOM_runSheduledTask();
+ }
foreach ($_PLUGINS as $pi_name) {
! $function = 'plugin_runScheduledTask_' . $pi_name;
if (function_exists ($function)) {
$function ();
}
More information about the geeklog-cvs
mailing list