JComments compatibility

More
14 years 1 week ago #11590 by soyjok
Replied by soyjok on topic JComments compatibility
Hello,
I am no programmer and I'm afraid to touch much code.
I tried but did not fix the problem. Maybe not paste the code in the right place.

Thanks - Eskerrik asko - Gracias
Jok

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #11603 by effrit
Replied by effrit on topic JComments compatibility
soyjok - its template, NOT core )
so it may or even must be touched :)

there are two template in standart distrib of flexi:
default and blog
so try fix item.php in both of them.

be careful

array(1,3,5) - its ID number of real categories with you WANT anable comments

so try make array(999) - if you made it right the comments must disappear (cose you have not category with id 999)

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #11634 by soyjok
Replied by soyjok on topic JComments compatibility
Thanks effrit, it seems that in the end I pasted the correct code and it works.

Another possibility is to turn off the "comments" on each type created within flexicontent from the back-end.
I'm trying that method is more functional, in principle I'd rather skip code, but the buttons to edit each article JComments unusable.
Well, hopefully get a global solution.

Sorry for my English

Thanks - Eskerrik asko - Gracias
Jok

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14581 by kavaXtreme
Replied by kavaXtreme on topic JComments compatibility
This works great (thanks effrit), but does anybody know the code to just have it check the category parameters instead? That would make for an easier long-term solution.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14582 by effrit
Replied by effrit on topic JComments compatibility
i think its possible even for me, but it will cost some performance (additional bd request)
and i think this must be in core instead of template

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14593 by effrit
Replied by effrit on topic JComments compatibility
insert this code instead previous one:
Code:
$db =& JFactory::getDBO(); $sql = "SELECT params FROM #__categories WHERE id = ".$this->item->catid; // get params from current category $db->setQuery( $sql ); $row=$db->loadResult(); $pattern = '/comments=(.*?)\s/'; // get categories parameter "comments" preg_match($pattern, $row, $strr); if($strr[1]=="1"): ?>

the code will work if in params of category in FLEXI set Comments to "JComment"

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.454 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline