Posted on: 10/23/04 02:15pm
By: Dirk
function plugin_autotags_faqman ($op, $content = '', $autotag = '') { global $_CONF, $_TABLES; if ($op == 'tagname' ) { return 'faq'; } else if ($op == 'parse') { if (is_numeric ($autotag['parm1'])) { if (!empty ($autotag['parm2'])) { $question = $autotag['parm2']; } else { $question = DB_getItem ($_TABLES['faq_topics'], 'question', "topicID = {$autotag['parm1']}"); } if (!empty ($question)) { $url = $_CONF['site_url'] . '/faqman/index.php?op=view&t=' . $autotag['parm1']; $link = '<a href="' . $url . '">' . $question . '</a>'; $content = str_replace ($autotag['tagstr'], $link, $content); return $content; } else { return '(FAQ topic #' . $autotag['parm1'] . ' not found)'; } } else { return '(error in FAQ link)'; } } }
faq:
autotag which creates a link to the FAQ topic with the id after the colon. It also pulls the headline (i.e. the question) of the FAQ from the database, so you don't have to enter it yourself. In other words:Cannot modify header information - headers already sent by ...would be translated into a link to this ever-popular FAQ topic:
<a href="http://www.geeklog.net/faqman/index.php?op=view&t=38">Cannot modify header information - headers already sent by ...</a>But you can also enter your own link text like this
Please read this first
'parm1' => str_replace (']', '', $parms[1]),This will also be fixed in rc2.
Posted on: 10/23/04 06:42pm
By: Dirk
----- snip -----
----- snip -----
Posted on: 05/12/05 07:10am
By: Anonymous (Aloysius)
Posted on: 05/12/05 07:17am
By: Anonymous (Aloysius)
Posted on: 05/12/05 02:08pm
By: Dirk