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 05-01-2006, 06:23 AM
Connector Connector is offline
 
Join Date: Dec 2005
Location: Spain
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Questions why this happen when i adding a new Profile Field ?

Hello

I have add many Profile Field .. just when i add one called "I am here for: " i get some problem when try to select one of the options is avalible


Here is the info of the profile Field

==============
I am here for: -- Multiple-Selection Menu

-Serious Relationships
-Friends
-Networking
-Dating

==============

and in the template memberinfo i add this

Quote:
<if condition="$userinfo[field15]">
<TD width="133" valign="top" class="alt1"><strong>I am here for:</strong></TD>
<TD width="205" valign="top" class="alt1">$post[field15]</if></TD>
</tr>
<tr>
know if i try to go to edit profile and i select any one this options it give me a number if i select more it give me diffrents number .. such "15,9,1" etc.. it should show me the "Serious Relationships " etc.. not a number..

any idea why this happen ?

Thankyou
Reply With Quote
  #2  
Old 05-01-2006, 06:36 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instead of:

Code:
<if condition="$userinfo[field15]">
Try:

Code:
<if condition="$show['field15']">

or 

<if condition="$post['field15']">
Also, if the <if> tag is on the outside of the <td> tags keep the closing </if> tag outside the <td> tags to maintain consistency.
Reply With Quote
  #3  
Old 05-01-2006, 06:51 AM
Connector Connector is offline
 
Join Date: Dec 2005
Location: Spain
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i try the above code and it dont show me at all the profile field .

i have created many of them and all is working just fine just this one here is the example of the code i have

HTML Code:
<TABLE align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="348"> 
<TR> 
<TD class="thead" COLSPAN=2 width="342">$userinfo[username]'s Details</TD> 
</TR> 
<tr>
<if condition="$userinfo[field20]"> 
<TD width="133" valign="top" class="alt1"><strong>Real Name:</strong></TD> 
<TD width="205" valign="top" class="alt1">$post[field20]</if></TD> 
</tr>
<tr>
<if condition="$userinfo[field8]"> 
<TD width="133" valign="top" class="alt1"><strong>Gender:</strong></TD> 
<TD width="205" valign="top" class="alt1">$post[field8]</if></TD> 
</tr>
<tr>
<if condition="$userinfo[field11]"> 
<TD width="133" valign="top" class="alt1"><strong>Home Country:</strong></TD> 
<TD width="205" valign="top" class="alt1">$post[field11]</if></TD> 
</tr>
<tr>
<if condition="$userinfo[field16]"> 
<TD width="133" valign="top" class="alt1"><strong>Ethnicity:</strong></TD> 
<TD width="205" valign="top" class="alt1">$post[field16]</if></TD> 
</tr>
<tr>
<if condition="$userinfo[field17]"> 
<TD width="133" valign="top" class="alt1"><strong>Marital Status:</strong></TD> 
<TD width="205" valign="top" class="alt1">$post[field17]</if></TD> 
</tr>
<tr>
<if condition="$userinfo[field15]"> 
<TD width="133"  valign="top" class="alt1"><strong>I am here for:</strong></TD>
<TD width="205" valign="top" class="alt1">$post[field15]</if></TD>
</tr>
<tr>
<if condition="$userinfo[field29]"> 
  <TD width="133" valign="top" class="alt1"><strong>Orientation:</strong></TD>
  <TD width="205" valign="top" class="alt1">$post[field29]</if></TD>
</tr>
<tr>
<if condition="$userinfo[field2]">   
<TD width="133" valign="top" class="alt1"><strong>Hometown:</strong></TD>
  <TD width="205" valign="top" class="alt1">$post[field2]</if></TD>
</tr>
<tr>
<if condition="$show['zodiacsign']">   
<TD width="133" valign="top" class="alt1"><strong>Zodiac Sign:</strong></TD>
  <TD width="205" valign="top" class="alt1">$zodiacsign</if></TD>
</tr>
<tr>
<if condition="$userinfo[field30]">   
<TD width="133" valign="top" class="alt1"><strong>Smoke / Drink:</strong></TD>
  <TD width="205" valign="top" class="alt1">$post[field30] / $post[field31]</if></TD>
</tr>
<tr>
<if condition="$userinfo[field18]">   
<TD width="133" valign="top" class="alt1"><strong>Education:</strong></TD>
  <TD width="205" valign="top" class="alt1">$post[field18]</if></TD>
</tr>
<tr>
</TABLE> 
see all of them work fine just the I'm here for :

Hopefully there is away to fix it ..

Thankyou
Reply With Quote
  #4  
Old 05-01-2006, 07:20 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may find the answer in this thread posted by Steve Machol (post #2 and #3).
Reply With Quote
  #5  
Old 05-01-2006, 08:19 AM
Connector Connector is offline
 
Join Date: Dec 2005
Location: Spain
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello

thankyou for that thread it was very usefull.. but it seem to me i dont understand it

here what i try

Code:
<if condition="$comma = ''"></if>
<if condition="$userinfo[field15] & 1"> 
<TD width="133"  valign="top" class="alt1"><strong>I am here for:</strong></TD>
<TD width="205"  valign="top" class="alt1">$post[field15]$comma<if condition="$comma = ', '"></if></if></TD> 
</tr>
<tr>
and

Code:
<if condition="$comma = ''"></if>
<if condition="$userinfo[field15] & 1"> 
<TD width="133"  valign="top" class="alt1"><strong>I am here for:</strong></TD>
<TD width="205"  valign="top" class="alt1">$post[field15]<if condition="$comma = ', '"></if></if></TD> 
</tr>
<tr>

i try to do this way and it dont work .. any idea :surprised:
Reply With Quote
  #6  
Old 05-02-2006, 02:10 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

From what I've gathered you'll have to manually translate each option accordingly. Placing $post[field15] will only show the "binary" number. So there will be a bit of work if you have a lot of selections.

If for example you want to show the 4 options, "Serious Relationships", "Friends", "Networking" and "Dating" you'll need to set a conditional for each. Such as:

Code:
<if condition="$post['field15'] & 1">
    Serious Relationships
</if>
<if condition="$post['field15'] & 2">
    Friends
</if>
<if condition="$post['field15'] & 4">
    Networking
</if>
<if condition="$post['field15'] & 8">
    Dating
</if>

And so forth...
Check the numbers correctly. Notice that:

1 = Option 1 (Serious Relationships)
2 = Option 2 (Friends)
4 = Option 3 (Networking)
8 = Option 4 (Dating)

So options 5 would be "16" and option 6 would be "32". In post #3 the $comma is only if you want a comma placed after each selection when you allow multiple selections.

I hope that I've explained it properly.
Reply With Quote
  #7  
Old 05-02-2006, 03:07 AM
Connector Connector is offline
 
Join Date: Dec 2005
Location: Spain
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks alot that work fine

there is just a small error know when i try to add the code like this..

Code:
<if condition="$userinfo[field15]"> 
<TD width="133"  valign="top" class="alt1"><strong>I am here for:</strong></TD>
<TD width="205"  valign="top" class="alt1"><if condition="$post['field15'] & 8">Dating </if><if condition="$post['field15'] & 4">Networking</if><if condition="$post['field15'] & 2">Friends</if><if condition="$post['field15'] & 1">Serious Relationships</if></if></TD>    
</tr>
<tr>
know you can see if i select more then one options it give me like this way

Quote:
Serious RelationshipsNetworkingDatingFriends
i was think maybe there is anther better way where i can do comma for each options ? any seggestion about this..

thanks alot for help
Reply With Quote
  #8  
Old 05-02-2006, 03:25 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah. You'll need to add the $comma to separate each selection. It's not that much of an edit but you'll probably want to replace what you have with:

Code:
<if condition="$comma = ''"></if>

<if condition="$post['field15'] & 1">
    $comma Serious Relationships
    <if condition="$comma = ', '"></if>
</if>
<if condition="$post['field15'] & 2">
    $comma Friends
    <if condition="$comma = ', '"></if>
</if>
<if condition="$post['field15'] & 4">
    $comma Networking
    <if condition="$comma = ', '"></if>
</if>
<if condition="$post['field15'] & 8">
    $comma Dating
    <if condition="$comma = ', '"></if>
</if>
See if that helps.
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 10:38 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.04507 seconds
  • Memory Usage 2,265KB
  • 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
  • (7)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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