[dokuwiki] Re: Syntax Plugin: How to manipulate wiki content

  • From: Myron Turner <turnermm02@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 10 Dec 2008 07:03:33 -0600

James Lin wrote:
Hi Guys,
I am trying to write a custom ACL plugin to restrict access to individual wiki pages, it works like this: putting the tag {{restrict group=developers /restrict}} at the beginning of the wiki page. my problem is: if the access is denied, I need to change the wiki page content to display some friendly message. However I don't know how to modify the content outside my syntax scope. if I use $renderer->doc .= "access denied", it only replace my syntax but not global content.

Cheers
James Lin


--

You may be able to use the TPL_CONTENT_DISPLAY event. Inspect $event->data to see if the top of the page contains your tag, and if so, you can either replace $data with a message or prepend a message to your $data.
_____________________
Myron Turner
http://www.mturner.org
http://net18reaching.org/cityscapes



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

Other related posts: