Log in

View Full Version : How to output HTML commands from custom user profile fields...


fearfx
03-25-2008, 02:23 PM
I would like users to have the ability to put HTML commands in the - Custom User Profile Field.

Then I will output that on there profile page. Right now I have the profile field created. {field8}

Then in the Member Info Template I just

$userinfo[field8]

Where I want the users custom HTML to appear. But obviously it literally shows the code!


So what would I need to do to output the HTML, kind like the htmlspecialchars_decode funciton in PHP except I want to do this in vBulletin!

Thanks Community!

--------------- Added 1206459257 at 1206459257 ---------------

Ok, I've been looking around, and this is the best information I have so far... Now If I wanted to parse the custom profile field for BB Code I would do so by adding a pluggin to the MEMBER_COMPLETE hook?

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

But I want to be able to output REG. HTML commands, so people can embed there own FLASH music files and flash video players or flash photo galleries. Basically anything that can be GENERATED using a (myspace type generator for music players, etc.) and copy and paste the code.

Marco van Herwaarden
03-25-2008, 04:59 PM
I hope you do realise that you are creating a hackers heaven with this? No need to find a backdoor anymore, you are opening the frontdoor wide open.

fearfx
03-25-2008, 05:38 PM
Thanks for your response. I would obvious limit what types of commands people could use? So what would you suggest, for what I want to do?

--------------- Added 1206471967 at 1206471967 ---------------

Similar Threads show

https://vborg.vbsupport.ru/showthread.php?t=90866

.........

Im not sure of any other way to do this...?