vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   I think this is a 5 min job for a smart PHP'er! (https://vborg.vbsupport.ru/showthread.php?t=191689)

PicoDeath 09-23-2008 06:24 PM

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.

ercollins 09-23-2008 06:26 PM

um, that does not explain much, maybe more detail?

SEOvB 09-23-2008 07:20 PM

<if condition="$profile[fieldX]">
Html code
</if>

PicoDeath 09-24-2008 04:13 PM

Quote:

Originally Posted by FRDS (Post 1628803)
<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?

nexialys 09-24-2008 05:03 PM

$profile[field6]

ercollins 09-24-2008 05:03 PM

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.

PicoDeath 09-24-2008 05:10 PM

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?

Lynne 09-24-2008 05:16 PM

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).

PicoDeath 09-24-2008 05:25 PM

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 :p

Lynne 09-24-2008 05:34 PM

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.


All times are GMT. The time now is 03:02 AM.

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.01018 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete