[pmwiki-users] automatic link creation
Melodye Bowers
pbowers at pobox.com
Tue Aug 25 19:51:02 CDT 2009
On Tue, Aug 25, 2009 at 11:38 PM, adam overton <a at plus1plus1plus.org> wrote:
> hi
> i would like to have pmwiki convert certain commonly appearing names
> (or terms, or orgs) into a links to the respective person's external
> website.
>
If there is something in common between the people's external web-sites then
it could be more elegant than this, but a simple set of rules sounds like
what you're looking for...
$foo = array('John' => 'http://www.abc.com', 'Sally' => 'http://www.def.com
');
foreach ($foo as $name => $site) {
Markup('/\b'.$name.'\b/', '%newwin%'.$site.'%%', ...);
}
Does that work? Obviously this requires it all to be set up in config.php
and I don't know if that's what you're looking for, but maybe it'll be a
start...
-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090826/4f013aa9/attachment.html
More information about the pmwiki-users
mailing list