[pmwiki-users] Core and question marks

Patrick R. Michaud pmichaud at pobox.com
Mon Aug 28 13:16:28 CDT 2006

On Mon, Aug 28, 2006 at 01:44:45PM -0400, The Editor wrote:
> Just as a suggestion, can't you do something like the following in
> your config file?  I don't know the exact code for extract group()
> $LinkGroup = extractgroup($LinkText);

$LinkText isn't a "normal" PHP variable -- it's simply whatever
the appropriate link text should be for a given link.  Given
a markup such as

    [[HomePage | link to home page]]

$LinkText is just a marker in the $...Fmt strings indicating
where the text of the link should go.  Stated differently, in

    $LinkPageExistsFmt = "<a href='\$LinkUrl'>\$LinkText</a>";

the strings $LinkUrl and $LinkText aren't normal PHP variables,
they're simply placeholders for where the link's url and text
should be place upon output.

Or, think of it this way -- on a page that has 100 different
links, there could be up to 100 different values of $LinkText
as the page is being processed.  Relying on something like
$LinkText in the config.php file (before markup processing has 
occurred) isn't going to be of any help -- it has to be
checked as the page is being processed.


More information about the pmwiki-users mailing list