Learn about DokuWiki
Advanced Use
Corporate Use
Our Community
Follow us on Facebook, Twitter and other social networks.
Learn about DokuWiki
Advanced Use
Corporate Use
Our Community
Follow us on Facebook, Twitter and other social networks.
Compatible with DokuWiki
Tagged with discussion
The Discussion Plugin adds a discussion section after your wiki page for user comments. This is useful to separate page content and the discussion thereof and also, if you don't want to give normal users the right to edit the page but still want user contributed notes.
A second component of this plugin shows a list of all pages in a namespace with a discussion section (called discussion threads) ordered by most recent comments. This allows you to create a very simple discussion forum in your wiki.
This is the main part of the plugin. By including the ~~DISCUSSION~~ instruction in your wiki page, a discussion section will be appended after the normal wiki page content. To turn it off again, use ~~DISCUSSION:off~~. If you want to show the existing discussion but don't want to allow new comments / replies, use ~~DISCUSSION:closed~~.
~~DISCUSSION~~ ~~DISCUSSION:off~~ ~~DISCUSSION:closed~~
A custom title can be appended after the separator |.
~~DISCUSSION|Custom Title String~~ ~~DISCUSSION:closed|Custom Title String~~
After each comment in the discussion section there may be up to three buttons (depending on your rights):
Reply button. The comment entry form will then be placed accordingly.Of course, the whole DokuWiki syntax can be used in comments as well. But there are problems with headers and footnotes as they may produce conflicting IDs and thus invalid XHTML. I'm looking for a way to either allow only a subset of the wiki syntax or automatically create unique IDs.
This displays a list of all pages of the given namespace with a discussion section. The list is sorted by the most recent comment.
{{threads>[namespace]&[count=n]&[flags]&skipempty}}
| [namespace] | the namespace for which you want a discussion thread list; : is the top namespace, . is the same namespace as the page lies in, * the whole wiki | required |
|---|---|---|
| [count=n] | the number of discussions which should be displayed (valid values: n > 0) | optional |
| [flags] | pagelist flags delimited by &, see flags | optional |
| skipempty | Do not print discussions with no comments | optional |
Default a new thread form is shown below the list. See threads_formposition setting for moving it to the top of the list, or to disable this form.
The plugin can be configured using DokuWiki's configuration manager available in the admin menu.
automatic | automatically enables discussions on all pages |
|---|---|
excluded_ns | list of namespaces for which to revert the automatic config setting (a regular expression e.g. /(playground|wiki)/ ) |
visibilityButton | Enable button for toggling the visibility of the discussion section |
allowguests | allow/disallow unregistered users to leave comments |
showguests | show/hide comments to unregistered users |
linkmail | link username with the supplied mail address |
useavatar | display avatars (requires the avatar plugin) |
urlfield | allow to submit a homepage URL (will be linked with the name unless linkmail is set) |
addressfield | allow to submit a address |
adminimport | admin can supply all fields (for import only) |
wikisyntaxok | allow wiki syntax in comments |
threads_formposition | position of the new thread form shown with the {{threads> }} syntax (before or below the thread listing) |
subscribe | allow comment subscription (uses double opt-in) |
newestfirst | Invert the comments display order |
usethreading | enable/disable threaded comments |
userealname | display the real name instead of the user name of registered wiki users |
moderate | moderate new comments |
moderatorgroups | add groups to delegate administrative control (e. g. @coadmins,@mods) |
moderatorsnotify | send a notification to all specified moderators whenever a new comment was submitted |
Please report bugs or feature requests at the Bug tracker.
I have DokuWiki formatting allowed in comments. I also have a LaTeX plugin. <math>\sum_x{x+5}</math> is not rendered within a discussion.
The plugin has built-in support for the CAPTCHA plugin. Additionally, one might also consider to use the Bad Behavior plugin.
You're probably not running the latest version of the plugin. Try to update to the latest version first.
Yes, use the newestfirst config option.
If you enable the notify option admins are notified for all comments.
The comments are saved in special meta files inside the <dokuwiki>/data/meta directory. Each page which has a discussion has a corresponding pagename.comments file.
You can change the size of the box by using the following CSS class:
div.dokuwiki div.comment_wrapper {}
Because it would break DokuWiki's revisions system.
Alternative: use the pagelist plugin to make an overview of “latest discussion” by using the {{threads>...}} syntax.
This is a know problem with the sidebar plugin which needs to be fixed by it's author. If you're looking for working alternatives in the meanwhile I suggest to have a look at the sidebarng plugin.
You can list all discussions with:
{{threads>*}}
Discussions aren't stored like regular wiki pages. This will not work.
This is possible using the feed plugin, please see there how it works.
The plugin disables subscription for logged-in users when the option “subscribers” ($conf['subscribers']) is activated in the configuration.
You will need to edit a line in the 'action.php' file which can be found in lib→plugins. Find the following line (281)
$comment['user']['id'] = 'test'.hsc($_REQUEST['user']);
and replace it with
$comment['user']['id'] = 'GUEST: '.hsc($_REQUEST['name']);
I'm not a developer of the plugin but I believe you can do this if you comment out the following lines 283-287 and 291:
// if(empty($_REQUEST['name']) or empty($_REQUEST['mail'])) return;
// if(!mail_isvalid($_REQUEST['mail'])) {
// msg($lang['regbadmail'], -1);
// return;
// } else {
$comment['user']['id'] = 'test'.hsc($_REQUEST['user']);
$comment['user']['name'] = hsc($_REQUEST['name']);
$comment['user']['mail'] = hsc($_REQUEST['mail']);
// }
and lines 983 - 988:
<!--<div class="comment_mail">
<label class="block" for="discussion__comment_mail">
<span><?php echo $lang['email'] ?>:</span>
<input type="text" class="edit<?php if($_REQUEST['comment'] == 'add' && empty($_REQUEST['mail'])) echo ' error'?>" name="mail" id="discussion__comment_mail" size="50" tabindex="2" value="<?php echo hsc($_REQUEST['mail'])?>" />
</label>
</div>-->
in action.php inside the plugins directory. Anonymous users won't be able to subscribe tho. Please correct me if I'm breaking some other function with this. Until now there hasn't been a problem tho. Andy
Please report any bugs or feature wishes in the issue tracker!
For the discussion refer to the discussion page.