The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
php BB code
I want to be able to use [php=thefilename.php]
So it puts a lenged for the table. Kinda like a quote tag. What would the best way to go about this? I think all the bb code functions should be handle within the admincp. |
#2
|
||||
|
||||
well some functions cannot be handled just within the acp, as the code highlighting is not doable with plain html, but needs some php.
but actually it's not hard to achieve something similar, look into include/functions_bbcodeparse.php you can see there how the quote code is handled (take a closer look at the $username parameter) and just add the same things to the php tag part of the code |
#3
|
|||
|
|||
I've look and found this
PHP Code:
// [PHP] - this is the first custom tag because it does weird things to HTML $bbcodes['custom']['find']['[php]'] = '#\[php\](<br>|<br />|\r\n|\n|\r)??(.*)(<br>|<br />|\r\n|\n|\r)??\[/php\]#esiU'; $bbcodes['custom']['replace'][' PHP Code:
|
#4
|
|||
|
|||
I guess i'd use something like this?
PHP Code:
|
#5
|
||||
|
||||
exactly, you are very closed.
add that code block under the old php code. but your not done yet, you have to change the handle_bbcode_php function to accept an optional parameter, and then just put the optional parameter into the bbcode_php template. try to find out how to do it. If you won*'t find it, i can tell you when i'm back from university |
#6
|
|||
|
|||
Allright, i got it working.. Thanks alot
|
#7
|
||||
|
||||
you're welcome
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|