cvs: pear /Forum/lib/plugins/glasstags glasstags.php
| From: | Morgan Christiansson | Date: | Wed, 10 Oct 2001 08:30:42 +0000 |
| Subject: | cvs: pear /Forum/lib/plugins/glasstags glasstags.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-967@lists.php.net to get a copy of this message | ||
mog Wed Oct 10 04:30:42 2001 EDT
Added files:
/pear/Forum/lib/plugins/glasstags glasstags.php
Log:
added a plugin.
Index: pear/Forum/lib/plugins/glasstags/glasstags.php
+++ pear/Forum/lib/plugins/glasstags/glasstags.php
<?PHP
/**
* Support for glasstags.
*
* @package plugins
* @private
* @link http://www.half-empty.org/servlet/LoadPage?pageID=help&topic=glasstags
* @author Morgan Christiansson <mog@linux.nu>
*/
class mod_glasstags {
function read_body(&$row) {
// with URL text
/*
$row["body"] = preg_replace("/(?:\[|<)(?:http:\/\/)?(.+?\..+?)\|(.*?)(?:\]|>)/miX",
"<A HREF=\"http://\\1\">http://\\2</A>",$row["body"]);
*/
// URL only
$row["body"] = preg_replace("/^.*?(?:\[|\<)(?:http:\/\/)?(.+?\..+?)(?:\]|\>).*?$/miX",
"<A HREF=\"http://\\1\">http://\\1</A>",$row["body"]);
}
function form_footer() {
print "<HR WIDTH=\"100%\"><BR><A HREF=\"http://www.half-empty.org/servlet/LoadPage?pageID=help&topic=glasstags\">Glasstags
are accepted</A>";
}
}
plugin_register(new mod_glasstags);
?>