![]() |
Recreate [code] tag functionality for [as], etc.
Hey everyone,
I like how the code tag retains formatting of any code entered. My problem is that in vB2, I introduced a tag for ActionScript using a 3rd party AS-code formatter. Alas, the code formatter no longer works in VB3. So, I am trying to recreate the effects of the [ code] tag and apply to it the [as] tag feature so that the all of the code from the older threads from vb2 and earlier still display properly. I tried going to the bb code manager and entering: [ code]{param}[/ code] for the [as] tag, but the [ code ] was simply not interpreted. I was informed at vbulletin.com to post my request here instead. Does anybody have any similar solutions? Thanks! Cheers! Kirupa |
Let's not all jump in and answer at the same time :)
Is there a way though? I tried various methods to trick vB into thinking that [as] would be seen as PHP, but that did not work well. Thanks! Kirupa |
well, you have to edit functions_bbcodeparse.php there are the code-html... tags defined.
you have to create an code handler function, depending on the third party script code :) |
Thanks Xenon! I will give that a shot :)
|
Do you happen to know of a guide or forum post that outlines how to accomplish that? I looked through that PHP file and it is overwhelming.
I am not interested in re-creating the AS effect at this point. All I would like to do is display the same results when a user types [as][/as] as when a user types [ code ] [/ code] Thanks! Kirupa |
ahh, well that's quite easy then :)
in functions_bbcodeparse.php find: PHP Code:
PHP Code:
|
Thanks... will check it right now. Is this also working with the php-Code?
It is not the solution I wanted in original, but for now, if it is working, it gives time to try finding a better way.. |
Hi, made this one with the php Tag. Is working fine. Duplicated the section with bbcode_php and made a new template to have the code marked as "ActiionScript".
Any idea how I can make codelines indented? Thanks so far! marc |
Xenon - that worked brilliantly! Now, I duplicated a PHP-like section, duplicated a bbcode_as template, and everything works. And, now, where are the color-coding for PHP defined? For I would like to color code the AS tags, and I would like to duplicate the PHP color codes and modify it slowly as time progresses.
Thanks! Kirupa :) |
well, the color coding of php isn't a thing vbulletin brought in, it's something build in in PHP itself.
best hint for ya is to take a close look at the html code handler in the functions_bbcodeparse.php file, so you can find out how the html tag works and then rewrite that for the as tags :) |
All times are GMT. The time now is 07:14 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|