Previous Thread
Next Thread
Print Thread
Rate Thread
#227332 11/05/2002 12:08 PM
Joined: Nov 2002
Posts: 18
Newbie
Newbie
Offline
Joined: Nov 2002
Posts: 18
How do i reverse the posts within a thread so that it goes from newset to oldest? People have grown VERY accustomed to this from UBB Classic and area already complaining.

In other words, I want the very first post in a thread to appear last, so that the newest replies are always on top. The Dateslip only works to move the most recent threads to the top of the list.

I'd hire someone if i have to; i need to get this done ASAP.

Thanks!

Peace,
Keith

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
welcome keith

that's an unsual request. Can it be done with ubb.classic? I've never tried that

With threads' threaded view taken into consideration, I imagine this will be a difficult task, tho I could be wrong and it might be a 1-line change You might also post this in the 'forhire' forum if you are interested in a developer writing it for you

Last edited by AllenAyres; 11/05/2002 12:39 PM.

- Allen wavey
- What Drives You?
Joined: Nov 2002
Posts: 18
Newbie
Newbie
Offline
Joined: Nov 2002
Posts: 18
Yes, in UBB Classic, it's just a click of a button. Some posts have 50 - 100 replies, and it gets difficult to have to scroll through all the pages to find the latest post when the thread order is NOT reversed, especially if you've been following the thread closely...

I'll try to find the "For Hire" section. Anyone interested in looking into this, please e-mail me; it's important for me to get this done, or i have to switch back to Classic.

Sincerely,
Keith
[][email protected][/]

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Now with threads... even in flat view....
you won't need to scroll.....

Threads always jumps to the first unread post for you in the thread.

I'll look into this tonight though...and see if I can figure it out. Might be beyond me though.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Not sure about Showthreaded view yet....

But if I undersand this correctly... for example in showflat... you want the most recent reply to be at the top of the page.... if there are 5 pages in the thread.... page 5 will contain the initial post? If so, it's very simple in showflat.php.

I'm not sure how this will react with other features (like when it tries to jump to the newest post etc...). You'll have to test it out.

I'll continue to look at showthreaded.php, but that doesn't exactly order by date... <SHRUG>

code:

In showflat.php

Find this:

// -----------------------
// Cycle through the posts
$query = "
SELECT t1.B_Number,t1.B_Username,t1.B_Posted,......
FROM {$config['tbprefix']}Posts AS t1,
{$config['tbprefix']}Users AS t2
WHERE t1.B_Main = '$current'
AND t1.B_PosterId = t2.U_Number
$Viewable
ORDER BY B_Number
$Limit
";


Change to this:

// -----------------------
// Cycle through the posts
$query = "
SELECT t1.B_Number,t1.B_Username,t1.B_Posted,......
FROM {$config['tbprefix']}Posts AS t1,
{$config['tbprefix']}Users AS t2
WHERE t1.B_Main = '$current'
AND t1.B_PosterId = t2.U_Number
$Viewable
ORDER BY B_Number [:"red"]DESC[/]
$Limit
";


[i]Note: I reduced the length of the "SELECT" statement to prevent scrolling here. But it's the only place that says "Cycle through the Posts".

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Threaded view is an animal that just doesn't seem compatible with this type of scheme.

Threaded view is designed to work off of the main post. so it always comes up to the FIRST post in the thread...then list all the replies. But the replies aren't exactly by date to begin with... they are first shown by what exact post they are in reply to.

I was able to easily accomplish the switch in how the replies are sorted... but given the nature of threaded view... reordering the replies really doesn't make sense.

If you want to try it....

code:

in showthreaded.php

Find this:

// --------------------------------------
// Grab all of the replies in this thread
$query = "
SELECT B_Number,B_Parent,B_Posted,B_Username,...
FROM {$config['tbprefix']}Posts
WHERE B_Main=$current
$Viewable
ORDER BY B_Number DESC


Change to this:

// --------------------------------------
// Grab all of the replies in this thread
$query = "
SELECT B_Number,B_Parent,B_Posted,B_Username,....
FROM {$config['tbprefix']}Posts
WHERE B_Main=$current
$Viewable
ORDER BY B_Number [:"red"]ASC[/]




Hopefully that's helpful for you.

My guess... if you are switching from Classic... then the users will most likely enjoy the "flat mode" better anyway.... that works the most logical reversing the sort by date.



If you wanted to get deeper and make it an option... this could be added (with some deeper integration) as an option people could choose from the display preferences in their profile... or a config option.

Otherwise... it *should* work fine.

Joined: Nov 2002
Posts: 18
Newbie
Newbie
Offline
Joined: Nov 2002
Posts: 18
WOW! - It worked like a dream, and it only took adding a single word. You have made about 300 people over at my place VERY happy.

How do i say thanks?

Also, how do i go about inquiring getting this added as a "for hire" option to my threads? - This is something i always wished UBB had an option for...to choose your OWN thread order. This is a serious inquiry.

Sincerely,
Keith

P.S. I also want to find out about what it might cost to get someone to add the subcription service to my ubbthreads...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Great glad it works for ya!

When you say how do you go about getting this added as a "for hire" option....
I think you mean how do you request it to be a standard threads feature?

Infopop does track and log feature requests posted here at InfoPop community.

However, as you've learned... the tweak for that was simple... and thus as you upgrade etc... you'll need to re-add that tweak in each time.

When we talk about "for hire", we have a forum here for people looking for things developed etc... complex modifications or custom scripts. Some of us will install modifications etc.. that you see here if the task seems too complicated for you.

But otherwise, what you see here... including the tweak I posted is a community effort to help make users' boards better... and there's no charge for that.

Glad you've got some happy users on your hands.

Josh

Joined: Nov 2002
Posts: 18
Newbie
Newbie
Offline
Joined: Nov 2002
Posts: 18
Such kindness...i'm not used to that!

I think that what i wanted to do next IS a "for hire" thing:

[]If you wanted to get deeper and make it an option... this could be added (with some deeper integration) as an option people could choose from the display preferences in their profile... or a config option.[/]
Am i correct? If so, do i post that in the "for hire" section or talk with you about it...sorry, a complete newbie am i.

Peace,
Keith


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)