[pmwiki-users] wikiform for blogging?? (was: possible fix for wikiform issue)

John Rankin john.rankin at affinity.co.nz
Thu Oct 25 18:08:53 CDT 2007


On Friday, 26 October 2007 1:23 AM, Asociacion de Robotica <emarte at aiolosrd.com> wrote:
>>I see 2 options for the Project-Part group:
>
>>a) the name of the page is made by concatenating the Project number and the
>>   Part number (assuming for simplicity that both are numbers; they need 
>>   not be). Thus If Project.00004 uses Part.00025, there is a page called
>>   Project-Part.00004-00025.
>
>>b) the name of the page is a meaningless sequential number and the page
>>   has attributes Project number and Part number. So Project-Part.12345
>>   might have attributes [[Project.00004]] and [[Part.00025]].
>
>
>>I think the main features we need to create a proof of concent are:
>>- a way to set a field based on the name of a page in another group
>>- a way to list items based on the name of a page in another
>group
>
>It sounds Reasonable, Let me do some thinking and test  your
>ideas.
>
>Thanks for Replying, I will get back to you with some feedback,
>
>Regards,
>
>-Edwin
>
I went back and looked at the wikiform code and maybe all we need
to add is a field type (pick groupname:fieldname). This will:
- generate a picklist of groupname.nnnnn pages, displaying the
  value of fieldname against each pagename in the list
- using the picked pagename, create a field value in the page of 
  (:fpara fieldname=groupname.nnnnn:)
- when editing a page, use the current value of nnnnn as the
  default for the picklist

The code already supports the following wikilist, I think,
which would go in a GroupFooter of Project:

(:wikilist group=Project-Part project=Project.{$Name}:)

This should find entries from (:fpara fieldname=Project.nnnnn:)
(ie the value of the project field) and list all the parts 
used in the current project.

This suggests...

Wikiform for blogging
=====================
Your description leads me to think that one could build a
blogging engine using wikiforms, if desired. We have 2
form-based groups: BlogName and BlogNameComments. One
entry in BlogName can have zero or more comments; each
comment is linked to one entry in BlogName. We use a
ViewTemplate to view each entry in BlogName and a
(:wikilist:) (possibly enhanced) to view the comments.

To add a comment to a blog entry, we put something like
this in the GroupFooter of BlogName:

[[BlogNameComments.NewComment?entry={$FullName} |Post a comment]]

The entry={$FullName} will tie the comment to the current 
posting and NewComment contains a (:wikiform:) directive.

To show the comments, we need a directive like

(:wikilist group=BlogNameComments blogentry=BlogName.{$Name}:)

I haven't tried this, but I am pretty sure it could work,
pehaps with some minor tweaks to the wikiform code.
In my view, this may be easier than using date- and time-
based page names for a wiki blogging engine. If we use
meaningless page names, we can then use templates and
other features to control the search and display.

It appears to be the same data structure as the Project/Issues
example you describe. I may test this and see what happens.

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list