[geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.50,1.51
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sat Nov 27 09:06:10 EST 2004
- Previous message (by thread): [geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.45,1.46
- Next message (by thread): [geeklog-cvs] geeklog-1.3/language chinese_big5.php,1.9,1.10 chinese_gb2312.php,1.7,1.8 chinese_simplified_utf-8.php,1.5,1.6 chinese_traditional_utf-8.php,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv20912/system
Modified Files:
lib-plugins.php
Log Message:
When no link text is given for the [story:], [event:], or [staticpage:] autotag, use the object's title automatically.
Index: lib-plugins.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** lib-plugins.php 13 Nov 2004 18:08:17 -0000 1.50
--- lib-plugins.php 27 Nov 2004 14:06:07 -0000 1.51
***************
*** 978,982 ****
function PLG_replaceTags ($content)
{
! global $_CONF, $_PLUGINS, $LANG32;
if (isset ($_CONF['disable_autolinks']) && ($_CONF['disable_autolinks'] == 1)) {
--- 978,982 ----
function PLG_replaceTags ($content)
{
! global $_CONF, $_TABLES, $_PLUGINS, $LANG32;
if (isset ($_CONF['disable_autolinks']) && ($_CONF['disable_autolinks'] == 1)) {
***************
*** 1037,1050 ****
if ($autotag['module'] == 'geeklog') {
$url = '';
if ($autotag['tag'] == 'story') {
$url = COM_buildUrl ($_CONF['site_url']
. '/article.php?story=' . $autotag['parm1']);
} else if ($autotag['tag'] == 'event') {
$url = $_CONF['site_url'] . '/calendar_event.php?eid='
. $autotag['parm1'];
}
if (!empty ($url)) {
! $filelink = '<a href="' . $url . '">' . $autotag['parm2']
! . '</a>';
$content = str_replace ($autotag['tagstr'], $filelink,
$content);
--- 1037,1058 ----
if ($autotag['module'] == 'geeklog') {
$url = '';
+ $linktext = $autotag['parm2'];
if ($autotag['tag'] == 'story') {
+ $autotag['parm1'] = COM_applyFilter ($autotag['parm1']);
$url = COM_buildUrl ($_CONF['site_url']
. '/article.php?story=' . $autotag['parm1']);
+ if (empty ($linktext)) {
+ $linktext = stripslashes (DB_getItem ($_TABLES['stories'], 'title', "sid = '{$autotag['parm1']}'"));
+ }
} else if ($autotag['tag'] == 'event') {
+ $autotag['parm1'] = COM_applyFilter ($autotag['parm1']);
$url = $_CONF['site_url'] . '/calendar_event.php?eid='
. $autotag['parm1'];
+ if (empty ($linktext)) {
+ $linktext = stripslashes (DB_getItem ($_TABLES['events'], 'title', "eid = '{$autotag['parm1']}'"));
+ }
}
if (!empty ($url)) {
! $filelink = '<a href="' . $url . '">' . $linktext . '</a>';
$content = str_replace ($autotag['tagstr'], $filelink,
$content);
- Previous message (by thread): [geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.45,1.46
- Next message (by thread): [geeklog-cvs] geeklog-1.3/language chinese_big5.php,1.9,1.10 chinese_gb2312.php,1.7,1.8 chinese_simplified_utf-8.php,1.5,1.6 chinese_traditional_utf-8.php,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the geeklog-cvs
mailing list