>" under my posts. very nice.but when i click on a link which contains a category of "links", i've got the "Read 0 Comments... >>" at the top of the content?when i click on the link, the page wants me to log in. when i log me in, the link throws me out "404 - Beitrag #0 nicht gefunden!" / not foundive only choose my news for the comments-function. that's all.this problem wasn't in the latest version of chronocomments. i use the 1,57 joomla, sql5. please, please help me😟"> option "show in blog view" - shown in links-category? - Forums

Forums

option "show in blog view" - shown in links-category?

denny 30 Oct, 2008
hi max,

i've got a problem and i can't help myself.
when i choose "show comments link in blog view", i get the "Read 0 Comments... >>" under my posts. very nice.

but when i click on a link which contains a category of "links", i've got the "Read 0 Comments... >>" at the top of the content?


when i click on the link, the page wants me to log in. when i log me in, the link throws me out "404 - Beitrag #0 nicht gefunden!" / not found

ive only choose my news for the comments-function. that's all.

this problem wasn't in the latest version of chronocomments. i use the 1,57 joomla, sql5. please, please help me😟
denny 31 Oct, 2008
good morning,

Have you applied the patch above ? the patch has a code to stop the comments plugin if the page is a newsfeeds component page, please make sure you overwritten the plugins/content/ChronoComments.php file correctly!



i've done it but it doesnt work. could it be that "newsfeed" content is diffrent to a "list of links" from a category? greetz, denny
Max_admin 31 Oct, 2008
Hi denny,

Can I see your page somewhere ? or can you show me the URL for this page even if its not online, starting from index.php?..... , you need nonSEF urls for that!

Cheers
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Max_admin 31 Oct, 2008
Hi denny,

ok, lets open this file:
plugins/content/ChronoComments.php

at the top of it you will find this line:
if((JRequest::getVar('option') == 'com_newsfeeds')||(JRequest::getVar('option') == 'com_contact'))return;


just after it add:
if(JRequest::getVar('view') == 'category')return;


Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
denny 02 Nov, 2008
it works very fine. thank you very much.. absolutely genial,

greetz, denny
onetimedude 30 Dec, 2008

it works very fine. thank you very much.. absolutely genial,

greetz, denny



Cool! I tried the same thing, Denny, but here's what I get: no "Read 0 Comments... >>" links at all! Not above the content, not below the content.

Do you still get "Read 0 Comments... >>" for your links alone and not the category description at the top?
Max_admin 30 Dec, 2008
Hi onetimedude,

please copy and paste the contents of this file here for me to look at, or at least the first 30 lines or so

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
onetimedude 30 Dec, 2008

Hi onetimedude,

please copy and paste the contents of this file here for me to look at, or at least the first 30 lines or so

Regards
Max




Alright, here it is (plugins/content/ChronoComments.php - first 44 lines):
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

$mainframe->registerEvent( 'onPrepareContent', 'plgContentChronocomments' );
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();


function plgContentChronocomments( &$row, &$params, $page=0 )
{
	global $mainframe, $addChronoCommentscripts;
	if((JRequest::getVar('option') == 'com_newsfeeds')||(JRequest::getVar('option') == 'com_contact'))return;
//	if(JRequest::getVar('view') == 'category')return;
	if(JRequest::getVar('view') == 'section')return;
	JPlugin::loadLanguage( 'com_chronocomments' );
	$uri = & JFactory::getURI();
	$configs = JComponentHelper::getParams('com_chronocomments');
	if((JRequest::getVar('print') == '1')&&($configs->get('disable_onprint') == '1'))return;
	$user = JFactory::getUser();
	$session =& JFactory::getSession();
	// first captcha
	if($configs->get('captcha') == '1'){		
		$alphanum  = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789abcdefghijkmnpqrstuvwxyz";
		$rand = substr(str_shuffle($alphanum), 0, 5);
		$session->set("comment_captcha", md5(strtolower($rand)), md5('chrono'));
		$session->set("comment_captcha_orig", $rand, md5('chrono'));
	}
	//pagination
	if($configs->get('enablepagination', '0') == '1'){
		$session->set("pagination_current_start", 0, md5('chrono'));
		$session->set("pagination_next_start", (0 + (int)$configs->get('paginationcount', '10')), md5('chrono'));
		$session->set("pagination_prev_start", (0 - (int)$configs->get('paginationcount', '10')), md5('chrono'));
	}
	JHTML::_('behavior.mootools');		
	
		$js = '<script type="text/javascript">';
		$js .= "var CommentPublished = ".(($configs->get('new_posts_published', '2') == '0') ? 0 : ((($configs->get('new_posts_published', '2') == '1')&&($user->guest)) ? 0 : 1)).";";
		$js .= "\n";
		$js .= "var CommentVerified = ".((($configs->get('new_posts_verified', '0') == '0')|| (($configs->get('new_posts_verified', '0') == '1')&&$user->id)))? 1 : ((($configs->get('new_posts_verified', '0') == '1')&&($user->guest)) ? 0 : 0)).";";


I have some mods done to this file, not PHP related, only HTML.
onetimedude 30 Dec, 2008
Hey Max,

I was looking around and it seems that another user used some code pertaining to a different error (http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=17&t=11718&p=17959#p18052). I don't know what "if $row->id does not exist, cancel executing code from here on" means, but I'm pretty sure you do =)

Here's where to find it:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=17&t=11723#p18018


This successfully gets rid of the comments link in the description of the category - in blog view.
Max_admin 31 Dec, 2008
Thank you for letting me know!πŸ™‚

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.