[pmwiki-users] NewPageBoxPlus and autosaving new pages

Hans design at softflow.co.uk
Mon Mar 20 14:15:55 CST 2006

Monday, March 20, 2006, 7:05:38 PM, Philip wrote:
> So the first page that is created is "SomeNewGroup.HomePage", and on
> that page are all of the newpageboxes used to create the other pages.
> When I click the button to create SomeNewGroup.GroupHeader, nothing
> happens. .....

I changed the code slightly in newpageboxplus to achieve a cleaner
page open. I uploaded the updated script.

Previous code fragment in function HandleNew:

  if (@$_REQUEST['save']) {
     WritePage($newpage, $new);
     $urlfmt = '$PageUrl?action=browse';
  Redirect($newpage, $urlfmt);

New code fragment:

  if (@$_REQUEST['save']) {
     WritePage($newpage, $new);

This seems to work better. Redirecting to the newly written page opens
it in a way that makes it possible to do what you are trying to do.
Why this change in the code has this effect I don't know though.

The other question:
> Say you click a link to [[ {$Group}.GroupHeader]], in a
> group where there is no GroupHeader page yet. It would automatically
> create and save the new page for you, like newpageboxplus can. Is this
> doable?

I don't think it is, since any normal link programmed to create new
pages and automatically save them will be triggered by search-engine


More information about the pmwiki-users mailing list