vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Break in custom profile field? (https://vborg.vbsupport.ru/showthread.php?t=197339)

djxcee 11-27-2008 12:36 AM

Break in custom profile field?
 
I created a custom textfield and it doesn't break.

Here is my custom field, $userinfo[field3]. Is there anyway to add nl2br to it?

Dismounted 11-27-2008 03:36 AM

You need to run profile fields through a vBulletin function that handles this: fetch_profilefield_display().

djxcee 11-27-2008 07:21 AM

Quote:

Originally Posted by Dismounted (Post 1673775)
You need to run profile fields through a vBulletin function that handles this: fetch_profilefield_display().

Ah ok. Sorry (still learning PHP), but I have to ask; how will I proceed in doing this?

ReCom 11-27-2008 07:37 AM

AdminCP > User Profile Fields > User Profile Field Manager > (The profile field you are interested in) > Edit > Profile Field Type > Multiple-Line Text Box

vBulletin automatically converts linebreak to <br/> when the profile field value is displayed in profile pages (About Me).

djxcee 11-27-2008 07:41 AM

I do have Multiple-Line Text Box but vBulletin automatically doesn't convert the linebreak.

Dismounted 11-27-2008 07:46 AM

You need to run the function yourself (via a plugin), vBulletin only runs it in certain pages.

djxcee 11-27-2008 09:49 AM

I tried adding
PHP Code:

fetch_profilefield_display() 

to member_build_blocks_start and getting this error
PHP Code:

Parse errorsyntax errorunexpected $end in /var/www/vhosts/domain.com/subdomains/test/httpdocs/member.php(454) : eval()'d code on line 8 


ReCom 11-27-2008 11:41 AM

Err you forgot half of your colon .... your semicolon!

You might as well paint your semicolon key on your keyboard with bright yellow before doing any coding in C, C++, Java, Javascript, PHP etc .. ;);););););)

djxcee 11-27-2008 05:18 PM

Whoops forgot about that :o.
Now getting a different error:
PHP Code:

WarningMissing argument 1 for fetch_profilefield_display(), called in /var/www/vhosts/wincinteractive.com/subdomains/test/httpdocs/carz/member.php(454) : eval()'d code on line 7 and defined in /var/www/vhosts/wincinteractive.com/subdomains/test/httpdocs/carz/includes/functions.php on line 1400

Warning: Missing argument 2 for fetch_profilefield_display(), called in /var/www/vhosts/wincinteractive.com/subdomains/test/httpdocs/carz/member.php(454) : eval()'
d code on line 7 and defined in /var/www/vhosts/wincinteractive.com/subdomains/test/httpdocs/carz/includes/functions.php on line 1400 


ReCom 11-28-2008 02:15 AM

The error means that fetch_profilefield_display() is expecting some arguments yet you didn't supply any.

Refer to vB API for the function at http://members.vbulletin.com/api/vBu...efield_display that states that the function fetch_profilefield_display() expects two arguments.


All times are GMT. The time now is 03:31 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.01033 seconds
  • Memory Usage 1,736KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete