View Full Version : Parsing HTML in the custom fields?
December 22nd, 2004, 03:26 PM
Is there an option to enable BB code parsing in the custom fields? I have a custom field that might contain email addresses or websites and would like to have it parsed.....
(I know, I know, I should look in showimage.php to see how it's creating the bits but it's been a long day. :p )
December 22nd, 2004, 03:50 PM
There's an option to enable/disable bbcode in custom fields for each category. ;)
December 22nd, 2004, 03:55 PM
There's an option to enable/disable bbcode in custom fields for each category. ;)I have HTML turned off but BB codes turned on.... I had thought that BB codes would've parsed an address in plain text (eg: http://www.vbadvanced.com) into a link automatically like it does in the forums. :confused:
January 19th, 2005, 06:32 PM
OK, now I know I'm not going nuts. I turned on 'allow html' in the custom fields for the category and that still didn't parse the links. So then I added the output of $catopts['allow_custom_html'] to the output of adv_gallery_showimage_custombits and it shows it being true but the links still weren't parsed. :(
January 20th, 2005, 09:22 AM
Right now it won't automatically parse the links without adding the [ url ] tags around them. I may see if I can add that as an option though.
January 20th, 2005, 09:26 AM
Right now it won't automatically parse the links without adding the [ url ] tags around them. I may see if I can add that as an option though.I was going through newthread.php & newreply.php but got lost on the postcache stuff. :( I came across the parse_bbcode_url function but didn't see how it converts the links that aren't in bb tags. I'll keep looking in between. :D
January 20th, 2005, 09:30 AM
In your functions_gallery.php file look for this:
$fieldname = implode(', ', $fieldname);
Right below, add:
$fieldname = convert_url_to_bbcode($fieldname);
And that should do the trick. :)
January 20th, 2005, 09:44 AM
<KW802 bangs head on desk. Repeatedly>
I came across that code but misinterpeted what it does. I was reading it as if I typed something in as [ http://www.mysite.com (http://www.mysite.com/) hello ] as one giant string that it would then result in [ http://www.mysite.com hello (http://www.mysite.com%20hello/) ] instead of parsing the text out properly. That's it, no more reading code past midnight! :D
Thanks much. :cool:
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.