vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   USer Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=118863)

rogersnm 06-17-2006 04:40 AM

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.

Christine 06-17-2006 08:40 PM

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.

rogersnm 06-18-2006 05:27 AM

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'">

Marco van Herwaarden 06-18-2006 07:00 AM

Better use "&&" instead of "==", and no quoting the numeric constants.

rogersnm 06-18-2006 07:01 AM

so <if condition="$post[fieldx]&&1">?

Marco van Herwaarden 06-18-2006 08:04 AM

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>


rogersnm 06-18-2006 08:41 AM

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> 



All times are GMT. The time now is 11:49 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.03250 seconds
  • Memory Usage 1,782KB
  • 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
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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