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&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&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
<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&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&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