vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Profile Field BB/HTML Parseing (https://vborg.vbsupport.ru/showthread.php?t=108491)

Mr Chad 02-20-2006 10:06 PM

Profile Field BB/HTML Parseing
 
Please I have tried a few ways and its not workin this is how the output is:

http://beasttoast.com/thosting/files...file_thumb.png



I tried the one where you make a plugin at hook memberlist_complete and put this in there:
PHP Code:

<?
 if ($userinfo['field7'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());  
}
$userinfo['field7'] = $bbcode_parser->parse($userinfo['field7'],0, true);
}


Smiry Kin's 02-20-2006 10:09 PM

Quote:

if you would like to have the option to add BBCODE to the user profile fields, I have a solution that works fine for me. I know there is a HACK but I dont' like it.

Try this, ACP > PLUGIN SYSTEM > ADD NEW PLUGIN

Title: Profile BB Code
Hook Location: Member_Complete

Plugin PHP
Code:

if ($userinfo['fieldX'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); 
}
$userinfo['fieldX'] = $bbcode_parser->parse($userinfo['fieldX'],0, true);
}


This is how it works, See the FIELDX you replace them with the profile field you want to phrase BBCODE.

Thats it, to phrase more than one, repeat it, like this:

Code:

if ($userinfo['fieldX'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); 
}
$userinfo['fieldX'] = $bbcode_parser->parse($userinfo['fieldX'],0, true);
}
{
 if (!is_object($bbcode_parser))
 {
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); 
 }
 $userinfo['fieldX'] = $bbcode_parser->parse($userinfo['fieldX'],0, true);
 }

Not hard at all.
:) Here

Mr Chad 02-20-2006 10:09 PM

Quote:

Originally Posted by Smiry Kin's
:) Here

thats the one i did its not making a diff.

I did remove the $customfields from the member info. And im useing
Code:

<if condition="$userinfo[field11]"> $post[field11]</if>
But shouldnt it still work?

Smiry Kin's 02-21-2006 02:08 AM

make a new plugin:
Title: Profile BB Code
Hook Location: Member_Complete

Plugin PHP
Code:

if ($userinfo['field11'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field11'] = $bbcode_parser->parse($userinfo['fieldX'],0, true);
}

and it should work..


All times are GMT. The time now is 10:37 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.01172 seconds
  • Memory Usage 1,724KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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