Stop comments in category description, etc

jsanglier 01 Nov, 2008
This is probably daft, but how do I stop comments on category descriptions and so on?

Commenting is even showing up on my SOBI category descriptions.

I really only want commenting on the articles them selves
GreyHead 01 Nov, 2008
Hi jsanglier,

I think that if you hunt through the forums a little you'll find that Max has posted a fix for this.

Bob
jsanglier 01 Nov, 2008
All I could find is a fix for the news feed

However, at the moment I am still getting comments showing on section and category descriptions, plus the opening description on the SOBI component.

In the preferences I have three of my four sections selected, and nothing else. I have no individual categories selected and no individual articles
jsanglier 01 Nov, 2008
Ooh, getting there!

I added

	if(JRequest::getVar('view') == 'category')return;


As you suggested, then added a further

	if(JRequest::getVar('view') == 'section')return;


To lose the comments on the section descriptions as well.

So, half way there!

Now, SOBI

As you will see here: http://www.sanglier.co.uk/Directory/

I have comments at the end of my header text for the directory component.

Also, if you go to the categories in the directory, they have them too.

I tried to add:

if((JRequest::getVar('option') == 'com_sobi2'))return;


But that didn't do anything.

It strikes me that for general use your script should be set to be used for com_content only, and then enable other components in the configuration. Would be an easier way of doing it.

Meanwhile, any thoughts on my SOBI problem?
Max_admin 02 Nov, 2008
I can't see the nonSEF URLs to check the URL variables, can you turn off SEF a moment and get the nonSEF url to this page ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 02 Nov, 2008
try to disable the running plugins option in SOBI itself, although your line of code above should work, it doesn't, may be SOBI does something strange when handling the plugins, you can look at that piece of code which loads the plugins too, I really have no idea.

do you have cache ? try to free site cache after any change!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Sadowskin 06 Nov, 2008
If you give your the link a class then you can try and hide with css as I have done with JCal Pro event component...
It is not beautiful but it worked for me for now.

OPEN {joomla}/plugins/content/ChronoComments.php

On line# 142 FIND
$language = '<br /><a href="'.$page_link.'#comments">'.JText::_( 'READ N COMMENTS' )."</a>";


REPLACE with
$language = '<br /><a href="'.$page_link.'#comments" class="chronocommentslink">'.JText::_( 'READ N COMMENTS' )."</a>";


SAVE AND CLOSE FILE

OPEN {joomla}/components/com_chronocomments/style.css

ADD
.sobi2CompDesc a.chronocommentslink, .eventdesclarge a.chronocommentslink, .eventdesc a.chronocommentslink, .searchdesc a.chronocommentslink, .contentdescription a.chronocommentslink{
	display: none;
}


SAVE AND CLOSE


OPEN {joomla}/components/com_chronocomments/style-ie6.css

ADD
.sobi2CompDesc a.chronocommentslink, .eventdesclarge a.chronocommentslink, .eventdesc a.chronocommentslink, .searchdesc a.chronocommentslink, .contentdescription a.chronocommentslink{
	display: none;
}


SAVE AND CLOSE
jsanglier 06 Nov, 2008
As you say, not beautiful, but works - thanks!

I think this is something that needs to be looked at overall though.

I suspect that most people only want comments on what they see as the articles as default. There must be a way of doing that in an elegant way.

It would make this good component much better!
Max_admin 06 Nov, 2008
Yes I agree, I will give this more testing and get the issues fixed in the next release, thanks for sharing your code!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.