[pmwiki-users] Still on markup

Marco Ferretti marco.ferretti at gmail.com
Fri May 5 06:00:14 CDT 2006


On Friday 05 May 2006 12:19, Hans wrote:
> Marco, you could modify newpageboxplus.php to include another field
> and split the Date entry from the blog title entry.
> Have a look at newpageboxplus.php:
> The function NewPageBox generates a standard box, so you need to add
> another input field of kind
> <input class='inputbox newpagetext' type='text' name='date'
> value='{$opt['date']}' size=... >
> and add to the $defaults array:
>   'date' => '',
>
> and then change the HandleNew function to process the date returned,
> so it is combined with the name returned to give you a pagename with
> both date and name combined. HandleNew is processing what the form
> submits.
>
> Perhaps a change to HandleNew like this (untested and may need
> refinement):
> $name = @$_REQUEST['name'];
> $date = @$_REQUEST['date'];
> $name = $date."-".$name;
>
> Sorry this is not  a full solution, just a hint where to start writing
> your code.
>
>
> Best,
>  Hans
>
>

Hans,
actually, that's what I was trying to do ... but I feel I am missing something 
in the custom markup because what I get as output of 
(:newpagebox  base="EventPages.HomePage" template=Event.EventTemplate 
button=right label="New Event Entry" size=40  date="{$Today}" :)

is just one input box ( the title ) and the button.

I have added the date variable and the input box : 
  $defaults = array(
    'base' => '',
    'template' => '',
    'value' => '',
    'size'   => '30',
    'date' => '',
    'label' => FmtPageName(' $[Create a new page called:] ', $pagename),
    'button' => 'left',
    'focus' => '',
    'save' => '');


    ($opt['button']=="left" ? $buttonHTML : "") .
    "<input class='inputbox newpagetext' type='text' name='date' 
value='{$opt['date']}' size='{$opt['size']}'" .
    "<input class='inputbox newpagetext' type='text' name='name' 
value='{$opt['value']}' size='{$opt['size']}'" .
    ($opt['focus']=="true" ? $onfocusHTML : "") . 
    "/>" .
    ($opt['button']=="right" ? $buttonHTML : "") .


and modified the HandleNew function as suggested ....

that's mainly the reason why I have been posting ( == bugging ) you guys .


TIA 

Marco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/pmwiki-users/attachments/20060505/864d8799/attachment.bin 


More information about the pmwiki-users mailing list