[Tickets #6767] Re: Make (optionally) all multi-line text entry blocks as wiki pages with links to other horde modules
bugs at horde.org
bugs at horde.org
Tue Jun 3 08:23:22 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/6767
-----------------------------------------------------------------------
Ticket | 6767
Updated By | jon at spriggs.org.uk
Summary | Make (optionally) all multi-line text entry blocks as
wiki pages with
| links to other horde modules
Queue | Horde Framework Packages
Version | HEAD
Type | Enhancement
State | Accepted
Priority | 1. Low
Milestone |
Patch |
Owners |
-----------------------------------------------------------------------
jon at spriggs.org.uk (2008-06-03 04:23) wrote:
Index: Text.php
===================================================================
RCS file: /repository/framework/Horde/Horde/Text.php,v
retrieving revision 1.9
diff -r1.9 Text.php
56a57,77
> function wikiLikeLinks($text = '')
> {
> global $registry;
> foreach(array('wicked', 'chora', 'whups' as $module) {
> if ($registry->get('status', $module) != 'inactive')
> {$text=_wikifiLinks($text, $module);}
> }
> return $text;
> }
>
> function _wikifiLinks($text='', $moduleName='')
> {
> $replaceLink=$GLOBALS['registry']->get('webroot', $moduleName);
> $moduleLink=$GLOBALS['registry']->get('provides', $moduleName);
>
> $text=preg_replace("{\\[$moduleLink:([\\w\\-_:]+)
([\\w\\s\\-_:/]+)\\]}","<a href=\"{$replaceLink}\\1\">\\2</a>", $text);
> $text=preg_replace("{\\[$moduleLink:([\\w\\-_:]+)\\]}","<a
href=\"{$replaceLink}\\1\">\\1</a>", $text);
> $text=preg_replace("{{$moduleLink}:([\\w\\-_:]+)}","<a
href=\"{$replaceLink}\\1\">\\1</a>", $text);
> return($text);
> }
>
More information about the bugs
mailing list