×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: hide comments from unregistered users

hide comments from unregistered users 15 years 4 weeks ago #3305

  • Sérgio
  • Sérgio's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Hi
sorry my english
I wishh hide the comments from unregistered users

hide comments from unregistered users 15 years 2 weeks ago #3473

  • Sérgio
  • Sérgio's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
hi again
any news??

hide comments from unregistered users 15 years 2 weeks ago #3476

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You proposal was added to the wish, but we are currently not implementing any user wishes. Priority is joomlacomment 4.0 joomla 1.5 native.

However I have a quick and dirty solution for you.

go to plugins/content/joscomment.php

goto the funciton pluginJosComment.
function pluginJosComment($published, &$row, &$params, $page = 0)
{
	if (!$published) return true;
 
	global $option;
	require(JPATH_SITE."/administrator/components/com_comment/plugin/com_content/josc_com_content.php");
}
function pluginJosComment($published, &$row, &$params, $page = 0)
{
	if (!$published) return true;
    $usertype = JFactory::getUser()->usertype;
 
    if($usertype) {
        global $option;
        require(JPATH_SITE."/administrator/components/com_comment/plugin/com_content/josc_com_content.php");
    }
 
}

This will hide the comments from unregistered users and nobody will even know that there is a comment software until the user log in.

Nicer solution would be to show a text - log in to see comments, but this demands bigger code changes.

hide comments from unregistered users 15 years 2 weeks ago #3478

  • Sérgio
  • Sérgio's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
hi
Thanks for the reply
I got this error

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/cebolan/public_html/mambots/content/joscomment.php on line 121

Can you help-me?

this is my code:
function pluginJosComment($published, &$row, &$params, $page = 0)
 
{    
 
	if (!$published) return true;
 
 
 
	global $option, $mosConfig_absolute_path;
 
	require("$mosConfig_absolute_path/administrator/components/com_comment/plugin/com_content/josc_com_content.php");
 
}

hide comments from unregistered users 15 years 2 weeks ago #3479

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Oh no! Are you using joomla 1.0 ?
The code above is only for joomla 1.5

hide comments from unregistered users 15 years 2 weeks ago #3480

  • Sérgio
  • Sérgio's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
yes is joomla 1.0

can you help me in joomla 1.0?

thanks:)

hide comments from unregistered users 15 years 2 weeks ago #3481

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I've never programmed for joomla 1.0 :)

Try this
function pluginJosComment($published, &$row, &$params, $page = 0)
 
{    
 
if (!$published) return true;
 
 
 
global $option, $mosConfig_absolute_path, $my;
if($my->usertype) {
require("$mosConfig_absolute_path/administrator/components/com_comment/plugin/com_content/josc_com_content.php");
}
}
 

hide comments from unregistered users 15 years 2 weeks ago #3482

  • Sérgio
  • Sérgio's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
:cheer: great, thanks a lot. it works
News im my website

hide comments from unregistered users 15 years 2 weeks ago #3483

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Cool :)
Please keep in mind that all future versions of joomla comment are going to be 1.5 native only. We will not longer support joomla 1.0
  • Page:
  • 1
Time to create page: 0.135 seconds