| Download | plugin-discussion.tgz |
|---|
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.
~~DISCUSSION~~ ~~DISCUSSION:off~~ ~~DISCUSSION:closed~~ ~~DISCUSSION|Custom Title String~~ ~~DISCUSSION:closed|Custom Title String~~
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~~. A custom title can be appended after the separator |.
After each comment 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.
{{threads>[namespace]&[flags]}}
| [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 |
|---|---|---|
| [flags] | pagelist flags delimited by &, see flags | optional |
This displays a list of all pages of the given namespace with a discussion section. The list is sorted by the most recent comment.
The plugin can be configured using DokuWiki's configuration manager available in the admin menu.
automatic | automatically enables discussions on all pages |
|---|---|
allowguests | allow/disallow unregistered users to leave comments |
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) |
usecocomment | use CoComment tracking (disabled by default) |
wikisyntaxok | allow wiki syntax in comments |
threads_formposition | position of the new thread form |
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 |
You can try this plugin using the live demo.
Since 2006-10-06 the plugin package contains a conversion script to convert discussion pages generated by the old Blog Plugin1) into new .comments meta files. Here is how to do it:
define('DISCUSSION_NS', 'discussion');.http://path.to/dokuwiki/lib/plugins/discussion/convert.php.Please report bugs or feature requests at the Bug tracker.
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 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 {{thread>...}} syntax.
I've added a small syntax plugin that allows you to write
[[discuss>:some:discussion:somewhere]]
which will be replaced by xx Comments, linked to
:some:discussion:somewhere#discussion__section
if there is a discussion on that page.
“xx” will be the number of comments on that page.
I can't upload it here. With a bit of luck, find it here:
http://pike.kw.nl/files/software/pike/recent/php/dokuwiki/discuss.php.txt
*-pike
I use the sidebar plugin. Now I tried to use the discussion plugin too. But it seems there is a conflict. Discussions are only displayed at the sidebar page, not on the others. Is there any solution for this problem?
Greetings Maik
Like Maik above, and like “Ham”, who added a note under the sidebar plugin, the discussion and sidebar plugins do not seem to work together for me either.
When I enable the sidebar plugin through the administrator's configuration settings, discussion boxes disappear.
When I disable the sidebar plugin through the administrator's configuration settings, discussion boxes re-appear.
I'm using
It seems to me that this might be further diagnosed by
June 17, 2009
Kingsley
Update: Enabling debugging and experimenting with administrative configurations didn't work.
June 17, 2009
Kingsley
Update 2: The discussion and sidebar plugins also conflict when used with the “default” template.
June 19, 2009
Kingsley
My DokuWiki installation runs locally and in house so that for me a name would be sufficient and I don't need to worry about spam.
I had a look at the options but name and email is the simplest thing I can do. Is there a simple way to modify the code in order to have only a name required? (or only a email) — Sebastian Spiess 2008/08/27 00:08
OK, here is what I did and it seems to work. But as I have not much of a clue regarding PHP it might not be the right way to do it.
So please
— Sebastian Spiess 2008/08/27 00:29
I uncommented line 616 to 621 in the action.php using <!– xxx –>
<div class="comment_mail">
<label class="block" for="discussion__comment_mail">
<span><?php echo $lang['email'] ?>:</span>
<input type="text" class="edit" name="mail" id="discussion__comment_mail" size="50" tabindex="2" value="<?php echo hsc($_REQUEST['mail'])?>" />
</label>
</div>
About Edit, Delete and Hide buttons : Can the discussion plugin be configured in order to let some non admin user use this buttons in the discussion section ?
Cordially,
Etienne Fort ~ fortetienne@gmail.com
Using ~~DISCUSSION:off~~ doesn't work all the time when global discussion is off. I noticed that sometimes it works again adding a newline before and after ~~DISCUSSION:off~~. Any same experiences and how to resolve it are welcome. (version 2008-07-12, DokuWiki 2008-05-05) RH
Please post bugs at the bug tracker linked on this page. Thanks! — Michael Klier 2009/01/07 12:12
Even with the configuration setting turned on, I do not see the “Subscribe to comments” checkbox. Are there additional settings that need to be configured? Fantastic Plug-in, by the way.
If you have 'useacl' set for the wiki, and you do not allow unregistered users to post comments, then the checkbox won't be shown. In this case, users subscribed to the page/namespace will be subscribed to comments. But this only works when there is a 'notify' address configured. http://bugs.chimeric.de/index.php?do=details&task_id=114&project=9Even with useacl, subscribe to comments and allow unregistered comments selected I am unable to subscribe to the discussion section of an entry. Any other ideas?
Is it possible to show comments only to logged in users? I have set comments in the way that only logged in users can write comments and write in articles. Currently all comments are visible for any visitor, but I would like to show the comments only to those who are logged in. Is it possible to show comments only to logged in users?
Thank you very much!
Markus
How about prefilled Name, eMailadress and Date? My Users (internal DokuWiki) are complaining that they should Type in there Data every Time they want to discuss. Now they are mostly not use it anymore because of that. All of them have their Data correctly in the Wiki user Data, so all what is needed is to take this existing Data and prefill the Form with it.
2009-02-19 muetze
When they are logged in to the wiki they don't have to type their credentials. — Michael Klier 2009/05/11 11:45
After an entry is saved by a logged-in user the message's attribution line contains only the date and no name. With the form present (no one is logged-in) the name shows up fine. Possible bug? Using latest DokuWiki (2009-02-14)
2009-06-11 ham
After clicking on toolbar “Horizontal Rule” form doing submit. — Mikhail I. Izmestev 2009/05/28
Discussion plugin doesn't work for pages edited locally (UTF-8 encoded), then uploaded. It works though when discussion is enabled on every page through the configuration manager, or when the discussion instruction is typed in the wiki directly. — Beñat Dagorret 2009/05/29
2009-2-14 release: adding a single comment seems to send the wiki off into an infinite loop producing literally hundreds of copies of that comment. Sorry to raise the issue here, but this a serious problem for us. An identical (copy of the) installation on a laptop runs fine (Apache server) but on the main server )IIS goes crazy. Help please!
I add function utf8_encode($s) { return iconv('iso-8859-1', 'utf-8', $s);}
function utf8_decode($s) { return iconv('utf-8', 'iso-8859-1', $s);} and all work
I really love the Discussion plugin, but once the discussion gets long it is hard to navigate.
Is it possible to have stale threads (say threads that have been inactive for more than a certain period of time) moved to an archive section that is accessible by a link? – A. Pascall, 2009-6-29