[pmwiki-users] Re: WikiCalendar and wikiforms

John Rankin john.rankin at affinity.co.nz
Mon Oct 24 17:06:27 CDT 2005


On Saturday, 22 October 2005 9:51 AM, Thomas N. Burg <editor at randgaenge.net> wrote:
>You use a %rfloat% in wikilog.php to position the edit-link I did  
>changed that directly in the wikilog.php. Is there another way to  
>position the edit-link?

I have changed this to %class=editday% so you can now control look 
and placement locally.

> The edit-link: I'd like to translate it via i18n, is it already in  
>there?

Done in the latest wikilog.php and wikilog-i18n-en.php

The latest wikilog also fixes a bug so it displays this week correctly 
on Sundays.

Thursday, October 20, 2005, 8:55:41 AM, Thomas wrote:
> ?action=editeform does not accept the directives that are in the  
> Groupheader. In my case the Groupheader says (:noleft:)(:noright:)  
> and has some links but the editeform shows left and right and no links.

Download the latest version of wikiform.php and try it again -- it 
should now include GroupHeader and GroupFooter in the Edit Form view.
I have successfully been able to hide the left menu with (:noleft:)
in a GroupHeader.

Also, the latest version now lets a form template designer designate 
one form field as the 'Summary' text written to RecentChanges.

Suppose you want the shortdesc field to be written to the summary.
The template definition for that form field would read

:Short description:*shortdesc

Note the '*'. The contents of shortdesc will automatically appear
in the Summary field when you preview the form prior to posting.
It appears os a field on the page as usual.

>
>BTW: another feature request would be an "edit form"-link for wikilog  
>it works great with the wikiform-script.

I'm amazed, since I haven't tested this at all! Could you just clarify
what 'works great' means? I would have expected that when creating a
new page using the wikiform script that it would name the pages 00001
00002 00003 ..., rather than 20051023 20051024 20051025 ...

You can ask it to insert an edit form link with the following code in
the local.php file:

if ($action=='browse' && preg_match('/[.\\/]\\d{8}$/',$pagename)) {
    SDV($FormNavFooter,true);
    if ($FormNavFooter)
        $GroupFooterFmt.= "(:nl:)[[$pagename?action=editeform | Edit Form]]";
    else
        $GroupHeaderFmt = "[[$pagename?action=editeform | Edit Form]](:nl:)".
            $GroupHeaderFmt;
}

This will put the link in the footer.

Caveat emptor. I have not tested this and it will break badly on calendar 
pages that were not created using the form template!!

If I have some time, I'll examine the interaction between these 2 recipes
more carefully. In the mean time, tread with caution.

Good luck.
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list