From: <col...@us...> - 2005-01-11 00:44:59
|
Update of /cvsroot/tikiwiki/tiki/lib/wiki-plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7588 Added Files: Tag: BRANCH-1-9 wikiplugin_aname.php wikiplugin_alink.php Log Message: Plugins to make anchors on wiki pages --- NEW FILE: wikiplugin_aname.php --- <?php /* * Tiki-Wiki ANAME plugin. Go to http://www.TikiMODS.com for more TikiWiki Plugins. * * DESCRIPTION: Puts an anchor into a wiki page. Use in conjunction with the ALINK plugin, which makes links to the anchor. * * INSTALLATION: Just put this file into your TikiWiki site's lib/wiki-plugins folder. * * USAGE SYNTAX: * * {ANAME()} * anchorname the name of the anchor. Use this as the aname=> parameter in the ALINK plugin! * {ANAME} * * EXAMPLE: {ANAME()}anchorname{ANAME} * */ function wikiplugin_aname_help() { return tra("Puts an anchor into a wiki page. Use in conjunction with the ALINK plugin, which makes links to the anchor").":<br :>~np~{ANAME()}anchorname{ANAME}~/np~"; } function wikiplugin_aname($data, $params) { global $tikilib; extract ($params); return "<A NAME=\"$data\"></A>"; } ?> --- NEW FILE: wikiplugin_alink.php --- <?php /* * Tiki-Wiki ALINK plugin. Go to http://www.TikiMODS.com for more TikiWiki Plugins. * * DESCRIPTION: Puts a link to an anchor in a wiki page. Use in conjunction with the ANAME plugin, which sets the location and name of the anchor. * * INSTALLATION: Just put this file into your TikiWiki site's lib/wiki-plugins folder. * * USAGE SYNTAX: * * {ALINK( * aname=>anchorname the name of the anchor you created using the ANAME plugin! * )} * yourlinktext the text of the link * {ALINK} * * EXAMPLE: {ALINK(aname=myanchor)}click here{ALINK} * */ function wikiplugin_alink_help() { return tra("Puts a link to an anchor in a wiki page. Use in conjunction with the ANAME plugin, which sets the location and name of the anchor").":<br :>~np~{ALINK(aname=anchorname)}".tra("linktext")."{ALINK}~/np~"; } function wikiplugin_alink($data, $params) { global $tikilib; extract ($params); if (!isset($aname)) { return ("<b>missing parameter for aname</b><br />"); } return "<A HREF=\"#$aname\">$data</A>"; } ?> |