Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2008, 06:24 PM
PicoDeath PicoDeath is offline
 
Join Date: Apr 2006
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I think this is a 5 min job for a smart PHP'er!

I want to display a certain html table on someones user profile ONLY if they've entered something in a certain custom profile feild.

Thanks.
Reply With Quote
  #2  
Old 09-23-2008, 06:26 PM
ercollins ercollins is offline
 
Join Date: Jun 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um, that does not explain much, maybe more detail?
Reply With Quote
  #3  
Old 09-23-2008, 07:20 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="$profile[fieldX]">
Html code
</if>
Reply With Quote
  #4  
Old 09-24-2008, 04:13 PM
PicoDeath PicoDeath is offline
 
Join Date: Apr 2006
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FRDS View Post
<if condition="$profile[fieldX]">
Html code
</if>
Thanks, I'm trying to do it just to show random text for the moment however it doesn't appear to be displaying anywhere...

The ID of this custom feild is 6, do I need to change profile to something else?
Reply With Quote
  #5  
Old 09-24-2008, 05:03 PM
nexialys
Guest
 
Posts: n/a
Default

$profile[field6]
Reply With Quote
  #6  
Old 09-24-2008, 05:03 PM
ercollins ercollins is offline
 
Join Date: Jun 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it should look like $profile[field6]

Make sure you are using the actual field ID number and not the Sort display number.

also make sure you have something in that profile field.
Reply With Quote
  #7  
Old 09-24-2008, 05:10 PM
PicoDeath PicoDeath is offline
 
Join Date: Apr 2006
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The ID is definetly 6 and it's order is 5.

http://www.gamernade.com/forums/members/picodeath.html

Quote:
<if condition="$profile[field6]">
<td>What the hell?</td>
</if>
Still not showing, the feild I'm basing it on is the Xbox360 gamertag.

Which has something in it, so it should show.. no?
Reply With Quote
  #8  
Old 09-24-2008, 05:16 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why don't you tell us exactly what template you are adding this to and post the exact code you are using (and a little around it so we can see where you are posting it).
Reply With Quote
  #9  
Old 09-24-2008, 05:25 PM
PicoDeath PicoDeath is offline
 
Join Date: Apr 2006
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MEMBERINFO > MEMBERINFO

Quote:
<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">


<div class="fieldset">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$profile[field6]">
<td>What the hell?</td>
</if>
<if condition="!$show['contactlinks']">
<tr>
<td><strong><phrase 1="$userinfo[username]">$vbphrase[x_has_no_contact_info]</phrase></strong></td>
</tr>
</if>
<if condition="$show['homepage']">
<tr>
<td>
$vbphrase[home_page]:<br />
<a href="$userinfo[homepage]" target="_blank" dir="ltr">$userinfo[homepage]</a>
</td>
</tr>
</if>
Not sure how little you want
Reply With Quote
  #10  
Old 09-24-2008, 05:34 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change this:
HTML Code:
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                   <if condition="$profile[field6]">
<td>What the hell?</td>
</if>
to this:

HTML Code:
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                   <if condition="$profile[field6]">
<tr>
<td>What the hell?</td>
</tr>
</if>
And see if that works. You were using incorrect html and that can screw things up.
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:48 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04667 seconds
  • Memory Usage 2,253KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_html
  • (3)bbcode_quote
  • (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
  • (9)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_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