[pmwiki-users] \\L LinkPattern Replace in Markup Rules

Sebastian Siedentopf schlaefer at macnews.de
Wed Oct 19 09:51:05 CDT 2005


Am 19.10.2005 um 16:24 schrieb Patrick R. Michaud:

> On Wed, Oct 19, 2005 at 04:17:37PM +0200, Sebastian Siedentopf wrote:
>
>>> Is anything modifying the $LinkPattern array?  You would get
>>> this result if there's a "null" entry in the $LinkPattern
>>> array somehow.
>>>
>>
>> Yes, $LinkPattern is empty when BuildMarkupRules() is called.
>>
>
> Is BuildMarkupRules() (or MarkupToHTML) being called from within
> a configuration script or cookbook recipe -- i.e., before PmWiki
> has finished initializing things?  If so, it's probably just not
> going to work, and I think it's probably being inserted at the
> wrong point then...
>
> Perhaps you could start from the beginning and let us know what
> you're trying to do with xajax or how you're intending the overall
> architecture to work...?
>
> Pm
>

Well. As first project to get familiar to xajax I tried an improved  
search with preview. I set up the current version (forget about  
layout glitches etc.) here: http://schlaefer.macbay.de/index.php/ 
PmWikiCookbook/XAJAXSearch

If you search for something on the site above you will get the search  
results with a "Preview" link on the left. If you click on a  
"Preview" link I call this function to show the site on the right:

function ajaxShowPage($pagename) {
     global $FarmD;
     include_once ("$FarmD/cookbook/xajaxforpmwiki.php");

     $page = ReadPage($pagename);
     $out = MarkupToHtml($pagename, $page['text']);

     $objResponse = new xajaxResponse();
     $objResponse->addAssign("showpageajax", "innerHTML", $out);
     return $objResponse->getXML();
}

This is not working until I rebuild the $LinkPattern manually. The  
code for this (see last posting) is in xajaxforpmwiki.php

Sebastian




More information about the pmwiki-users mailing list