Buy Now
Sign in

Stop comments in category description, etc

jsanglier , November 01 2008, 15:50
J
jsanglier 6
November 01 2008, 15:50 #16375
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 64
November 01 2008, 16:32 #16378
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
J
jsanglier 6
November 01 2008, 20:41 #16387
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
admin 28
November 01 2008, 23:00 #16391
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
J
jsanglier 6
November 01 2008, 23:38 #16403
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?
admin 28
November 02 2008, 08:49 #16412
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
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
J
admin 28
November 02 2008, 20:35 #16438
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
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
S
Sadowskin 14
November 06 2008, 09:36 #16632
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
J
jsanglier 6
November 06 2008, 10:26 #16635
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!
admin 28
November 06 2008, 11:23 #16646
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
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
J
jsanglier 6
November 06 2008, 11:37 #16653
Nice one Max