[dokuwiki] Re: New Pagemove Plugin (Brainstorming)

  • From: Mykola Ostrovskyy <spambox03@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 22 Mar 2010 19:16:33 +0100

Hi Michael,

MK> - thoughts on the technical process of moving _one_ page
MK>   - an action plugin gathers all meta data prior to moving the page
MK>   - cached instructions of the to be moved page(s) are read and modified
MK>     (fixing links etc..)
MK>   - according to the choosen actions, pages linking back to the moved
MK>     page are processed as well (read cached instructions, fix references
MK>     etc.)
MK>   - the instructions are then turned into normal wiki text again (using
MK>     a reverse renderer which translates instructions into wiki text)

The last bullet point can cause some trouble. I don't know if anybody else does 
it but in some of my
plugins I do instruction shuffling or even inject extra instructions after the 
page is parsed. Maybe
it's not the way PARSER_HANDLER_DONE event was supposed to be used but the fact 
is that there are
some nutjobs (like myself) who mess with the instruction stream. Rendering the 
instructions may
result in a file that is quite different from original wiki text.

I think more reliable way would be to use instructions to get offsets of the 
links in the raw wiki
text and based on that patch the text files as needed.


Mykola

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: