Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Tags for Joomla and JComments Read More link
Pages: [1]   Go Down
  Print  
Author Topic: Tags for Joomla and JComments Read More link  (Read 5018 times)
0 Members and 2 Guests are viewing this topic.
adam.spyboy
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« on: November 10, 2009, 04:19:42 »

Hello,

I started using popular component Tags for Joomla on my JComments powered website. Tag components offers display tagged articles in a blog view but no content plugins (like JComments content plugin displaying Read More links) are processed.

I found possible solution here: http://www.joomlatags.org/forum/view-postlist/forum-4-feature-request/topic-140-content-plugins.html

Copy

components\com_tag\views\tag\tmpl\blog.php

to

\templates\YOUR TEMPLATE\html\com_tag\tag\blog.php

Open it and chage this:

<td valign="top"><?php
$count=$this->pagination->limitstart;
if(isset($this->results)&&!empty($this->results)){
foreach( $this->results as $result ){
$readmore=$params->get('onlyIntro');                   
$readmore=$readmore&&$result->readmore;
//echo($readmore);
if($readmore){
$result=readmore($result,$user);
$result->text=&$result->introtext;
}else{
$result->text=$result->introtext.$result->fulltext;
$result->readmore_link = JRoute::_(ContentHelperRoute::getArticleRoute($result->slug, $result->catslug, $result->sectionid));
}
?>

to

<td valign="top"><?php
$count=$this->pagination->limitstart;
if(isset($this->results)&&!empty($this->results)){
foreach( $this->results as $result ){
$readmore=$params->get('onlyIntro');                   
$readmore=$readmore&&$result->readmore;
//echo($readmore);
if($readmore){
$result=readmore($result,$user);
$result->text=&$result->introtext;
}else{
$result->text=$result->introtext.$result->fulltext;
$result->readmore_link = JRoute::_(ContentHelperRoute::getArticleRoute($result->slug, $result->catslug, $result->sectionid));
}

$dispatcher    =& JDispatcher::getInstance();
$result->params = clone($params);           
JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onPrepareContent', array (& $result, & $result->params, 0));
?>

After doing that, some content plugins get to work but JComments' Read More links are still not being displayed.

Please has anyone solution or at least idea how to resolve this?

Thank you.

Adam
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: November 10, 2009, 04:41:52 »

I think JComments doesn't show because this code in /plugins/content/jcomments.php:

Code: (php)
if (!isset($article->id) || ($option != 'com_content' && $option != 'com_alphacontent')) {
return;
}
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
adam.spyboy
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« Reply #2 on: November 10, 2009, 05:52:26 »

Hello smart,

Thank you. I edited jcomments.php as follows:

Code:
if (!isset($article->id) || ($option != 'com_content' && $option != 'com_alphacontent' && $option != 'com_tag')) {

and

Code:
// disable comments link in 3rd party components (except Events and AlphaContent)

if ($option != 'com_content' && $option != 'com_frontpage'

&& $option != 'com_alphacontent' && $option != 'com_events' && $option != 'com_tag') {

but nothing happened. :-(

Adam
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Tags for Joomla and JComments Read More link
 
Jump to: