[pmwiki-users] short php q.

noskule noskule at gmx.net
Fri May 4 06:48:03 CDT 2007


J. Meijer schrieb:
> On 5/3/07,  noskule  wrote:
>
>   
>> could please someone giving me a hand in changing this php snipset?
>> I should change the array on line 3 so that i could use wild cards for
>> the listitems. In fact the page name in my installation are
>> SkinSection-* instead of GroupHeader,GroupFooter, ...
>>
>> tanks in advance
>> nos
>>     
>
> Hi Nos, 
>
> It isn't clear to me what you want. Is it to change SomeGroup.GroupXxx (Xxx is Header or Footer or something else starting with an uppercase) pagenames to SomeGroup.SkinSection-Xxx?
>   

> You should also consider doing none of this and redefine the default of $GroupHeaderFmt and $GroupFooterFmt to:
>
>   $GroupHeaderFmt = '(:include {$Group}.SkinSection-Header 
>      self=0 basepage={*$FullName}:)(:nl:)';
>   $GroupFooterFmt = '(:nl:)(:include {$Group}.SkinSection-Header 
>      self=0 basepage={*$FullName}:)';
>
> instead. 
>
> Maybe I just didn't understand it yet though.. 
>
> /jm
>
>
>   
hm, guess bad post I wrote, sorry. I try to change this extension:
     http://www.pmwiki.org/wiki/Cookbook/EditDataPages
so that the array on line 3 covers all pagenames that start with 
"SkinSection-", so I tryed the vollowing without success:

  $group = FmtPageName('$Group',$pagename);
if ((PageExists("$group.EditForm") and 
(!in_array(FmtPageName('$Name',$pagename),
   array($group,'EditForm',preg_match('/^SkinSection-./', $pagename))))))
   $PageEditForm = "$group.EditForm";

of course I could list all skinsections, but I've got 16 of it, so it 
would much simpler.

>
>   
>> $group = FmtPageName('$Group',$pagename);
>> if ((PageExists("$group.EditForm") 
>> and !in_array(FmtPageName('$Name',$pagename),
>>     array($group,'GroupHeader','GroupFooter','EditForm'))))
>>   $PageEditForm = "$group.EditForm";
>> ## Don't include EditForm pages in lists of "normal" pages
>> $SearchPatterns['normal'][] = '!\.EditForm!';
>>     
>
>
>
>
>
> _________________________________________________________________
> Connect to the next generation of MSN Messenger 
> http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
>   




More information about the pmwiki-users mailing list