vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   "N/A" when a Profile field is not filled (https://vborg.vbsupport.ru/showthread.php?t=47142)

FeDe 12-30-2002 05:57 PM

"N/A" when a Profile field is not filled
 
Hey :D. I've just searched for a hack like this one I'm requesting but couldn't find any.. *heh* That's why I'm requesting it :D.

I'd like that when in the profile, fields such as the Optional Information ones or the Additional Information ones aren't filled, a "Not Available" to appear in the profile.


Hope you guys can help me! :D

Thanks :)

NTLDR 12-30-2002 06:23 PM

There are a few hacks that do certain fields. All you need to do if go through member.php and find the variables (like $userinfo[icq] for ICQ) and add what you want to be displayed instead of a blank field.

Eg $userinfo[icq]=''; would become $userinfo[icq]='N/A';

FeDe 12-30-2002 06:29 PM

KK, Thanks :). I'll try that now.

FeDe 12-30-2002 06:57 PM

It worked for the ICQ, AIM and Yahoo fields, but I couldn't find any way of doing the same with the custom fields.. Any idea? :$

Thanks for the help btw :).

Sebastian 12-30-2002 07:12 PM

i think custom fields are store in the database.

NTLDR 12-30-2002 07:28 PM

Yes, custom ones are stored in the database, in the userfields table.

Untest but should work, in member.php replace:

PHP Code:

$profilefield[value]=$userinfo[$profilefieldname]; 

With:

PHP Code:

if ($userinfo[$profilefieldname]=='') {
    
$profilefield[value]="N/A";
} else {
    
$profilefield[value]=$userinfo[$profilefieldname];



FeDe 12-30-2002 07:48 PM

It didn't work :(, but there were no errors and if the custom fields were filled, the info did appear.

NTLDR 12-30-2002 08:10 PM

It should work fine, I just tested the code and the results were as expected. You did replace the code and not add before or after it?

FeDe 12-30-2002 11:00 PM

Yes, I did replace it. Just tried again, and it won't work :S.

Chris M 12-30-2002 11:22 PM

It does work:)

What version of vB are you running?

Satan


All times are GMT. The time now is 11:39 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.01070 seconds
  • Memory Usage 1,725KB
  • 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_php_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