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

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: Tree or no Tree
Pages: [1]   Go Down
  Print  
Author Topic: Tree or no Tree  (Read 1299 times)
0 Members and 1 Guest are viewing this topic.
TomChuck
Newbie
*

Karma: 0
Offline Offline

Posts: 3


Email
« on: August 23, 2010, 12:15:35 »

I've installed JCommets and it works great. But I want the new post to appear first and for people to be able to comment on them. If I choose "tree" they go last and if I don't you can't comment on them. Is there no way around this? Did I hit a wall here? This doesn't seem very practical.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: August 24, 2010, 18:31:47 »

Sorry I'm not sure that I've right understand you. Do you want to reverse comments order for tree layout?
Logged

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

Karma: 0
Offline Offline

Posts: 3


Email
« Reply #2 on: August 25, 2010, 12:11:32 »

Yeah. Exactly
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: August 25, 2010, 13:37:40 »

1. Open /components/com_jcomments/model/jcomments.php
2. Replace code:
Code: (php)
$options['orderBy'] = ($config->get('template_view') == 'tree') ? 'c.parent, c.date ASC' : ('c.date ' . $config->get('comments_order'));
with
Code: (php)
$options['orderBy'] = ($config->get('template_view') == 'tree') ? 'c.parent, c.date DESC' : ('c.date ' . $config->get('comments_order'));
Logged

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

Karma: 0
Offline Offline

Posts: 3


Email
« Reply #4 on: August 25, 2010, 19:32:39 »

Thank you for the Help. It worked perfect!
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: Tree or no Tree
 
Jump to: