PDA

View Full Version : function to check if post is the first post or not...


FlyingDutchman
09-11-2002, 01:43 PM
I need this little bit of code for some hacks I'm working on... but i just can't seem to figure out hor to do this, so I request this piece of code here.
I hope anyone can halp me with this, I just need a function (or a simple if-statement, if there are any variables i dunno of that i can use to do this) to check if a post is the first post in a thread or not.
Big thanks to anyone who can help me out with this problem!

FlyingDutchman

g-force2k2
09-11-2002, 02:15 PM
FlyingDutchman... in the newthread and newreply.php the variable:

$isfirst

will define whether or not the post is the first post... regards... hope that helps...

g-force2k2

FlyingDutchman
09-12-2002, 04:02 AM
yeah, that really helps :D
thanks man! *thumbs up*

FlyingDutchman
09-12-2002, 04:07 AM
what version are you talking about? because I am using 2.2.6, and there's is no '$isfirst' in any vbulletin file?

please help me ;)

Never mind, already found it in editpost.php, just where I needed it! :D :banana:

Logician
09-12-2002, 07:06 AM
logically the post with lowest id in a thread would be the first post either (does not apply to old MYSQL versions), but g-force's solution is much better of course :)

FlyingDutchman
09-12-2002, 12:48 PM
eww, i don't like sql queries much :) and since g-force's solution won't need any extra queries, it's super! :D