vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Picking up the threadid within the postbit template? (https://vborg.vbsupport.ru/showthread.php?t=236002)

Simon Lloyd 02-16-2010 06:59 AM

Picking up the threadid within the postbit template?
 
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?
HTML Code:

<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?
HTML Code:

<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/showt...stbit-template but no response.

--------------- Added [DATE]1266318923[/DATE] at [TIME]1266318923[/TIME] ---------------

Quote:

Originally Posted by Simon Lloyd (Post 1927385)
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?
HTML Code:

<div><if condition="$threadinfo['postuserid'] == $bbuserinfo['userid']">

I've solved this bit with trial and error with this
HTML Code:

<if condition="$thread['postuserid'] == $post['userid']">
Just need the rest sorting please :)

--------------- Added [DATE]1266320289[/DATE] at [TIME]1266320289[/TIME] ---------------

Sorted the clickable image problem with this
HTML Code:

<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 [DATE]1266320858[/DATE] at [TIME]1266320858[/TIME] ---------------

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:
Quote:

Originally Posted by Originally Posted by Simon Lloyd
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?
HTML Code:

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

<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 [DATE]1266403126[/DATE] at [TIME]1266403126[/TIME] ---------------

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
HTML Code:

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


All times are GMT. The time now is 06:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04158 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete