[pmwiki-devel] modifying $pagename upon first Save - FREQ

J. Meijer commentgg at hotmail.com
Thu Nov 30 16:34:24 CST 2006


What I want is to start of with a pagename like this:
 
  Event.2006-11-30___xx
 
and have it transformed into 
 
  Event.2006-11-30_01
 
when it is saved. I can't fix the pagename before a Save because multiple users would end up competing for the same pagename. 
 
 
I found I can't do it decently. I have to resolve to hacks. These hacks don't guarantee that that all page actions that result in page creation have the pagename fixed. 
 
What I really want is a hook to HandleEdit(), so actions that do some preprocessing and then revert to standard HandleEdit() processing have a single point where $pagename can be set/changed, just before the page is created first time. This hook may go into UpdatePage() instead. The point is I can't get things done properly. Replacing HandleEdit in $EditFunctions with my own version just makes sure that any recipy that reverts to HandleEdit won't call mine. 
 
Maybe I missed something. 
 
Another approach would be to pass $pagename by reference to all $EditFunctions, but this would break most recipies. Don't think this would be a good idea anyway. 
 
Any comments? 
 
/jm
 
 
 
_________________________________________________________________
Search from any Web page with powerful protection. Get the FREE Windows Live Toolbar Today!
http://get.live.com/toolbar/overview


More information about the pmwiki-devel mailing list