Difference between revisions of "How to change ordering after featured listings"

From JReviews Documentation
Jump to: navigation, search
Line 3: Line 3:
 
If you want to change that, edit this file:
 
If you want to change that, edit this file:
 
*<span style="color: blue">/com_jreviews/jreviews/models/everywhere/everywhere_com_content.php</span>
 
*<span style="color: blue">/com_jreviews/jreviews/models/everywhere/everywhere_com_content.php</span>
 +
  
 
Find the code for featured ordering:
 
Find the code for featured ordering:
Line 9: Line 10:
 
     $order = '`Listing.featured` DESC, Listing.created DESC';
 
     $order = '`Listing.featured` DESC, Listing.created DESC';
 
</source>
 
</source>
 +
 +
  
 
And change it to one of the below, depending which ordering after featured listings you want:
 
And change it to one of the below, depending which ordering after featured listings you want:
 +
  
 
'''Ordering by title'''
 
'''Ordering by title'''

Revision as of 09:51, 20 June 2011

When you set the default ordering for list pages to Featured in global configuration, the rest of the listings below featured will be ordered by submission date.

If you want to change that, edit this file:

  • /com_jreviews/jreviews/models/everywhere/everywhere_com_content.php


Find the code for featured ordering:

case 'featured':
    $order = '`Listing.featured` DESC, Listing.created DESC';


And change it to one of the below, depending which ordering after featured listings you want:


Ordering by title

case 'featured':
    $order = '`Listing.featured` DESC, Listing.title ASC';


Ordering by most viewed listings

case 'featured':
    $order = '`Listing.featured` DESC, Listing.hits DESC';


Ordering by highest user rating

case 'featured':
    $order = '`Listing.featured` DESC, Totals.user_rating DESC, Totals.user_rating_count DESC';


Ordering by highest editor rating

case 'featured':
    $order = '`Listing.featured` DESC, Totals.editor_rating DESC, Totals.editor_rating_count DESC';


Ordering by number of reviews

case 'featured':
    $order = '`Listing.featured` DESC, Totals.user_comment_count DESC';