posts display in reverse order
#1
hello,
i am very pleased so far with myBB installation everything has gone smoothly. i am now trying out ways to get my forum working how i would like it.

an important thing for one of my forums is one of my threads displays posts in reverse order. so that latest posts are displayed at the top of the thread and older posts are pushed down.

is there a way of doing this?
#2
Admin control panel > Manage forums > Edit (the forum you want to apply this to) > Next to "Default Sort Order" select "ascending"
[Image: rss.png]
#3
Jeff Wrote:Admin control panel > Manage forums > Edit (the forum you want to apply this to) > Next to "Default Sort Order" select "ascending"

thanks jeff
i have tried doing what you say and selected "sort order" "ascending" but that changes only the order of the threads and not the order of posts in the thread. i would like to be able to acheive the opposite and have the threads remain in the same order but have the posts/replies in a thread in the reverse/ascending order.

any idea how to do this?

i am not making a torrent forum but i would like a similar layout as most torrent boards use, where the latest post stay at the top of the thread.
#4
Sorry, I didn't read your post carefully. To compensate for that Toungue, I've created a plugin that'll do the trick for ya.

It overwrites the existing MyBB query where it calls out threads chronologically. This plugin does reverse chronological order. I made it so the first post of the thread remains at top, though.


Attached Files
.php   showthread_reverse.php (Size: 1.52 KB / Downloads: 187)
[Image: rss.png]
#5
hey thats great! i think there may be something wrong though, when i activate this plug-in it turns my opening post pink. but it does what i want to do and my posts are reversed. i think it is good that the opening post stays at the top too. that is useful.

would there be a way to apply this to just one thread. as i assume it is a global modification at present.

thanks for all your help
#6
;o it shouldn't turn anything pink..

Anyways, the new file only applies to a single thread. open it up and find the number 20. Replace it with whatever thread's id you only want to apply this reverse order to.


Attached Files
.php   showthread_reverse.php (Size: 1.65 KB / Downloads: 137)
[Image: rss.png]
#7
that works great! i still get pink opening post but i think that might be to do with my theme settings for sticky posts.

so the first plug-in is a global mod and the second plug-in is a thread specific mod?

would i be able to add more than one thread id to this?

thanks jeff
#8
Here it is.. This one combines everything by using a setting.. So in the setting box, set 0 if you want global. Set a tid if you only want a thread. Set multiple tids (separated by commas) if you want certain threads.


Attached Files
.php   showthreadreverse.php (Size: 3 KB / Downloads: 282)
[Image: rss.png]
#9
When I try to activate your plugin I receive this error message:

Fatal error: Call to undefined function rebuild_settings() in forum/inc/plugins/showthreadreverse.php on line 53

It'a about
	rebuild_settings();
line which is not defined (in function showthreadreverse_deactivate() and function showthreadreverse_activate())?
Sad
From January 08, 2013:
MyBB Romania - MyBB Community Forums from Romania
#10
Haven't looked at anything, but try removing the "_", ie:
    rebuildsettings();


Forum Jump:


Users browsing this thread: 1 Guest(s)