MyBB Hacks

Full Version: Xthreads variable questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was playing around with the Xthreads tutorial for setting up a product review forum and what I would like to be able to do is to pass a custom thread field variable, i.e {$GLOBALS['threadfields']['pfname']} on to some PHP code to be able to use it as a PHP variable, to be able to do some stuff with it, i.e. stripslashes and so on.

It appears that there's a Xthreads plugin that enables PHP in templates.  Is this the way to go?  How would I use a custom thread variable reply as a PHP variable?  Am I being silly?

Any advice would be much appreciated.

thanks
Basically, we can use function shortcut in Display Format or other textarea in custom thread fields settings.
An example for the Display Format (the output):

Code:
<func stripslashes>{VALUE}</func>


Or something like this:

Code:
<?=number_format({VALUE},2)?>


Text Mask Filter feature is a really useful tools if you want to sanitize the input.

But if you want to add it directly in template, you need "at least" Template Conditional plugin for that.
Or you can use PHP In Template plugin.

More info about it:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=288&pid=36

I'm really sorry if I misunderstand what you want.

Reference URL's