Version: 4.001, by cellarius
Developer Last Online: Apr 2022
Category: BB Code Enhancements -
Version: 4.x.x
Rating:
Released: 06-07-2011
Last Update: Never
Installs: 24
Uses Plugins
No support by the author.
This addon allows for PHP-Code to be used in Custom BBCodes
It offers a framework for the easy integration and sharing of custom BBCodes that are based on PHP processing of the data entered by the user. It could, for example, be used to develop BBCodes that use multiple options or to poll database information. It does allow for the Admin to use PHP in the Backend - it does, of course, not allow this to forum visitors.
You need to know PHP to use this Addon to develop your own PHP based bbcodes, however it would be possible to share them as an extension to this addon.
Installation:
- install the product file - done.
Using PHP in Custom BBCodes:
Create your Custom BBCode as always, and just put your PHP into the Replacement box (where the HTML used to go).
Just remember two things:
Your code needs to start with <?php
You need to return the result of your code.
If you're unsure what that means, read the php manual on eval() and look at the evaltest example in the second post.
For coders: include instead of eval
If you'd rather store the PHP for your new BBCodes in the file system for ease of development, that's possible, too:
create a folder called "custombbcodes" in your forum root
in that folder, create a php file that copies your BBCode Tag Name (ie. if your tag name is "includetest", the file needs to be called "includetest.php"). That's where your PHP goes.
in the Replacement box in the Custom BBCode Dialog, just put the word "include", nothing else
Since there's no eval() here, no need to return the result. Instead, it needs to go into $parsed.There's also an includetest example in the second post.
No Support for your PHP-Code!
### See the example BBCodes in the second post (click)! ###
### Don't forget to click install! ###
(No support if you don't)
I think you should be posting this in the programming forum. This post does not apply to Cel's MOD.
I am trying to help, but I need to see the other part of this JavaScript / jquery code you are working with. You did not post PHP. Unfortunately it doesn't look like valid JavaScript or jquery either. So I am at a little bit of a loss to assist you.
Re-post as a new thread in the programming forum and post your source references, including function 'sociallocker'. Once we see the full picture it should be easy enough to help you.