Comments (2)
If $conf['allowguests'] is set to false, show message for guests in place of
of the comment form instead of showing nothing. Closed by 7c8e18f
from plugin-discussion.
Thanks for your patch, foosel - I modified it a little further. Now the "you could leave a comment..."-line also shows a login link, and the "Discussion wrapper" is always shown so that the "You could leave a comment..."-Line doesn't appear alone on pages without comments. I hope this patch doesn't break anything.
diff -ru dokufreaks-plugin-discussion-89d0cb9/action.php /usr/local/www/dokuwiki/lib/plugins/discussion/action.php
--- dokufreaks-plugin-discussion-89d0cb9/action.php 2010-07-15 02:52:44.000000000 +0200
+++ /usr/local/www/dokuwiki/lib/plugins/discussion/action.php 2010-08-09 17:30:02.000000000 +0200
@@ -343,7 +343,6 @@
// show discussion wrapper only on certain circumstances
$cnt = count($data['comments']);
$keys = @array_keys($data['comments']);
- if($cnt > 1 || ($cnt == 1 && $data['comments'][$keys[0]]['show'] == 1) || $this->getConf('allowguests') || isset($_SERVER['REMOTE_USER'])) {
$show = true;
// section title
$title = ($data['title'] ? hsc($data['title']) : $this->getLang('discussion'));
@@ -352,7 +351,6 @@
ptln($title, 4);
ptln('', 2);
ptln('
- }
// now display the comments
if (isset($data['comments'])) {
@@ -795,7 +793,11 @@
if (!$_SERVER['REMOTE_USER'] && !$this->getConf('allowguests')) {
?>
<div class="comment_form">
- <?php echo $this->getLang('noguests'); ?>
+ <?php
+ @require_once(DOKU_INC.'inc/template.php');
+ echo $this->getLang('noguests');
+ tpl_actionlink($type="login",$return=false);
+ ?>
</div>
<?php
return false;
diff -ru dokufreaks-plugin-discussion-89d0cb9/lang/de/lang.php /usr/local/www/dokuwiki/lib/plugins/discussion/lang/de/lang.php
--- dokufreaks-plugin-discussion-89d0cb9/lang/de/lang.php 2010-07-15 02:52:44.000000000 +0200
+++ /usr/local/www/dokuwiki/lib/plugins/discussion/lang/de/lang.php 2010-08-09 17:36:26.000000000 +0200
@@ -34,7 +34,7 @@
$lang['wordblock'] = 'Ihr Kommentar wurde als Spam blockiert.';
$lang['mail_newcomment'] = 'Neuer Kommentar';
$lang['subscribe'] = 'Kommentare abonnieren';
-$lang['noguests'] = 'Wenn Sie eingeloggt wären, könnten Sie einen Kommentar hinterlassen.';
+$lang['noguests'] = 'Wenn Sie eingeloggt wären, könnten Sie einen Kommentar hinterlassen: ';
$lang['status'] = 'Status';
$lang['off'] = 'aus';
diff -ru dokufreaks-plugin-discussion-89d0cb9/lang/en/lang.php /usr/local/www/dokuwiki/lib/plugins/discussion/lang/en/lang.php
--- dokufreaks-plugin-discussion-89d0cb9/lang/en/lang.php 2010-07-15 02:52:44.000000000 +0200
+++ /usr/local/www/dokuwiki/lib/plugins/discussion/lang/en/lang.php 2010-08-09 17:36:38.000000000 +0200
@@ -35,7 +35,7 @@
$lang['moderation'] = 'Your comment has been added and awaits moderation.';
$lang['mail_newcomment'] = 'New Comment';
$lang['subscribe'] = 'Subscribe to comments';
-$lang['noguests'] = 'You could leave a comment if you were logged in.';
+$lang['noguests'] = 'You could leave a comment if you were logged in: ';
$lang['status'] = 'Status';
$lang['off'] = 'off';
from plugin-discussion.
Related Issues (20)
- Empty page after saving comment HOT 1
- ($array) must be of type array, null given HOT 3
- Feature request - Button in class `comment_buttons` for "high priority" or in other words "major concern" HOT 1
- wikisyntaxok option and Toolbar
- Discussion is not the last entry in TOC HOT 3
- Configuration setting Automatic wants a Custom Title String option HOT 2
- Text Covering Reply, Edit, Delete buttons HOT 9
- Mention or invite Users in discussion HOT 2
- BUG REPORT: Adding Discussion to page removes option to add media to the page HOT 1
- Feature suggestion : Allowing editong of any field for admins. HOT 3
- discussion list function (threads) not working as expected HOT 2
- Feature Request: Subscribe to all discussions in a namespace recursively HOT 5
- Dokuwiki Igor/Php 8: Error with null for array_keys HOT 2
- publish tags
- Auto hide discussion plugin HOT 4
- Question: Is it possible to get the сid of a new comment from outside? HOT 1
- formposition will not appear above threadsection by using template sprintdoc
- Please add to the settings the ability to specify a list of user names that are prohibited from writing comments.
- deprecated logs HOT 1
- Reply is not shown HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin-discussion.