Page 1 of 1

Show ALL messages with same tag on ONE page, oldest above.

Posted: Fri Nov 21, 2008 2:58 pm
by rmulders
Hi There.

I'm using the tag plugin and I have the following question.

When I now show all messages with the same tag it only shows 15 messages one one page (just like the main page), starting with the newest message at the top.

What I would like to have is ALL the messages (with the same tag) on one page and start with the oldest at the top.

Who can help me on how to do this? Thank!

Robert

Re: Show ALL messages with same tag on ONE page, oldest abov

Posted: Fri Nov 21, 2008 3:28 pm
by garvinhicking
Hi!

For that you will need to patch the serendipity_event_freetag.php file.

At around line 684 find:

Code: Select all

include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
and add this code before that line:

Code: Select all

$serendipity['fetchLimit'] = 9999;
This will show 9999 entries on a page.

To reorder the listing chronologically inverted, that's actually much more work. For that you would need to create a new event plugin that listens on a special hook and looks if the tagoutput is happening and would change some $eventData for it. That is some advanced stuff for which I sadly currently have no time to write that for you.

Maybe for starters you will be fine with simply showing all tags in the blog-usual order.

Regards,
Garvin

Posted: Fri Nov 21, 2008 4:12 pm
by rmulders
Thanks you for the very quick reply! I applied the changes that you suggested and now have all the all the messages on one page. Perfect!

As for the second request I had (the reversed time order), it sounds difficult. I'll try to look into it.

Thanks again, I really appreciate your help!

Posted: Tue Dec 02, 2008 9:49 am
by rmulders
Hi there,

I hope I'm not oversimplifying, but could the followinf solve my question to change the order of the a tag listing:

Within "serendipity_event_freetag.php" there are some SQL strings, could I not change one of the ORDER BY statements? (something like ORDER BY e2.timestamp ASC?) If so, where in this file should I look?

Again, thanks for your time, I appriciate it.

Posted: Tue Dec 02, 2008 9:59 am
by garvinhicking
Hi!

hm, that might work. Try to find this

Code: Select all

@define('PLUGIN_VARS_DISPLAYTAG', $showtag);
in the file (at around line 945) and add this after that line:

Code: Select all

$eventData['orderby'] = 'e.timestamp ASC';
HTH,
Garvin

Posted: Tue Dec 02, 2008 10:32 am
by rmulders
Wow, that was fast!

Changed it and it works like a charm, thanks very much!
Great support Garvin!