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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2006, 05:40 AM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default USer Profile Fields

On my Options page i have a group of check boxes for field8. I know if i did it seperately i could just put <if condition="$post[field5]"> $post[field5] </if> but how do i get the value of each check box inside field8?

Regards,
Nick.
Reply With Quote
  #2  
Old 06-17-2006, 09:40 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Rogersnm,

If I am understanding you, this is not unlike the optional thread preview mod.

Take a look at this and see if it helps you:

https://vborg.vbsupport.ru/showthread.php?t=83225

If I misunderstood, please clarify what you are looking to accomplish.
Reply With Quote
  #3  
Old 06-18-2006, 06:27 AM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I mean. I have just made field 8 and i made it a multi-option checkboxes. It has 8 checkboxes so i wanted to know what the if would be to use them eg. would it be:
Option 1:<if condition="$post[fieldx]=='1'">
Option 2:<if condition="$post[fieldx]=='2'">
Option 3:<if condition="$post[fieldx]=='4'">
Option 4:<if condition="$post[fieldx]=='8'">
Option 5:<if condition="$post[fieldx]=='16'">
Option 6:<if condition="$post[fieldx]=='32'">
Option 7:<if condition="$post[fieldx]=='64'">
Option 8:<if condition="$post[fieldx]=='128'">
Reply With Quote
  #4  
Old 06-18-2006, 08:00 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Better use "&&" instead of "==", and no quoting the numeric constants.
Reply With Quote
  #5  
Old 06-18-2006, 08:01 AM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so <if condition="$post[fieldx]&&1">?
Reply With Quote
  #6  
Old 06-18-2006, 09:04 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, my mistake, should be a single &:
HTML Code:
<if condition="$post[field5] & 1">Option 1 selected<else />Option 1 not selected</if>
<if condition="$post[field5] & 2">Option 2 selected<else />Option 2 not selected</if>
<if condition="$post[field5] & 4">Option 3 selected<else />Option 3 not selected</if>
Reply With Quote
  #7  
Old 06-18-2006, 09:41 AM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, so i have that around the user info in the postbit but it only does it for my user, eg. in the postbit of one of my posts it just has my username. For everyone else posts it has all there info. Any ideas?

ps. this is a bit of my postbit:
PHP Code:
            <div id="postmenu_$post[postid]">
                <if 
condition="$show['profile']">
                <
class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                <
script type="text/javascript"vbmenu_register("postmenu_$post[postid]"true); </script>
                <else />
                
$post[musername]
                </if>
            </
div>
<if 
condition="$post[field8] & 1">
            <if 
condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
            <if 
condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
</if>
        
            <if 
condition="$show['avatar']">
                <
div class="smallfont">
                    &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                </
div>
            </if>
            <
div class="smallfont">
                &
nbsp;<br />
                <if 
condition="$post[field8] & 2"><if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if></if>
                <if 
condition="$post[field8] & 4"><if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if></if>
                <if 
condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
                <
div><if condition="$post[field8] & 8">
                    
$vbphrase[posts]: $post[posts]</if>
<!-- 
Start Post Thank You Hack -->
<if 
condition="$post[userid]"><if condition="$post[field8] & 16">
<
br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]</if>
<if 
condition="$post[field8] & 32"><br />
<if 
condition="$post[post_thanks_thanked_times_on] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if 
condition="$post[post_thanks_thanked_posts_on] == 1">
<
phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<
phrase 1="$post[post_thanks_thanked_times]2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
</if>
<!-- 
End Post Thank You Hack -->
                </
div>
                <if 
condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
                <if 
condition="$post[field8] & 64"><if condition="$show['reputation']"><div><if condition="$show['reppower']"><span id="reppower_$post[postid]_$post[userid]">$vbphrase[reppower]</span>: $post[reppower]</if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if></if>
                <if 
condition="$post[field8] & 128"><div>$post[icqicon$post[aimicon$post[msnicon$post[yahooicon$post[skypeicon]</div>
            </
div></if> 
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 05:15 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.03998 seconds
  • Memory Usage 2,283KB
  • 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
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete