[pmwiki-users] Wayward Group Creation

Crisses crisses at kinhost.org
Tue Nov 7 08:59:11 CST 2006


Hey, Kurt,

I'm sorry to see no one picked up your post and responded.  I'll give  
it a go, but I don't really know a good answer....  maybe if I ask  
the right questions it will help :)

On Nov 6, 2006, at 10:51 AM, Kurt Devlin wrote:

> I have a good number of novice users that are creating pages  
> dealing with the XML content that they work with. Unfortunately, a  
> lot of the XML elements follow a dot separated naming convention.  
> This does not translate well to wiki page creation. If have a lot  
> of situations where users create a page like "Unhandled Case in  
> para.text Element". Instead of creating the desired page, this  
> creates a "Text Element" in the wayward group, "Unhandled Case In  
> Para". To combat this, I created a custom Site/PageNotFound page  
> (see below) that tries to determine if the group in the page  
> request exists or not. If the group doesn't appear to exist, it  
> generates additional warnings.
>
> My problem is that this approach does not work if the user is  
> creating a page that is generated from a template. This happens off  
> of the Issues page in MyGroup (see local/MyGroup.Issues.php below).  
> In this case, there is no checking that happens, so my users can  
> create new groups without warning.

I don't understand what you mean by generated by a template.

Are you using a recipe to generate pages by a template?  Or are you  
using the PmWiki ability to set a new page to have a template within  
a group?

> My questions are:
> Is there a way to add PageNotFound functionality to pages created  
> from templates?
> Is there an easier way to check the existence of a group besides  
> "(:if ! [ exists {$Group}.{$Group} or exists {$Group}.HomePage ] :)"?

You can check in config.php rather than in a wiki page...

> Is there an easy way to identify the user adding the new page and  
> do conditional processing based on their name?

perhaps:
(:if equal {$Author} "Name" :)

> local/MyGroup.Issues.php
> <?
>     $LinkPageCreateFmt = "<a class='createlinktext'
>     href='\$PageUrl?action=edit&amp;template= Site.IssuesTemplate'>\ 
> $LinkText</a>
>     <a class='createlink' href='\$PageUrl? 
> action=edit&amp;template=Site.IssuesTemplate'>?</a>";
> ?>

Is this where you're defining the template you mentioned?

Crisses




More information about the pmwiki-users mailing list