[pmwiki-users] Using forms to introduce and edit constrained PmWiki markup

Harry Forsdick harry at forsdick.com
Sat May 19 05:33:58 CDT 2007


I have a calendar application where I want to be able to enter and edit a
limited number of calendar item types.  This calendar (for a Cable Access TV
organization) is designed to hold four types of items:  MEETING, CLASS,
SHOOT, EVENT.

To date I have created four directives for the standard meeting types and
documented these markups for users to enter and edit calendar items:

*Markup Examples for Calendar Entries*

(:meeting 'Meeting Title' time=1pm place='Cary Library':)

*MEETING*
1pm *Meeting Title*
Location: *Cary Library*

  (:class 'Class Title' time=7pm place='Kites End'\
attending='Larry, Moe, Curley' instructor='Mike':)

*CLASS*
7pm *Class Title*
Location: *Kites End*
Attending: *Larry, Moe, Curley*
Instructor: *Mike*

  (:shoot 'Selectmens Meeting' time=7:30pm place='Cary Hall'\
staff='Jen, George':)

*SHOOT*
7:30pm *Selectmens Meeting*
Location: *Cary Hall*
Staff/Vols: *Jen, George*

 (:event 'Discovery Day' time=10am place='Lexington Center':)

*EVENT*
10am *Discovery Day*
Location: *Lexington Center*

This all works quite well, but I am finding that people in the organization
still feel uncomfortable with using free form markup to specify and edit
their calendar entries.  So, I would like to see if I can use a form to
create and edit a calendar entry.

This brings up two related considerations relating to the production of
PmWiki markup as the result of the output of a form and (in a related but
different issue) how to create a new directive that expands into PmWiki
markup (instead of HTML).  I really like the power of PmWiki markup, but
frequently would like to create these "macros".

Since each entry can be represented on a separate line in the buffer, and I
know how to parse a single line to get the various tokens of the directive,
I know how to take an existing PmWiki page buffer of my restricted markup,
and represent it in a form.

The part that I do not know how to do is how to get at the contents of the
PmWiki markup in a page and the related issue of how to replace the contents
of a PmWiki marked up page with the output of a form.  I assume I am going
to have to have a separate edit link in the output representation of the
calendar items.

Can anyone help me revealing how I can do this?

Thanks,

    Harry

-- 
Harry Forsdick
781.861.6149 (home)  781.799.6002 (cell)
http://www.forsdick.com
http://forsdick.blogspot.com
http://www.lexdig.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070519/695eefee/attachment.html 


More information about the pmwiki-users mailing list