Back to vBulletin 3.8 Template Modifications

Syntax Highlight Colors
Mod Version: 1.00, by JamesC70

vB Version: 3.8.x Rating: (0 vote - 0 average) Installs: 1
Released: 15 Jan 2018 Last Update: Never Downloads: 0
Not Supported Translations  

After a decade of running vBulletin, I finally decided that I wanted to use the [ PHP ] BBCode .... only to see that the orange clashes with my theme.

After hours of looking through vB3.8.11 code and the modifications on this site, I finally decided to look at the source code of a post that uses the [ PHP ] code. It's a simple CSS span, why not try to fix it through the Replacement Variable Manager?

Lo and behold, IT WORKED!

If anyone else needs to know how to do it:
1. Post something with the [ PHP ] BBCode, so you can witness whether it works.
PHP Code:
<?php
// Sample program
$a 'Hello, world';
$b $a '! :)';
echo 
$b;
?>
2. Look at the source code of your post, and you will see that orange is style="color: #FF8000". Red is style="color: #DD0000", blue is style="color: #0000BB", and green is style="color: #007700".

3. Enter your Admin Control Panel > Styles & Templates > Replacement Variable Manager, select a style, and Add New Replacement Variable.

For example, to change orange to green:
Search for Text box: style="color: #FF8000"
Replace with Text box: style="color: #007700"

4. Press Save, then refresh your post with the [ PHP ] code to see the change.

Note to vb.org moderators: posted as a Template Modification because there really isn't any other place for this within the Modifications area. It's not enough for an Article, and if I put it under Graphics it's not easily found with a site search for "syntax colors", All Mods, Titles Only.

Download

No files for download.

Similar Mods

Advanced Syntax Highlighting - BBCode [highlight] vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024