Forums

Default Expanded Comments/Threads

Max_admin 11 Feb, 2009
Hi, this depends on the page type you are viewing, this is an article page and so all comments will be expanded, how does your page look like ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
av1 11 Feb, 2009
It is a section blog layout in the rhuk_milkyway included template in Joomla - I have adjusted the included layout to have a given article fully displayed on the entire page - there is nothing below the article (but i have some right-aligned mods). I would like the comments to default as expanded underneath the article. Thanks!
Max_admin 11 Feb, 2009
Hi av1,

The comments will NOT expand in a blog page, if this is necessary then you can just hack the plugin file under plugins/content/chronocomments.php

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
av1 12 Feb, 2009
Is there a major change for this? I am not a programmer, but it looks like what you say might be done within the section below - any quick hints? thanks.
if(JRequest::getVar('view') == 'article'){
			$row->text = $row->text.str_replace("{ALL_COMMENTS}", $comment_items, $comment_form);
			//return true;
		}else{
			if($configs->get('showblogview') == '1'){
				$query = "SELECT * FROM #__chrono_comments WHERE component = '".JRequest::getVar('option')."' AND pageid= '".$pageid."' AND published='1' AND verify='1' ORDER BY datetime ASC";
				$database->setQuery( $query );
				$blogcomments = $database->loadObjectList();
				//Get Clean Joomla content item link
				$query = 'SELECT a.*,' .
				' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,'.
				' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug'.
				' FROM #__content AS a' .
				' LEFT JOIN #__content_frontpage AS f ON f.content_id = a.id' .
				' INNER JOIN #__categories AS cc ON cc.id = a.catid' .
				' INNER JOIN #__sections AS s ON s.id = a.sectionid' .
				' WHERE a.id='.$row->id;
				$database->setQuery( $query );
				$article = $database->loadObject();
				$page_link = JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $article->sectionid));
				//end link
				$language = '<br /><a href="'.$page_link.'#comments">'.JText::_( 'READ N COMMENTS' )."</a>";
				$row->text = $row->text.str_replace("{n}", count($blogcomments), $language);
				//return true;

			}

		}

	}

}
Max_admin 12 Feb, 2009
Hi av1,

not a major change, replace all code after the first }else{ with
$row->text = $row->text.str_replace("{ALL_COMMENTS}", $comment_items, $comment_form);
but leave the last few }

Cheers
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.