[geeklog-cvs] Geeklog-1.x/plugins/links functions.inc,1.98,1.99
Dirk Haun
dhaun at qs1489.pair.com
Tue Jan 1 09:10:47 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/plugins/links
In directory qs1489.pair.com:/tmp/cvs-serv93901/plugins/links
Modified Files:
functions.inc
Log Message:
Removed [category:] autotag, as it won't work with spaces in category IDs
Index: functions.inc
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/links/functions.inc,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** functions.inc 1 Jan 2008 12:59:17 -0000 1.98
--- functions.inc 1 Jan 2008 14:10:45 -0000 1.99
***************
*** 171,215 ****
*
*/
! function plugin_autotags_links ($op, $content = '', $autotag = '')
{
global $_CONF, $_TABLES;
if ($op == 'tagname' ) {
! return array('link','category');
} else if ($op == 'parse') {
! switch( $autotag['tag'] ) {
! case 'link':
! $lid = COM_applyFilter ($autotag['parm1']);
! $url = COM_buildUrl ($_CONF['site_url']
! . '/links/portal.php?what=link&item=' . $lid);
! if (empty ($autotag['parm2'])) {
! $linktext = stripslashes (DB_getItem ($_TABLES['links'],
! 'title', "lid = '$lid'"));
! } else {
! $linktext = $autotag['parm2'];
! }
! $attr = array(
! 'title' => $linktext,
! 'class' => 'ext-link');
! $link = COM_createLink($linktext, $url, $attr);
! $content = str_replace ($autotag['tagstr'], $link, $content);
! break;
! case 'category':
! $cid = COM_applyFilter ($autotag['parm1']);
! $url = COM_buildUrl ($_CONF['site_url']
! . '/links/index.php?category=' . urlencode($cid));
! if (empty ($autotag['parm2'])) {
! $linktext = stripslashes(DB_getItem($_TABLES['linkcategories'],
! 'category', "cid = '$cid'"));
! } else {
! $linktext = $autotag['parm2'];
! }
! $attr = array(
! 'title' => $linktext,
! 'class' => 'ext-link');
! $link = COM_createLink($linktext, $url, $attr);
! $content = str_replace ($autotag['tagstr'], $link, $content);
! break;
}
return $content;
}
--- 171,197 ----
*
*/
! function plugin_autotags_links($op, $content = '', $autotag = '')
{
global $_CONF, $_TABLES;
if ($op == 'tagname' ) {
! return 'link';
} else if ($op == 'parse') {
! $lid = COM_applyFilter($autotag['parm1']);
! $url = COM_buildUrl($_CONF['site_url']
! . '/links/portal.php?what=link&item=' . $lid);
! if (empty($autotag['parm2'])) {
! $linktext = stripslashes(DB_getItem($_TABLES['links'],
! 'title', "lid = '$lid'"));
! } else {
! $linktext = $autotag['parm2'];
}
+ $attr = array(
+ 'title' => $linktext,
+ 'class' => 'ext-link'
+ );
+ $link = COM_createLink($linktext, $url, $attr);
+ $content = str_replace($autotag['tagstr'], $link, $content);
+
return $content;
}
More information about the geeklog-cvs
mailing list