HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[RESOLVED!] Change order posts are displayed

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#97144 (In Topic #19273)
Avatar

Honoured member

I'd posted this before, but unfortunately the topic went off-subject, so forgive me for the seeming duplication :$

I have users requesting that they would like to be able to change the order that posts appear in a forum.  Currently, the oldest post is listed first, and the newest would be at the bottom of the page.  Specifically, they're asking if that can be inverted, where the newest post is at the top, so they don't have to scroll thru all the old ones to see the latest message (some discussions go on for many pages).

Using "Topics with unread posts" is not the same and is not what they're looking for.  For anyone who is willing and able to assist me in figuring out how and where to change the code in order to do this, I would be most grateful.

I should point out that the site is running 8.1.6

Thanks in advance!

Mark


Last edit: by superiorpyro
Back to the top
 
Posted
Rating:
#97148
Avatar

Community saint

I don't think that is a configurable option, but you should be able to do that with a code change.

Specifically, in \sources\ocf_topicview.php change the two occurrences of:

Code

ORDER BY p_time,p.id
to:

Code

ORDER BY p_time DESC,p.id

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#97150
Avatar

Honoured member

Thank you, you couldn't have made any easier...or work more perfectly!

That's exactly what we were looking for :thumbs::thumbs::thumbs:

I really appreciate the help with this.

Cheers,

Mark
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: