The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Form Hack question: parsing BBCode in variables
I'm trying to edit the Form Hack mod such that it will parse BBCode and line breaks in the $formpurpose variable. I'll admit right now that while I do have a few years of programming experience under my belt, I'm quite new to PHP, so my apologies if this is a stupid question.
I have found that there is a function called bbcodeparse(), contained in functions.php, that does this. In order to use it, I must include global.php. So, I tried inserting the following code before the eval statement: Code:
require('./global.php'); $formpurpose=bbcodeparse($formpurpose); eval('print_output("' . fetch_template("$maintemplate") . '");'); Your help is appreciated! |
#2
|
|||
|
|||
I did not find a function called bbcodeparse in the functions file.
The files you need to look at would be class_bbcode.php and functions_wysiwyg.php in the includes folder. Try the convert_wysiwyg_html_to_bbcode function in the functions_wysiwyg.php. |
#3
|
|||
|
|||
Okay, so I tried this:
Code:
require('./global.php'); require('./class_bbcode.php'); require('./functions_wysiwyg.php'); convert_wysiwyg_html_to_bbcode ($formpurpose); |
#4
|
||||
|
||||
I believe there is an article that explains things like this.
|
#5
|
|||
|
|||
Well, there's a 51-page thread on the Form Hack mod, if that's what you mean. Beyond that, I've read through various PHP tutorials (including the one linked in the sticky about coding). That's how I've managed to make the modifications that I have. This is the only one remaining that's giving me trouble.
I've been poking at this problem for a while, and figured it wouldn't be any skin off the forum's back to help me out with what I thought was a relatively simple question; I was led to believe it was the official forum for support. My apologies. |
#6
|
||||
|
||||
<a href="https://vborg.vbsupport.ru/showthread.php?t=82693" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=82693</a>
It's wonders what a simple search can do... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|