PDA

View Full Version : Need Help Simple Query, If Statement


paul41598
05-02-2006, 05:48 PM
I'm trying to do something simple I think. If a user has posts in a specific forum, I want to display some text to the right of their thread that says "hello" (to be changed later) Only on THEIR threads though. So in forumdisplay.php, I have something like this:


if ($threadinfo['postuserid'] == $bbuserinfo['userid'])
{
$jbtest = 'hello';
}



And then the variable $jbtest I have in the threadbit template. Am I missing a query for this to work? Cuz it doesnt work.


In essence what I wanna do is display a text link or graphic (preferrably) next to a users thread, that says "Item Sold?" Then once they click the link, it takes them to the editpost. Does that make sense?

Xenon
05-02-2006, 05:55 PM
instead of $bbuserinfo you should use $vbulletin->userinfo

paul41598
05-02-2006, 05:58 PM
it's for 3.0.7, so I think bbuserinfo is still correct under that source code right?

Xenon
05-02-2006, 06:08 PM
right

next time it would help to mention you are using an old version :)

but it's $thread not $threadinfo :)

paul41598
05-02-2006, 06:17 PM
Sorry, Ok thanks. Anyone else help with whatever I need that would be greatful. Thanks again in advance