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-24-2005 03:24 AM

Quote:

Originally Posted by 7thgenCivic.Com
sorry. was building new puter and had no access.

anyway, I will check it out.

Yes please :)

Wordplay 12-24-2005 10:45 AM

uninstalled it because of that bug.

is there anyway to whip up a background bbcode?

Lizard King 12-24-2005 11:08 AM

If anyone needs this for custom profile fields just add a plugin with the following content :
hook location : member_complete
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);
}

Change field2 to suit your needs.

Kihon Kata 12-24-2005 02:12 PM

Quote:

Originally Posted by Lizard King
If anyone needs this for custom profile fields just add a plugin with the following content :
hook location : member_complete
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);
}

Change field2 to suit your needs.

Lizardking:

I modded my profile field #1 and it didn't work:

Is this correct?

https://vborg.vbsupport.ru/

ImportPassion 12-24-2005 04:20 PM

you have to add a plugin for each field. thats kinda nasty if you have like 20+

ImportPassion 12-24-2005 05:12 PM

Ok, I updated the Plugin. It is all rewritten and in a different hook location.

Kihon Kata 12-24-2005 05:15 PM

Quote:

Originally Posted by 7thgenCivic.Com
you have to add a plugin for each field. thats kinda nasty if you have like 20+

But what if I only want it to work for ONE field?

ImportPassion 12-24-2005 05:16 PM

i u want to, u can remove this section from the plugin as it seems it is not necessary. But won't hurt or slow down if you keep it in there.

PHP Code:

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


ImportPassion 12-24-2005 05:18 PM

Quote:

Originally Posted by TonysDesigns
But what if I only want it to work for ONE field?

try this

PHP Code:

    if($profilefieldname == "field1")
    {
     
$profilefield['value'] = $bbcode_parser->parse($userinfo["$profilefieldname"],0true);
    } 

in the same hook location

ImportPassion 12-24-2005 05:26 PM

@TonysDesigns: I updated the code above


All times are GMT. The time now is 01: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.01111 seconds
  • Memory Usage 1,741KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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