[pmwiki-users] $WikiLibDirs

DaveG pmwiki at solidgone.com
Tue Apr 20 18:03:34 CDT 2010



On 4/20/2010 6:14 PM, Hans wrote:
> Tuesday, April 20, 2010, 10:59:20 PM, DaveG wrote:
>
>> So with BlogIt enabled, a normal search returns no hits for pages within
>> the normal search realm? This is possibly due to BlogIt changing/adding
>> to $SearchPatterns; however, it's not meant to restrict the default
>> search lists.
>
>> Let me know the scenario that's problematic, and I'll take a look.
>
> yes. For instance (:pagelist group=Site:)
> will not include the pages in cookbook/blogit/wikilib.d
> But blogit.php affects also other custom page stores.
Not quite sure why that would be. BlogIt only sets values for it's own 
$SearchPatterns ($SearchPatterns['blogit']) which should then only be 
applied if explicitly specified in the pagelist. I'll do some tests to 
see if I can identify what might be happening.

Not quite sure why/how other page stores would be affected -- not to say 
it doesn't, just that I'd be interested in why/how. As far as I can 
tell, I'm using the 'normal' mechanism to add page stores, and basically 
copied code from the wiki, and other cookbooks.

Also not clear how pagelists are affected. BlogIt itself makes heavy use 
of pagelists, and BlogIt's own template pages are stored in the Site 
group. Sounds to me as if there is a problem with cookbook interaction 
rather than something specifically wrong with BlogIt.


> I dug around and found the culprit in blogit.php, ca. line 155:
>
>    list($Group, $Name) = explode('.', $pagename);
How would this cause any side-effects? Unless you mean the setting of a 
global variable, but even in that case, not sure why it would be the 
negative impact you're seeing. Either way, there's no reason for blogit 
to set global page/group variables -- not even sure why I did that, 
probably legacy from way back.


> Probably assigning $Group and $Name that way is not correct.
> I usually use PageVar() with something like
>
>    $group = PageVar($pagename, '$Group');
>    $name = PageVar($pagename, '$Name');
BlogIt initially started with this approach, but it caused a lot of 
problems with cache population, so I switched over to the cheaper 
solution above.

  ~ ~ Dave



More information about the pmwiki-users mailing list