Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: How to hide comments from unregistered users?
Pages: [1]   Go Down
  Print  
Author Topic: How to hide comments from unregistered users?  (Read 1617 times)
0 Members and 2 Guests are viewing this topic.
Ginza
Newbie
*

Karma: 0
Offline Offline

Posts: 27


« on: October 09, 2011, 15:31:00 »

I don't want guest to view or post comments for my site. I am able to hide the posting form from guests, but I also wanted guest not to be able to view the comments unless they login.

Any help? I am not sure whether this questions have been asked. Search the forum already couldnt fine one.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: October 10, 2011, 14:56:44 »

You can setup access level for Content - JComments plugin to Registered
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Ginza
Newbie
*

Karma: 0
Offline Offline

Posts: 27


« Reply #2 on: October 10, 2011, 16:43:41 »

Thank you.

Is there a way to make a note that would say something like "You need login to view or make a comment".
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: October 10, 2011, 17:14:33 »

I think no, because in this case plugin will be not loaded... But we can go by another way... It is not fully correct (because it will make SQL-query to get comments list but will not show it for guests).

1. Open /components/com_jcomments/tpl/default/tpl_index.php
2. Find code:
Code: (php)
$comments = $this->getVar('comments-list', '');
and add after:
Code: (php)
$user = JFactory::getUser();
if (!$user->id) {
$comments = '<div class="comments-list" id="comments-list-0">'. JText::_('You need login to view or make a comment') .'</div>';
}
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Ginza
Newbie
*

Karma: 0
Offline Offline

Posts: 27


« Reply #4 on: October 10, 2011, 17:23:21 »

thanks let me try
Logged
Ginza
Newbie
*

Karma: 0
Offline Offline

Posts: 27


« Reply #5 on: October 10, 2011, 17:34:21 »

Not working. I check it as guest.. no message appeared.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #6 on: October 10, 2011, 17:35:14 »

Not working. I check it as guest.. no message appeared.
Do you revert access level setting for Content - JComments? If this plugin will available for Registered only it could not show the message.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Ginza
Newbie
*

Karma: 0
Offline Offline

Posts: 27


« Reply #7 on: October 10, 2011, 17:38:58 »

Oh no. There you go  Grin

Thanks again.
Logged
Ethan
Newbie
*

Karma: 0
Offline Offline

Posts: 2


Email
« Reply #8 on: December 26, 2011, 16:25:09 »

Well, for some time I too was considering to limit the comments view of my forum to just registered users which would prevent guests from seeing and posting comments. The easiest solution is to setup your content access level to ‘registered’. This way the guest users and spammers won’t trouble you.I am looking for some solutions for outlook pst recovery any help?
« Last Edit: January 03, 2012, 22:10:44 by Ethan » Logged

"Happy New year 2012"
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: How to hide comments from unregistered users?
 
Jump to: