Mutley Posted January 6, 2007 Share Posted January 6, 2007 Is it possible to have a small box around the code in PHP tags so you can see where normal text ends and the PHP begins? Just so it stands out a bit more from the rest of the posts content. Link to comment https://forums.phpfreaks.com/topic/33151-php-tags/ Share on other sites More sharing options...
redbullmarky Posted January 6, 2007 Share Posted January 6, 2007 there's already one that does that. your < ?php tags can go inside [ code] [ /code] tags (obviously remove the spaces) which will pop the content in a box seperate from the posts content.that what you mean?cheersMark Link to comment https://forums.phpfreaks.com/topic/33151-php-tags/#findComment-154505 Share on other sites More sharing options...
Daniel0 Posted January 6, 2007 Share Posted January 6, 2007 Unfortunately, some people use the [nobbc][php][/nobbc]-tag instead of the [nobbc][code][/nobbc]-tag (even when it isn't PHP code). You can't change that (unless the admins modify the source of SMF). Link to comment https://forums.phpfreaks.com/topic/33151-php-tags/#findComment-154512 Share on other sites More sharing options...
Mutley Posted January 6, 2007 Author Share Posted January 6, 2007 If you put PHP code in the [ code] tag it doesn't colour code it though:[code]<?phpif($wohoo == '0') {echo = "yes";} else {echo = "no";}?>[/code][code=php:0]if($wohoo == '0') {echo = "yes";} else {echo = "no";}[/code]It's hard to see where the code stops and the normal text starts.EDIT: Aha, I didn't know you had to put PHP <?php tags in to colour code it in the [ code]. Link to comment https://forums.phpfreaks.com/topic/33151-php-tags/#findComment-154540 Share on other sites More sharing options...
JayBachatero Posted January 10, 2007 Share Posted January 10, 2007 Yea you have to put the <?php tag to see the color. I asked the devs to add an option to specify the source highlight for code tag. Lets see if it makes it in. Link to comment https://forums.phpfreaks.com/topic/33151-php-tags/#findComment-157107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.