Go to the FreeLists Home Page Home Signup Help Login
 



Browse dokuwiki: This Month's ArchiveMain Archive PageRelated posts • Previous by Date • Next by Date

[dokuwiki] Re: Add some (non-persistent) Metadata

  • From: Gunther Pilz <dokuwiki@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 01 Sep 2007 18:38:41 +0200
Hello,

I found a (dirty) solution for one of my problems.

Gunther Pilz schrieb:
> Second problem is that I use the 'IO_WIKIPAGE_WRITE' event to save my
> metadata (if it has changed). But this event is only triggered when
> there have been changes to the wiki/ page text. In case that only my
> metadata has been changed, it won't be saved. Any solution, other than
> making any pseudo editing?

So here it is for those who are interested:

There is a function saveWikiText() in /inc/common.php (at line 715)
which is called after page editing.
The line

    if($text == rawWiki($id,'')) return;

finishes the function if there have been no changes made to the (page) text.

So I changed this line to

    return trigger_event('IO_WIKIPAGE_WRITE', $data, '', false);

(and added my needed data).

So my function is called at the right time.
Maybe it's possible to add some additional code in the core DW, because
I think that it would make things easier if you are using the
'HTML_EDITFORM_INJECTION' event.

The best solution might be a check if this event is used and if yes then
trigger the event.


Greetings
Gunther

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts:

  • [dokuwiki] Add some (non-persistent) Metadata
  • [dokuwiki] Re: Add some (non-persistent) Metadata
  • [dokuwiki] Re: Add some (non-persistent) Metadata
  • [dokuwiki] Re: Add some (non-persistent) Metadata
  • [dokuwiki] Re: Add some (non-persistent) Metadata




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.