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

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Last page first
Pages: [1]   Go Down
  Print  
Author Topic: Last page first  (Read 1481 times)
0 Members and 1 Guest are viewing this topic.
tomaz
Newbie
*

Karma: 0
Offline Offline

Posts: 3


Email
« on: October 01, 2010, 17:45:50 »

Hello!

First I'd like to say, that this is a hell of an extension. Works out of the box and does what it is supposed to do. I have just one question...

Is there a way to set 'most recent last', but to display last page by default instead of the first page?
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: October 01, 2010, 19:19:03 »

Seems you can edit /components/com_jcomments/jcomments.php and replace:
Code: (php)
$this_page = ($config->get('comments_order') == 'DESC') ? 1 : $total_pages;
with
Code: (php)
$this_page = ($config->get('comments_order') == 'DESC') ? $total_pages : 1;

but I haven't tested this modiication.
Logged

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

Karma: 0
Offline Offline

Posts: 3


Email
« Reply #2 on: October 01, 2010, 21:36:09 »

I've tried, but this line of code does not have any effect. It shows allways the first page first.
Logged
tomaz
Newbie
*

Karma: 0
Offline Offline

Posts: 3


Email
« Reply #3 on: October 01, 2010, 21:45:14 »

ok, I had to remove
Code:
$page = max(1, $page);
few lines above.

Now it works. Thanks for help.
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Last page first
 
Jump to: