[dokuwiki] Re: Restricting the creation of new namespace
- From: Myron Turner <turnermm02@xxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 13 Dec 2007 10:49:57 -0600
You can do this with an event handler that checks the
$_REQUEST['id'], which will hold the namespace form of the new file.
Look through the events at:
http://wiki.splitbrain.org/wiki:events_list
for an appropriate event.
One possibility is using the ACTION_ACT_PREPROCESS event and
$event->preventDefault() and $event->stopPropagation(), but you'll want
to print an error message to the screen, warning of the impending cut
off, otherwise (I've just checked this) the user will not be aware of
the issue until trying to save the file.
If you are not familiar with events see:
http://wiki.splitbrain.org/wiki:events
and my own:
http://www.mturner.org/wiki/doku.php?id=wiki:event_handlers
Myron
Clemens Perz wrote:
Hi All!
After crawling the wiki, checking the forum and searching the list
archive - I have to pose this question to the list itself [you can
quickly spot a good project if the documentation is so rich that it is
hard to find the small details ;-)) ]
I wonder if there is a way to restrict the creation of new namespaces
to a list of terms the administrator has defined in advance, case
sensitve and including the definition of subs. By adding an array of
terms to the local.php? ...
Here we have some users who drive me mad with typos and make me move
pages from/to namespaces all the day.
Cheers,
Clemens
--
_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- References:
- [dokuwiki] Restricting the creation of new namespace
- From: Clemens Perz
Other related posts:
- » [dokuwiki] Restricting the creation of new namespace
- » [dokuwiki] Re: Restricting the creation of new namespace
Hi All!After crawling the wiki, checking the forum and searching the list archive - I have to pose this question to the list itself [you can quickly spot a good project if the documentation is so rich that it is hard to find the small details ;-)) ]
I wonder if there is a way to restrict the creation of new namespaces to a list of terms the administrator has defined in advance, case sensitve and including the definition of subs. By adding an array of terms to the local.php? ...
Here we have some users who drive me mad with typos and make me move pages from/to namespaces all the day.
Cheers, Clemens
- [dokuwiki] Restricting the creation of new namespace
- From: Clemens Perz