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)

RCWong 08-13-2007 03:33 AM

If anyone has a problem this might help them. I fixed upon a bit the code that gen.Scorpio posted. Everything seems to work. From what he posted, when he saw a post of someone with the field filled, it didnt parse the bb code they had in their post. But as I tested it out the fixed up code, everything seems to be fine, no errors. If anyone can improve upon it, go right ahead. Tested on 3.6.8. All you need to do is change the field8 to whatever field you set.

Here is the code.
Code:

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

Pretty much, all I did was change the last bit of code from $userinfo['field5'] to $profilefield[value] and ($userinfo['field5',true, true); to ($profilefield[value],true, true);.

Detomah 11-22-2007 09:21 PM

In case anyone has been having problems with the other fixes and versions of this...

I've got 3.6.8 installed and the profile pages are pretty heavily customised and none of the above fixes worked properly for me, so in the end I tinkered around with the various bits until I came up with this one which works perfectly for me, so I thought i'd share it in case it could be of use to anyone else:

Just replace the entire contents of the product file with this code, changing the 3 instances of field5 for which ever field you want to parse bbcode in and then do the normal install.

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="myspace_style_profile" active="1">
        <title>Parse BBCode in Custom Profile Fields</title>
        <description>Give your users the full effect by letting them use BB Code in their profile.</description>
        <version>1.1</version>
        <codes>
        </codes>
        <templates>
        </templates>
        <plugins>
                <plugin active="1">
                        <title>Parse BBCode for Custom Profile Fields</title>
                        <hookname>member_customfields</hookname>
                        <phpcode><![CDATA[if ($userinfo['field5']) {
require_once(DIR . '/includes/class_bbcode.php');
   
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$userinfo['field5'] = $parser->do_parse($userinfo['field5'], true, true, true, true, false, false);
};]]></phpcode>
                </plugin>
        </plugins>
        <phrases>
        </phrases>
        <options>
        </options>
</product>


Boofo 04-29-2008 05:01 AM

What do we do if we want to do more than one profile filed?

Detomah 05-02-2008 10:47 AM

Gah, I had this working perfectly before updating from 3.6.8 to 3.7 Gold a couple of days ago, now it's stopped working at all.

Anybody have any idea what bits in the code have changed that would mean this doesn't work any more? I dearly need this to work again.

I've tried the CES parser permissions hack which is out there, but that is way too much for what I need and stops more working for me than is practical.

If any pro coders out there have any ideas on this one please help me out, i'm well and trully stuck.

Cerbero1000 05-16-2008 04:34 PM

Is there a way to have it on vbulletin 3.7?
I think that will be more attractive for members to have images or slideshow in their details...
Thanks

resident1 05-30-2008 06:36 PM

I need this mod to work too! any coders out there know how to put the WYSIWYG editor and BBCODE into profile fields?

BlackxRam 06-01-2008 06:56 PM

anyone who can get this working?


All times are GMT. The time now is 03:38 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.01207 seconds
  • Memory Usage 1,732KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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