Thread: BB Buttons
View Single Post
Old 09-19-2007   #2 (permalink)
Gjbphp
PHP Lover
 
Join Date: May 2007
Location: Zug, Switzerland
Posts: 91

Quote:
Originally Posted by basicwe View Post
I'm guessing this would be the correct place in the forum to post this question?

I've added a few coding bb buttons to my phpbb template's viewtopic_body.tpl. Now people may post code snippets similar to the way vbulletin users can.

What I was wondering is how vbulletin makes the php code snippets show up colorized with the red, blue, and green font colors. Similar to the way code looks in dreamweaver. If it is all in the css could someone please post the css that affects the php snippets? If it is something more than css could someone please tell me what exactly it is?

Thanks.
Hi Steven,

I'm not 100% sure how it's done in Vbulletin, but in phpbb it's more than just css. However, you can do this too with the following function:
highlight_string()

You just need to be careful of quotes and things, depending on the version you have, but you can overcome this with the addslashes() function.

The actual code coloring you can change in php.ini

Greg
Gjbphp is offline