Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 02-16-2010, 06:59 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 View Post
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
Reply With Quote
  #2  
Old 02-17-2010, 07:57 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03209 seconds
  • Memory Usage 2,172KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete