PDA

View Full Version : Last XXX post on a non vb page but with first post instead of last post


Sharg
05-02-2003, 06:49 PM
Hi,
I would like a hack similar to the old and popular "Last XXX post on a non vb page" from tubedog ( https://vborg.vbsupport.ru/showthread.php?s=&threadid=12324&highlight=tubedog ) but instead of looking for the last post of a thread, it should look only for the first post.

This way, when user comment a news ( thread) it doesn't care about the users reply and won't bumb up the title back up.

N!ck
05-02-2003, 09:51 PM
You run an XXX board? ;)

Anyway, just take change ORDER BY lastpost DESC in the SQL query to ORDER BY dateline DESC

Sharg
05-03-2003, 01:15 AM
I edited the config file and the sorting is correct. Problem now is that it stills pulls the date and text from last post instead of first thread post :/..

N!ck
05-03-2003, 03:35 AM
change all instances of lastpost to dateline

Sharg
05-03-2003, 10:21 AM
Thanks for your help . Now everything is good except the message text it still extract from last posts !?

Sharg

Sharg
05-03-2003, 10:54 AM
I think I got it :)

I changed ORDER BY dateline DESC LIMIT to
1 ORDER BY dateline ASC LIMIT 1 and it did it :) .

Thanks for your help.
Sharg

N!ck
05-03-2003, 04:22 PM
Ah, I didn't understand that you wanted to show the very first threads in the forum. But heck, if you're gonna do that, why not just hardcode the links?

If you do decide to stick with that query, you can just remove ASC, as it doesn't do anything really.

Sharg
05-04-2003, 03:38 AM
Hello,
what do you need when you suggest to "hardcode" the links ?

Cordially,
Sharg

N!ck
05-05-2003, 12:40 AM
I mean, just put the HTML right in the template. :) It will remove a query and thereby reduce your server load--slightly.