btw, i just came to think of a thing you need to consider... everyone can still view the source, in which case what you propose wont do anything good. On Wed, 2005-09-14 at 18:42 +0200, Samuel Degrande wrote: > Chris Smith wrote: > > There is a tutorial on writing syntax plugins at splitbrain, plugin:tutorial > > I think. I reckon its pretty comprehensive, but then I wrote it ;) > > > > The prototype shouldn't be used as a base for your plugin. You need the > > skeleton (iirc, its linked to the tutorial) or use an existing plugin as an > > example. The skeleton has stripped out all the methods that its ok to > > inherit. > > > > Yes, its the $INFO variable, all of those variables are also available to > > syntax plugins. Again there is a page at splitbrain which gives brief > > details of the elements of the $INFO array. iirc the value you require is > > probably $INFO['perm'] (or maybe $INFO['userinfo']['perm']). > > > > Cheers, > > > > Chris > > > > > > Great ! thanks for the pointers. > > > > > > >>-----Original Message----- > >>From: dokuwiki-bounce@xxxxxxxxxxxxx > >>[mailto:dokuwiki-bounce@xxxxxxxxxxxxx]On Behalf Of Samuel Degrande > >>Sent: 14 September 2005 16:31 > >>To: dokuwiki@xxxxxxxxxxxxx > >>Subject: [dokuwiki] Help on writing a plugin. > >> > >> > >>Hello, I am new to dokuwiki, so please forgive me if my mail > >>is stupid, > >>or if it is off-topic for this mailing-list. > >> > >>I would like to be able to hide some parts of a given > >>content, depending > >>of the user permission. It could be something like : > >><perm AUTH_WRITE>blahblahblah</perm>, so this part will only be > >>rendered if the user has write permission. > >> > >>I guess that I have to write a syntax plugin. I saw the > >>syntax plugin prototype > >>in lib/plugins, but this prototype has much more functions > >>than the plugins I > >>already installed. Should I just take the protoype and fill > >>the unimplemented > >>methods ? > >> > >>And how can I access to the user's permissions ? There is a > >>$INFO for templates. > >>Is that array also available in plugins ? > >> > >>Well, well... if my questions are too stupid, just kill my > >>mail, and I will look > >>in doku core files myself... > >> > >>Anyway, dokuwiki is a great thing, thanks a lot for your > >>work, and please do not > >>remove the possibility to use the filesystem to store the pages. > >> > >>-- > >>Samuel Degrande LIFL - UMR8022 CNRS - INRIA Futurs - Bat M3 > >>Phone: (33)3.28.77.85.30 USTL - Universite de Lille 1 > >>Fax: (33)3.28.77.85.37 59655 VILLENEUVE D'ASCQ CEDEX - FRANCE > >>[CA certs: http://igc.services.cnrs.fr/CNRS-Standard/recherche.html ] > >> > > > > > > -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist