From: Reini U. <ru...@x-...> - 2004-11-22 22:24:34
|
Pascal Giard (QC/EMC) schrieb: > i was looking thru main.php and WikiFormRich.php and noticed that it's > possible to edit OR create a page via forms, but not to append text > (well not directly). you need a action to do that. actions are best handled by actionpages calling a custom plugin. > I simply want a form that will append Text to a Page. > Should i modify main.php to support a new kind of action, namely > "append" or something like it ? no, better write a plugin like AppendText. > I'd simlpy make it do something like: > $current = $pagehandle->getCurrentRevision(); > $version = $current->getVersion(); > $text = $current->getPackedContent(); > $newtext = $text . "\n A processed version of the stuff > contained in my form."; > $meta = $current->_data; > $meta['summary'] = sprintf(_("Updated %s"),$page); > $pagehandle->save($newtext, $version + 1, $meta); > > Or should i be calling another plugin ? > > Where can i find more Documentation on the tips and [magic] tricks with > WikiForm[Rich] ? not yet. sorry. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |