[pmwiki-users] creating pages

Knut Alboldt pmwiki at alboldt.de
Wed Feb 23 13:30:38 CST 2005


Patrick R. Michaud schrieb:
> On Wed, Feb 23, 2005 at 11:40:06AM +0100, Knut Alboldt wrote:
> 
>>Is there a possibility to create a page by clicking a link, e.g.
>>
>>[[somegroup.somenewpage?action=newpage]]
>>
>>When clicking on that link I want to create a new page in wiki without 
>>any further user interaction (e.g. edit-screen)
> 
> 
> 1.  What do you want the page to contain?

It's just an idea to collect a snapshot of data from outside wiki (using 
php-code in the markup) at a certain time the user specifies (by 
clicking the link, e.g. apache access log display, calendar lists, data 
dumps etc. In a further step I'd like to use this by an own cron-driven 
agent to trigger that via http-request.

> 
> 2.  Is this going to be used with {$var} markup somehow?  If not,
>     then I don't see why someone would go to the effort of 
>     writing this markup when they could just as easily create
>     the page...?

yes, sorry the sample isn't to good. Right now I'm replacing the 
pagename by a generated one (could possibly use also [[?action=newpage]] 
?), capture the data from somewhere outside wiki and turn the action 
into edit. Then the page is displayed in the edit mode. But when I edit 
this page and save it the originally set text is displayed, so the 
user's input is lost.
I'm not using a markup but a code-snippet in my config.php like

if ($action=='newpage')
{
    ....
    $pagename = "some.other.generated.pagename";
    $action = 'edit';
    $_POST['text'] = 'some generated text';
    $_REQUEST['post'] = 1
}

What I want is that that editmode is skipped and the generated data is 
just browsed. Tried this by setting $_REQUEST['post'] = 1 (saw this in 
pits) but that didn't work.

> 
> 3.  If there's no further interaction of some sort, then web
>     spiders will likely activate the links for you.  I'm not
>     sure if this is okay or not.

That's ok, I'm using this function on my local pc and in our intranet only.

Knut



More information about the pmwiki-users mailing list