johnrcornell Posted May 19, 2007 Share Posted May 19, 2007 Hi guys, I'm new here (obviously.) When I use the [ code ] [ / code ] markup I only get plainol boring black-and-white code. But everyone else gets to have this neato color coding on their posts. What markup do I use to enable that on your forum? Hope this question is in the right place. Thank you for any help! Ricky Quote Link to comment https://forums.phpfreaks.com/topic/52113-color-coded-code-on-the-message-board/ Share on other sites More sharing options...
wildteen88 Posted May 19, 2007 Share Posted May 19, 2007 It is enabled by default. Currently it only highlights PHP code. Eg: <?php // echo hello world message echo "hello world"; ?> You must enclose your PHP within <?php and ?> tags in order for the colour highlighting to work. If you wish to have HTML, CSS, Javascript etc highlighted as well then perhaps see if the SMF developers can include this feature into the next release of SMF. Quote Link to comment https://forums.phpfreaks.com/topic/52113-color-coded-code-on-the-message-board/#findComment-256989 Share on other sites More sharing options...
448191 Posted May 20, 2007 Share Posted May 20, 2007 You can also use [ php ], which looks like this: echo 'Hello World'; Quote Link to comment https://forums.phpfreaks.com/topic/52113-color-coded-code-on-the-message-board/#findComment-257387 Share on other sites More sharing options...
Daniel0 Posted May 20, 2007 Share Posted May 20, 2007 I prefer the tags to the [php] tags simply because the [code] will have a monospaced font and it gives you a box which will have scrollbars if it is long code. Quote Link to comment https://forums.phpfreaks.com/topic/52113-color-coded-code-on-the-message-board/#findComment-257656 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.