View Full Version : Profile Field BB/HTML Parseing
Mr Chad
02-20-2006, 10:06 PM
Please I have tried a few ways and its not workin this is how the output is:
http://beasttoast.com/thosting/files/1/profile_thumb.png
(http://beasttoast.com/thosting/files/1/profile.PNG)
I tried the one where you make a plugin at hook memberlist_complete and put this in there:<?
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
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
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:
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
:) Here
thats the one i did its not making a diff.
I did remove the $customfields from the member info. And im useing <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..
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.