[geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.45,1.46
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sat Nov 27 09:06:10 EST 2004
Update of /var/cvs/geeklog-1.3/plugins/staticpages
In directory www:/tmp/cvs-serv20912/plugins/staticpages
Modified Files:
functions.inc
Log Message:
When no link text is given for the [story:], [event:], or [staticpage:] autotag, use the object's title automatically.
Index: functions.inc
===================================================================
RCS file: /var/cvs/geeklog-1.3/plugins/staticpages/functions.inc,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** functions.inc 25 Oct 2004 08:59:52 -0000 1.45
--- functions.inc 27 Nov 2004 14:06:08 -0000 1.46
***************
*** 559,570 ****
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);
--- 559,577 ----
function plugin_autotags_staticpages ($op, $content = '', $autotag = '')
{
! global $_CONF, $_TABLES;
if ($op == 'tagname' ) {
return 'staticpage';
} else if ($op == 'parse') {
+ $sp_id = COM_applyFilter ($autotag['parm1']);
$url = COM_buildUrl ($_CONF['site_url'] . '/staticpages/index.php?page='
! . $sp_id);
! if (empty ($autotag['parm2'])) {
! $linktext = stripslashes (DB_getItem ($_TABLES['staticpages'],
! 'sp_title', "sp_id = '$sp_id'"));
! } else {
! $linktext = $autotag['parm2'];
! }
! $link = '<a href="' . $url . '">' . $linktext . '</a>';
$content = str_replace ($autotag['tagstr'], $link, $content);
More information about the geeklog-cvs
mailing list