[dokuwiki] Re: question on meta data and feature request for enabling disabled functionality for admins

  • From: Michael Klier <chi@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 18 Sep 2007 23:09:07 +0200

Jason Keltz wrote:
> Hi.


> I have one question, and one feature request.
> First, is there anywhere on the DokuWiki site where I can find 
> information on exactly how to understand all the codes in the *.meta 
> files in the data/meta directory of my DW installation?   I'd like to 
> understand how the revisions are stored.

The contents of the .meta files are serialized php arrays and contain
various information about the wiki page. The revisions are stored in
data/attic (in fact the revisions are the old version of the wiki page -
filename is a md5sum of the page name and the timestamp I think). Each
wiki pages has a related .changes file in data/meta/, the revisions are
looked up using the log entries in those files.

> Second is pretty much a feature request -- I would like to be able to 
> disable the "revision history" and "recent changes" buttons on a DW 
> site, yet still maintain those buttons for the admin user.  That is, the 
> user cannot look at the revision history of documents, or recent 
> changes, but the site maintainer can see it all.  I think that most 
> templates use tpl_actionlink in order to display the buttons, but 
> tpl_actionlink first checks if "actionOK".  If the features are 
> "disabled", then actionOK returns false, and the button is not printed. 
>  This means that it's not up to the template whether the buttons get 
> printed or not.  Either tpl_actionlink should leave it up to the 
> template to check the status of actionOK (which provides more 
> flexibility, but more difficulty for template maintainers), or, DW could 
> provide another config option that, by default, enables disabled 
> functionality for admins.  Does this make any sense?  It certainly 
> sounds like something that could be useful to other people.

I recently made a plugin "ClosedWiki", you`ll find it at the plugins
page. It allows you enable/disable actions for non-logged in users (it
doesn`t disable the actions completely as the disable action config
options does). ATM moment in only checks wether a users is logged in or
not, but if requested, I could add another option to allow actions only
for users which are part of certain groups or even only the admin user.


Michael Klier

mail:   chi@xxxxxxxxxxx
www:    http://www.chimeric.de
icq:    206179334
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: