Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2009, 12:39 AM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Conditional Help

<if condition="is_member_of($vbulletin->userinfo, 5, 6)">
<font size="1"><div class="info" align="center"><center>$post[field41]<center><br></div></font>
</if>

This displays custom profile field 41 on the postbit_legacy if a user is a super-mod or admin. How can I make it *also* display to the user themself?

thanks!
Reply With Quote
  #2  
Old 12-21-2009, 01:21 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try changing the condition to :

Code:
<if condition="is_member_of($vbulletin->userinfo, 5, 6) OR ($post[userid] == $vbulletin->userinfo[userid])">
Reply With Quote
  #3  
Old 12-21-2009, 01:45 AM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome! ty!
Reply With Quote
  #4  
Old 03-19-2010, 02:25 PM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't seem to be working... any other ideas?
Reply With Quote
  #5  
Old 03-20-2010, 04:20 PM
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Posts: 563
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

(removed.... sorry did not read the entire question... please delete, thanks.)
Reply With Quote
  #6  
Old 03-20-2010, 04:59 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm...maybe try using $bbuserinfo in place of $vbulletin->userinfo?
Reply With Quote
  #7  
Old 03-23-2010, 11:56 AM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That didn't work either
Reply With Quote
  #8  
Old 11-08-2010, 06:23 PM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone else want to give it a shot? The full code is:

I want the tab to show to Admins, Mods, Usergroup 32, *AND* the poster themselves. Everything's working except the original poster can't see the tab.

<!--TAB CONTENT -->
<div id="tab8$post[postid]" class="tabcontent">
<if condition="$post['field57']">
<div style="background-color:#1A1A1A; padding:5px; border: 1px dimgrey solid">
<div class="info"><if condition="$post['field57']">$post[field57]</if></div>
<if condition="is_member_of($bbuserinfo, 5,32) OR $show['moderatethread']">
<font size="1"><div class="info" align="center"><center>$post[field70]<center><br></div></font>
</if>
<div class="info" align="center"><if condition="$post['field51']">
<img src="$post[field51]" width="100" border="1" /><br></if></div>
<div class="info"><if condition="$post['field63']"><br><font size="1"> $post[field63]</font></if></div>
</div>
</if>
</div>
Reply With Quote
  #9  
Old 11-08-2010, 07:01 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, I remember this

Anyway, I just tried this in my postbit_legacy template:

Code:
<if condition="$bbuserinfo[userid] == $post[userid]">
This is my post!!!
</if>
and it worked as expected, so it seems like

Code:
<if condition="is_member_of($bbuserinfo, 5,32) OR $show['moderatethread'] OR $bbuserinfo[userid] == $post[userid]">
should work for you.

(If not, this is really my last try...)
Reply With Quote
  #10  
Old 11-09-2010, 12:23 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use that first part myself kh99, take a look here for some conditionals http://tech6.com/f51/vbulletin-templ...als-list-t112/
Reply With Quote
Reply


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 02:52 PM.


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.08560 seconds
  • Memory Usage 2,254KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete