[geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.41,1.42
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Tue Sep 28 11:26:21 EDT 2004
Update of /var/cvs/geeklog-1.3/plugins/staticpages
In directory www:/tmp/cvs-serv6212/plugins/staticpages
Modified Files:
functions.inc
Log Message:
The Static Pages plugin now provides a [staticpage:] autotag.
Index: functions.inc
===================================================================
RCS file: /var/cvs/geeklog-1.3/plugins/staticpages/functions.inc,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** functions.inc 25 Sep 2004 03:03:10 -0000 1.41
--- functions.inc 28 Sep 2004 15:26:18 -0000 1.42
***************
*** 554,562 ****
* Used in the Plugin Editor to show the registered version and code version
*/
! function plugin_chkVersion_staticpages() {
global $_SP_CONF;
return $_SP_CONF['version'];
}
/**
--- 554,583 ----
* Used in the Plugin Editor to show the registered version and code version
*/
! function plugin_chkVersion_staticpages()
! {
global $_SP_CONF;
+
return $_SP_CONF['version'];
}
+ /**
+ * Implements the [staticpage:] autotag.
+ *
+ */
+ function plugin_autotags_staticpages ($op, $content = '', $autotag = '')
+ {
+ global $_CONF;
+
+ if ($op == 'tagname' ) {
+ return 'staticpage';
+ } else if ($op == 'parse') {
+ $url = COM_buildUrl ($_CONF['site_url'] . '/staticpages/index.php?page='
+ . $autotag['parm1']);
+ $link = '<a href="' . $url . '">' . $autotag['parm2'] . '</a>';
+ $content = str_replace ($autotag['tagstr'], $link, $content);
+
+ return $content;
+ }
+ }
/**
More information about the geeklog-cvs
mailing list