PDA

View Full Version : Picking up the threadid within the postbit template?


Simon Lloyd
02-16-2010, 06:59 AM
Hi all i am trying to show a button in every post within a thread that belongs to the OP, thats my first problem with the IF condition, anyone know how to correct the if condition to only show to the thread starter?

<div><if condition="$threadinfo['postuserid'] == $bbuserinfo['userid']">the code below (along with that above) places the button in my desired place and if hovered you can read the url but the url looks like this http://www.thecodecage.com/forumz/so...=marksolved&t= as you can see the threadid is missing how do i solve that?

<img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_marksolved]" /> <a href="solved.php?$session[sessionurl]do=marksolved&amp;t=$threadinfo[threadid]">$vbphrase[solvedthread_marksolved]</a></if></div>And lastly i must have something screwed up in the code as only the $vbphrase is clickable but i want the image clickable too.

Any help would be much appreciated :)

Also posted yesterday at http://www.vbulletin.com/forum/showthread.php?341676-Picking-up-the-threadid-within-the-postbit-template but no response.

--------------- Added 1266318923 at 1266318923 ---------------

Hi all i am trying to show a button in every post within a thread that belongs to the OP, thats my first problem with the IF condition, anyone know how to correct the if condition to only show to the thread starter?<div><if condition="$threadinfo['postuserid'] == $bbuserinfo['userid']">I've solved this bit with trial and error with this<if condition="$thread['postuserid'] == $post['userid']">
Just need the rest sorting please :)

--------------- Added 1266320289 at 1266320289 ---------------

Sorted the clickable image problem with this<a href="solved.php?$session[sessionurl]do=marksolved&amp;t=$threadinfo[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_marksolved]" /><strong> $vbphrase[solvedthread_marksolved]</strong></a>All i need now is to workout how to get the threadid.

--------------- Added 1266320858 at 1266320858 ---------------

Solved this, instead of using $threadinfo i just used $thread

Simon Lloyd
02-17-2010, 07:57 AM
it seems that i didn't sort this:

Hi all i am trying to show a button in every post within a thread that belongs to the OP, thats my first problem with the IF condition, anyone know how to correct the if condition to only show to the thread starter?

<div><if condition="$threadinfo['postuserid'] == $bbuserinfo['userid']">I've solved this bit with trial and error with this

<if condition="$thread['postuserid'] == $post['userid']">I have everything right up to the above, the icon appears and is clickable, it has the threadid, and the button shows in every post of the thread starter in that thread, however everyone can see it and use it, i need it only to be visible to the thread starter, can anyone help?

--------------- Added 1266403126 at 1266403126 ---------------

I think i have it licked now, with much trial and error as i really don't know what im doing i wrapped all my code in this IF statement

<if condition="$thread['postuserid']== $bbuserinfo['userid']">so now it only shows to the thread starter