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: Integration with news show pro gk1
Pages: [1]   Go Down
  Print  
Author Topic: Integration with news show pro gk1  (Read 4242 times)
0 Members and 1 Guest are viewing this topic.
lasombra
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« on: November 24, 2009, 17:20:50 »

Hi! I use news show pro gk1 mod on my website. I want to integrate jcomments in news show mod. How can I do that?

Sorry for my english.

Thanks!!  Wink
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #1 on: November 24, 2009, 17:28:59 »

I can't make any suggestion because I haven't this module and haven't time to make such integration. Sorry...

I think you could ask about this module's author to add JComments support. All nessesary documentation with technical details can be found on our site.
Logged

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

Karma: 0
Offline Offline

Posts: 6


« Reply #2 on: March 09, 2010, 01:47:04 »

For integration with news show pro gk1

Open modules/mod_news_pro_gk1/tmpl/layoutparts.php

Change line (around 427) to
Code:
//
global $mainframe;
$comments = JPATH_BASE . DS . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php';   if (file_exists($comments)) {    require_once($comments);
        $count =  JComments::getCommentsCount($news_id, 'com_content');
$news_info .= '<a class="gk_npro_intro_comments" href="'.JRoute::_(ContentHelperRoute::getArticleRoute($news_id,$news_cid, $news_sid)).'#comments" '.$attributes.'>'.JText::_('COMMENTS').' ('.  $count . ')</a>';}
}

Be sure to use $news_id!!
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #3 on: March 09, 2010, 23:14:38 »

Wil, note that this method will produce as many database queries as you have news in module. So if your module displays 10 news you will have 10 additional queries for displaying comments count.
Logged

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

Karma: 0
Offline Offline

Posts: 6


« Reply #4 on: March 10, 2010, 03:06:52 »

Okay thanks for your fast response
« Last Edit: March 10, 2010, 12:45:57 by Wil » Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #5 on: March 10, 2010, 15:46:04 »

Sorry but I've no time for it... In my point of view more correct way - to ask this module author to add built-in JComments support.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Integration with news show pro gk1
 
Jump to: