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)

wichall 06-11-2006 04:02 PM

How do i parse the bbcode in the box that this hack: https://vborg.vbsupport.ru/showthread.php?t=98282& gives you

lilfields 06-12-2006 08:19 PM

I am parsing BB code correctly within the profile, but not within posts (side location field)...as I have a BB URL in the location field linked to vBgooglemap locations

How would I go about making it parse and not just showing the code? I'm not sure if I made this clear enough to understand but I'll post a screenie if needed.

futuredood 06-23-2006 11:28 AM

this is very strange, i had installed this properly and everything was working good.. and then all of the sudden it stopped working. nothing is more frustrating then when something is working and stops for no reason =(.

i originally installed this hack, deactivated it, and installed this code so that only one field was working (which worked fine):

PHP Code:

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


Then, I had made one change to my memberinfo template, and then it stopped working. I un-do'ed the change, resubmitted it, and it still didn't work.

I've also tried allowing bbcode throughout my memberinfo, but still to no avail.

Please advise..

futuredood 06-25-2006 05:08 AM

turns out that if you turn of vb sigs, some things act up.. just to note

marksyzm 12-30-2006 10:26 AM

Quote:

Originally Posted by Aitsukai (Post 949312)
How would I get it to parse [img] tags as well?

Where you see:

PHP Code:

parse($userinfo['field23'],0true 

Change the '0' to a '1'

BlackxRam 03-09-2007 09:37 AM

This mod doesnt seem to work if you have a custom Profile Page. I reverted my template to default, and this mod worked... I added my custom Profile Page setup that was created originally on a vb 3.5 forum and updated and the mod doesnt work. Just thought this might help people having trouble.

Allan 03-09-2007 09:53 AM

This hack work with vB 3.6.x ?

keth 03-11-2007 11:59 AM

Quote:

Originally Posted by Allan (Post 1199418)
This hack work with vB 3.6.x ?

It works with my vB 3.6.5, so yes. I'd apply some changes, though:

Quote:

Originally Posted by msimplay (Post 861724)
hmm problem again quotes are turning from " to "

Quote:

Originally Posted by ImportPassion (Post 861757)
ya, i posted about that on vb.com, but no reply. not sure why that is happening.

HTML tags are removed from profile fields by default, so you should allow them while parsing the bbcode, otherwise it gets the double htmlspecialchars-treatment which means that " is turned into " and that " is then turned into ".
Also you'd have to use do_parse() instead of parse() (I don't know if it's the same with vB 3.5, I'm using 3.6):

Code:

$profilefield['value'] = $bbcode_parser->do_parse($userinfo["$profilefieldname"], true, true);

Chicago_VLNU_4s 03-11-2007 10:36 PM

so will this mod take care of the quotes = (&quot), & = (&amp) and the many more parsing errors found with the myspace profiles... because I use the alternative parsing method as ppl are posting in here.

***
Edit: Now that I look above, it seems that this one doesn't fix it either :/

gen.Scorpio 03-20-2007 01:04 PM

Dear keth, im getting crazy!
https://vborg.vbsupport.ru/showthread.php?t=142592
(i moved the post to an area that seems more "correct" than this)

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 06:07 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.01220 seconds
  • Memory Usage 1,767KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_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
  • (17)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