Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Parse BBCode in Custom Profile Fields Details »»
Parse BBCode in Custom Profile Fields
Version: 1.1, by ImportPassion ImportPassion is offline
Developer Last Online: Oct 2008 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 12-20-2005 Last Update: 12-26-2005 Installs: 38
Uses Plugins
 
No support by the author.

Why? Cause I think this should be the norm and others in this thread seem to want it. https://vborg.vbsupport.ru/showthread.php?t=101248

Be nice to also have WYSIWYG on the textareas, but that's another hack.

There are 2 versions of this.
The first one, product-parse_bbcode_in_profile_1.1.xml, is for anyone that does not have the MySpace style profile template hack installed. You can find that hack here https://vborg.vbsupport.ru/showthread.php?t=101248

The second, product-myspace_style_profile_version.xml, is for users that are using that template hack.

INSTALLATION:
Install the Product and that's it. Will install 1 new plugin. I tested as best I can, but see what happens. Can't provide 100% support, but I will see what I can do.

For non-MySpace profile template users, some options:
--------------------------------------------------------------------------
Optionally remove some code.
https://vborg.vbsupport.ru/showpost....4&postcount=18
--------------------------------------------------------------------------
If you only want certain fields, put this code for EACH fieldx u want parsed in member_customfields hook location.
https://vborg.vbsupport.ru/showpost....5&postcount=19

--------------------------------------------------------------------------

If you did this code change for 1.01, u can now remove it as it is not needed for 1.1.
v.1.01 Code Change

in admincp/profilefield.php find

PHP Code:
// #################### PRE-CACHE TEMPLATES AND DATA ###################### 
add above that

PHP Code:
define('THIS_SCRIPT''profile_admin'); 
end 1.01 code change

################################################## ##
Non-MySpace template hack
v.1.00 - Original Release
v.1.01 - Update to fix some weird issue in admincp when going to profile field manager.
v.1.1 - re-written - totally works.

MySpace Template hack version:
1.0 - Original release.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 08-13-2007, 03:33 AM
RCWong RCWong is offline
 
Join Date: Dec 2006
Location: Miami, FL U.S.A.
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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);.
Reply With Quote
  #93  
Old 11-22-2007, 09:21 PM
Detomah's Avatar
Detomah Detomah is offline
 
Join Date: Sep 2003
Location: South Shields UK
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #94  
Old 04-29-2008, 05:01 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do we do if we want to do more than one profile filed?
Reply With Quote
  #95  
Old 05-02-2008, 10:47 AM
Detomah's Avatar
Detomah Detomah is offline
 
Join Date: Sep 2003
Location: South Shields UK
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #96  
Old 05-16-2008, 04:34 PM
Cerbero1000 Cerbero1000 is offline
 
Join Date: May 2005
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #97  
Old 05-30-2008, 06:36 PM
resident1 resident1 is offline
 
Join Date: Oct 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need this mod to work too! any coders out there know how to put the WYSIWYG editor and BBCODE into profile fields?
Reply With Quote
  #98  
Old 06-01-2008, 06:56 PM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone who can get this working?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:05 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.04478 seconds
  • Memory Usage 2,283KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete