Tabla de Contenidos
Discussion Plugin
Compatible con DokuWiki
2008-05-05
El hecho de que falte la URL de descarga, significa que esta extensión no se puede instalar mediante el Gestor de Extensiones. Consulta Publicar un plugin en Dokuwiki.org. Se recomienda el uso de hosts de repositorios públicos como GitHub, GitLab o Bitbucket.
La extensión no ha sido actualizada en al menos 2 años. Puede que ya no tenga soporte o no sea mantenida y tenga problemas de compatibilidad.
Esta extensión no está en el espacio de nombres 'complemento' o 'plantilla' y, por lo tanto, se ignora.
Descarga
Descarga | plugin-discussion.tgz |
---|
Descripción
El Plugin Discussion añade una sección discusión después de la página wiki para comentarios de los usuarios. Esto es útil para separar el contenido de la página y la discusión 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.
Componentes
Discussion Comments
~~DISCUSSION~~ ~~DISCUSSION:off~~ ~~DISCUSSION:closed~~
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~~
.
After each comment there may be up to three buttons (depending on your rights):
- Edit: Registered users can edit their comments; admins can edit all comments. To remove a comment, just edit it, clear the text and save the empty comment – like you would do with a wiki page. Attention: If there are replies to a comment, removing it will also remove all replies!
- Reply: To reply to a comment (vs. commenting on the wiki page content), click the
Reply
button. The comment entry form will then be placed accordingly. - Hide / Show: Admins can deactive and reactivate comments easily by this button. Hidden comments aren't shown to normal users and are displayed dimmed to admins.
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.
There is no toolbar. I don't consider this a major drawback, as raw text is usually enough for comments. Advanced users who know the wiki syntax are still free to use it. A toolbar for inexperienced users would be nice, but it's currently not possible to reuse the DokuWiki toolbar or a subset thereof.
Threads
{{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.
Configuration
The plugin can be configured using DokuWikis configuration manager available in the admin menu.
automatic | automatically enables discussions on all pages |
---|---|
allowguests | allow/dissallow 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 |
Demo
You can try this plugin here.
Bugs
Please report bugs at the Bug tracker.
Conversion from old Blog Plugin
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:
- If the name of the discussion namespaces in your wiki was something else than “discussion”, you need to edit line 10 of the script first:
define('DISCUSSION_NS', 'discussion');
. - Run the conversion script by entering the following URL:
http://path.to/dokuwiki/lib/plugins/discussion/convert.php
. - If you have lots of pages, the script will take quite a while. Don't interrupt it.
- After the conversion is done, the script disables itself. If, for any reason, you need to re-run the script, delete the file “convert_completed”.
Further Resources
Changes
- Se ha producido un error mientras se leían los datos de este feed: http://darcs.chimeric.de//darcsweb.cgi?r=discussion;a=rss
FAQ
How do I prevent SPAM?
The plugin has built-in support for the captcha plugin. Additionally, one might also consider to use the Bad Behavior plugin.
My dates are shown wrong. What can I do?
You're probably not running the latest version of the plugin. Try to update to the latest version first.
Is it possible to show the newest entry on top?
Not yet but a feature request has been filed.
Discussion
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
Is there a possibility to show a text like “Only registered user may discuss” when turning allowguest to false ? — Nadir 2008/06/05 06:48
No, you can file a feature request at the bug tracker linked on this page. — Michael Klier 2008/08/09 10:50
I have the newest version from 2008-08-08, bit the date is still not shown.. only “Y/m/d H:i” in the discussionarticle.. what is wrong? Last modified date in footer is shown correctly? — Micha Meyer 2008/08/18
DokuWiki version, pagelist plugin version? Are they all up to date?
I've had the same problem and made a bugfix in the action.php. action.php uses the strftime function which requires an other laout for string formatting (including % signs). The $conf['dformat'] in the wiki settings is used without % signs (standard DokuWiki use). Change the strftime to dat function and it works correctly| Se the following diff:
# diff action.orig action.php 507c507 < strftime($conf['dformat'], $created).'</abbr>'; --- > date($conf['dformat'], $created).'</abbr>'; 509c509 < strftime('%Y-%m-%dT%H:%M:%SZ', $modified).'">'.strftime($conf['dformat'], $modified). --- > strftime('%Y-%m-%dT%H:%M:%SZ', $modified).'">'.date($conf['dformat'], $modified). 879c879 < strftime($conf['dformat'], $comment['date']['created']), --- > date($conf['dformat'], $comment['date']['created']), 900c900 < strftime($conf['dformat'], $comment['date']['created']), --- > date($conf['dformat'], $comment['date']['created']), 1031c1031 < '@DATE@' => strftime($conf['dformat']), --- > '@DATE@' => date($conf['dformat']),
Maybe this can be incorparated to the source??? — Luitzen van Gorkum 2008/09/01 15:29
This works great! Thank you!! — Micha Meyer 2008/09/09
v: 2008-08-08: action.php, line 684. tabindex==“6” should be tabindex=“6”
have only names required for posting a comment
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 & email is the simples 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
solved (quick and dirty)
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>
Can admins subscribe to all discussions?
Looks like the new version has a feature where users can get email notifications of new changes. Can an admin subscribe to all articles and get notifications for any comments sitewide? DLO - 08-31-2008