Log in

View Full Version : USer Profile Fields


rogersnm
06-17-2006, 05:40 AM
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, 09: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, 06: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, 08:00 AM
Better use "&&" instead of "==", and no quoting the numeric constants.

rogersnm
06-18-2006, 08:01 AM
so <if condition="$post[fieldx]&&1">?

Marco van Herwaarden
06-18-2006, 09:04 AM
Sorry, my mistake, should be a single &:
<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, 09: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:
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a 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>