xoops forums

dannie

Just popping in
Posted on: 2015/10/26 13:28
dannie
dannie (Show more)
Just popping in
Posts: 36
Since: 2004/2/10
#1

In Publisher Module how can I sort last published articles by date asc instead of date desc?

I am using publisher to post bible verses and I need the last published articles to sort by date asc instead of date desc so that the verses can be read from verse 1 and upwards instead of from verse 235 and backward. Is this possible and where can I make the changes. Thanks in advance.Resized Image

Mamba

Moderator
Posted on: 2015/10/26 21:34
Mamba
Mamba (Show more)
Moderator
Posts: 10944
Since: 2004/4/23
#2

Re: In Publisher Module how can I sort last published articles by date asc instead of date desc?

The easiest way for you would be to set the weight of each article the way you want them to be, and then is Preferences, select "Weight ASC", and you're done.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Bleekk

Theme Designer
Posted on: 2015/10/28 12:44
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 935
Since: 2002/12/14
#3

Re: In Publisher Module how can I sort last published articles by date asc instead of date desc?

Open in a editor "modules/publisher/index.php"

Find
if ($publisher->getConfig('index_display_last_items')) {
    
// creating the Item objects that belong to the selected category
    
switch ($publisher->getConfig('format_order_by')) {
        case 
'title':
            
$sort  'title';
            
$order 'ASC';
            break;

        case 
'date':
            
$sort  'datesub';
            
$order 'DESC';
            break;

        default:
            
$sort  'weight';
            
$order 'ASC';
            break;
    }


Change order in
case 'date':
            
$sort  'datesub';
            
$order 'DESC';
            break;

to ASC

dannie

Just popping in
Posted on: 2015/10/30 10:15
dannie
dannie (Show more)
Just popping in
Posts: 36
Since: 2004/2/10
#4

Re: In Publisher Module how can I sort last published articles by date asc instead of date desc?

Thank you very much. This worked.