vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Parse BBCode in Custom Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=103460)

Kihon Kata 12-25-2005 03:48 AM

Quote:

Originally Posted by Lizard King
Yes you need to add for each field. Check this one which i have in profile
Code:

if ($userinfo['field2'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field2'] = $bbcode_parser->parse($userinfo['field2'],0, true);
}
 if ($userinfo['field25'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field25'] = $bbcode_parser->parse($userinfo['field25'],0, true);
}
 if ($userinfo['field22'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field22'] = $bbcode_parser->parse($userinfo['field22'],0, true);
}
 if ($userinfo['field21'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field21'] = $bbcode_parser->parse($userinfo['field21'],0, true);
}
 if ($userinfo['field20'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field20'] = $bbcode_parser->parse($userinfo['field20'],0, true);
}
 if ($userinfo['field24'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field24'] = $bbcode_parser->parse($userinfo['field24'],0, true);
}
 if ($userinfo['field6'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field6'] = $bbcode_parser->parse($userinfo['field6'],0, true);
}
 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);
}
 if ($userinfo['field8'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field8'] = $bbcode_parser->parse($userinfo['field8'],0, true);
}
 if ($userinfo['field10'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field10'] = $bbcode_parser->parse($userinfo['field10'],0, true);
}
 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['field11'],0, true);
}
 if ($userinfo['field12'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field12'] = $bbcode_parser->parse($userinfo['field12'],0, true);
}
 if ($userinfo['field13'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field13'] = $bbcode_parser->parse($userinfo['field13'],0, true);
}
 if ($userinfo['field14'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field14'] = $bbcode_parser->parse($userinfo['field14'],0, true);
}
 if ($userinfo['field16'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field16'] = $bbcode_parser->parse($userinfo['field16'],0, true);
}
 if ($userinfo['field17'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field17'] = $bbcode_parser->parse($userinfo['field17'],0, true);
}
 if ($userinfo['field19'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field19'] = $bbcode_parser->parse($userinfo['field19'],0, true);
}

As you can see you have to add the same parser for each field.

Ohhh ok, let me try that.

Exitilus 12-25-2005 08:38 PM

Ok I'm a bit confused. I was looking for this. Well I installed the plugin ... But it doesn't work :wataf .. looked through and I don't see any other configuration or setup needed to get this working. So am I missing something?

ImportPassion 12-25-2005 11:22 PM

well, it's a product, not just a plugin. although it adds the plugin, and yes, that is all that is needed since all it is is one line of code. Ignore all the stuff from Lizard, my thread got jacked. It does work as it is working on mine. Make sure the hook location is member_customfields.

I registered on your forum and went and edited my profile and then looked at my profile, but it says I don't have permission. Also, all your debug code is showing.

EDIT: Do you have any other plugins using the same hook location? member_customfields

ImportPassion 12-25-2005 11:24 PM

Just an FYI for Lizard and Tony, u don't need to put this line for each one...

PHP Code:

if (!is_object($bbcode_parser))
{
    require_once(
DIR '/includes/class_bbcode.php');
    
$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());


it's a huge waste. Put it once at the top and that's it, done. if you even need it at all, cause my Product doesn't.

Exitilus 12-25-2005 11:28 PM

Quote:

Originally Posted by 7thgenCivic.Com
well, it's a product, not just a plugin. although it adds the plugin, and yes, that is all that is needed since all it is is one line of code. Ignore all the stuff from Lizard, my thread got jacked. It does work as it is working on mine. Make sure the hook location is member_customfields.

I registered on your forum and went and edited my profile and then looked at my profile, but it says I don't have permission. Also, all your debug code is showing.

I verified it is member_customfields.

I also went through and activated your account :) most likely the access denied thing :)

ImportPassion 12-25-2005 11:31 PM

Quote:

Originally Posted by Exitilus
I verified it is member_customfields.

I also went through and activated your account :) most likely the access denied thing :)

I edited my message above, but do you have any other plugins using the same hook location?

ImportPassion 12-25-2005 11:33 PM

would u mind giving me admin access to check it out? I went as far as to remove mine and install the one here and it still works for me.

Exitilus 12-25-2005 11:41 PM

We have a plugin thing that puts all the plugins / products together. Just looked through a couple times and I don't see anything using that specific field

Boofo 12-25-2005 11:47 PM

Will this work on 3.5 RC 3?

ImportPassion 12-25-2005 11:50 PM

no idea, won't hurt to try as long as that hook location exists. But surely no one is still using an RC release?


All times are GMT. The time now is 05:27 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.01211 seconds
  • Memory Usage 1,758KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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