[pmwiki-users] Using PmWiki outside
Larry Lewis
pmwiki at jenolan.org
Thu Feb 24 16:26:24 CST 2005
As part of our new web site I am working on a bunch of widgets, one
thing I need to do is let non-admin people put in bits of text to be
used on the site.
I have a BBCODE parser which works comparably to phpBB's one (which
means it is not too much of a hassle to get used to) .. but all the
people who will be doing this also use the various wiki's and I had this
wonderful thought, what if I could use the PmWiki markup engine?
What I mean is a functional access like;
$Text = EditText( $OldText );
When called it displays a PmWiki style edit box (basically like editing
a page) $OldText is the current 'page' and it returns the new page when
save is pressed (or empty string for no edit). They can preview what
they are editing do anything that a normal wiki edit would do, press
save and the application gets back the text in wiki markup.
Then I can store this as I like, in a database, part of a file, the uses
are endless.
When I want to display the info I have something like;
$HtmlText = Markup( $text );
and I can use the HtmlText in a div, table, whatever just like mom
OK .. now you will tell me I can already do it huh? Great!!!
Larry
More information about the pmwiki-users
mailing list