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: JComments 2.3.0 + News Gavick Pro GK4
Pages: [1]   Go Down
  Print  
Author Topic: JComments 2.3.0 + News Gavick Pro GK4  (Read 2332 times)
0 Members and 1 Guest are viewing this topic.
serpent
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« on: November 09, 2012, 16:15:17 »

Jus to avoid confusion i have Joomla 1.7 with JComments 2.3.0 and News Gavick Pro GK4 (mod_news_pro_gk4_for_responsive_templates). I assume this will work on Joomla 2.5 and same Gavick module...
So I managed to integrate jcomments in gavick module to display comment count within 'Information; or 'Second information' using %COMMENTS string.

Here is how:

Open: ../modules/mod_news_pro_gk4/tmpl/layout.parts.php

################ Step 1 ####################
Find:

Code:
function info($config, $news_catname, $news_cid, $news_author, $news_author_email, $news_date, $news_hits, $news_id, $rating_count, $rating_sum, $num = 1) {

Add after:

Code:
//Jcomments
$app = JFactory::getApplication();
$comments = $app->getCfg('absolute_path') . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once($comments);
$jccount = JComments::getCommentsCount($news_id, 'com_content');
}
//end of Jcomments


################ Step 2 ####################


Find:

Code:
$news_info = str_replace('%RATE', $info_rate, $news_info);

Add after:

Code:
$komentar = 'Comments ('. $jccount . ')';
$news_info = str_replace('%COMMENTS',$komentar, $news_info);

################ Done ####################

Say thx if I helped xD
Logged
Heart
Newbie
*

Karma: 0
Offline Offline

Posts: 7


« Reply #1 on: November 12, 2012, 15:25:09 »

Quote
Say thx if I helped xD

Thanks  Wink Cheesy
Logged
ojuniour
Newbie
*

Karma: 0
Offline Offline

Posts: 3


Email
« Reply #2 on: January 27, 2013, 15:50:36 »

And for those that are using K2 + Jcomments + New Pro GK4 , and having problems with comment counts
Here is a link to the post I posted abou the solution:
http://www.joomlatune.com/forum/index.php/topic,4014.msg20105.html#msg20105

Thanks serpent, without you I won't have figured this one out too..  Grin
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: JComments 2.3.0 + News Gavick Pro GK4
 
Jump to: