Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
I keep a Web Log in one of my forums and I keep it so that others may reply. However, when they reply to a log entry it puts that post back at the top of the page. I only want new posts to be at the top of the page. Not just any post with a new reply.

Can this be done?

Thanks.

Sponsored Links
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I ran into the same problem when I was scripting my index page. Take a look at the query that you use to pull those log entries. There should be a line almost at the end of the query that starts with the word ORDER. Change that entire line to this:

Code
 ORDER BY t1.B_Posted DESC 


That will order the results of the query from the first main post to the last main post (replies won't change the order). You probably have this, or something like it, in your query now:

Code
 ORDER BY t1.B_Last_Post DESC 


and every time someone replies to the first post in a thread your log gets out of order...

Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
Isn't that query done in the Postlist.php and if i change that won't that affect all forums?

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Sorry, I thought you were running a special script for your log. Yes, changing the query would effect all of your other forums.

You could add a condition in your postlist.php script that checks to see if you are viewing your log forum, and if so change the sort order...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
If you want to turn dateslip off in one forum only.... near the top of the postlist.php script (after the get_input functions) I think you can do something like this:

if ($Board == "keyword") {
$config['dateslip'] = 0;
}


Substitute the board's keyword above. I think that'll override it.

Sponsored Links
Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
Ah, well that's an area i'm not good at yet. I am slowly learning PHP coding but I am not proficient enough to make my own scripts. Just good enough to analyze and break down other ones.

Thanks.

Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
Josh, Awesome that worked! The few posts that were pushed to the top that has some replies to them I had to just go in and modify the B_LAST_POST to be the same date as the B_POSTED. I think that's just because they were modified before I added that hack. New replies now don't affect the order of posts anymore

You da man!

Thanks.

Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
Being able to turn on and off date slipping per forum instead of just site-wide would be a great addition to UBBT 6.5

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
[]JoshPet said:
If you want to turn dateslip off in one forum only.... near the top of the postlist.php script (after the get_input functions) I think you can do something like this:

if ($Board == "keyword") {
$config['dateslip'] = 0;
}


Substitute the board's keyword above. I think that'll override it. [/]

-you made it easy


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
isaac
isaac
California
Posts: 1,157
Joined: July 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)