Barand Posted June 19, 2008 Share Posted June 19, 2008 For how long have ...[/PHP] tags for code been supported? I've just noticed some in someone's post Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/ Share on other sites More sharing options...
wildteen88 Posted June 19, 2008 Share Posted June 19, 2008 It has been supported since SMF was first installed here. There has been a modification applied to the php tags latey, it now wraps a code box around the code. I think it was ober or Daniel0 cant remember which Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569419 Share on other sites More sharing options...
Barand Posted June 19, 2008 Author Share Posted June 19, 2008 it now wraps a code box around the code. That's the change I noticed Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569425 Share on other sites More sharing options...
redbullmarky Posted June 19, 2008 Share Posted June 19, 2008 echo 'hello world'; oh yeah. nice! Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569463 Share on other sites More sharing options...
Barand Posted June 19, 2008 Author Share Posted June 19, 2008 Didn't you get the memo either? Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569464 Share on other sites More sharing options...
redbullmarky Posted June 19, 2008 Share Posted June 19, 2008 not sure. i've always known about the php tags but never used them as it sort of left coloured code out on a limb right in the middle of the post, with no wrapping or anything. haven't tried it til now. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569551 Share on other sites More sharing options...
Barand Posted June 19, 2008 Author Share Posted June 19, 2008 Next project - ...[/SQL] for query code showing colour syntax. A bonus for those using reserved words as column names and wondering what's wrong. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569558 Share on other sites More sharing options...
Stephen Posted June 19, 2008 Share Posted June 19, 2008 I never noticed that we had PHP tags :/ Color coding without having to add start/end php tags is nice Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569567 Share on other sites More sharing options...
Orio Posted June 19, 2008 Share Posted June 19, 2008 Color coding without having to add start/end php tags is nice Certainly is. Good job. Orio. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569578 Share on other sites More sharing options...
Daniel0 Posted June 19, 2008 Share Posted June 19, 2008 SMF does by default have the php tags. The only thing it does is add syntax highlighting to it. I just modified the CSS to match the same styles as the regular code box has (i.e. box that stands out from the rest of the content, monospaced font and overflowing content will be scrollable). Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569601 Share on other sites More sharing options...
trq Posted June 19, 2008 Share Posted June 19, 2008 I didn't know about this either. Great job. Noew we can write little snippets without <?php ?> Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569611 Share on other sites More sharing options...
.josh Posted June 19, 2008 Share Posted June 19, 2008 [code=php:0] ... [/code] tages are usually the only thing I ever use, unless I'm showing strictly html code. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-569646 Share on other sites More sharing options...
corbin Posted June 20, 2008 Share Posted June 20, 2008 [code=php:0] ... [/code] tages are usually the only thing I ever use, unless I'm showing strictly html code. Same... Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570393 Share on other sites More sharing options...
448191 Posted June 20, 2008 Share Posted June 20, 2008 I've been a fan of the tags for as long as I can remember. But I don't really like the CSS changes One of the reasons I liked it was that it was unobtrusive. Now it just looks like the code boxes. Way better would be a white background and now border, mimicking how it would look in an editor. I won't lose any sleep over it either way though. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570470 Share on other sites More sharing options...
Daniel0 Posted June 20, 2008 Share Posted June 20, 2008 Well, it was requested and it had long annoyed me that it didn't use a mono-spaced font. Also, some people used that instead of the ones with large amounts of code. That took up a lot of vertical space. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570473 Share on other sites More sharing options...
448191 Posted June 20, 2008 Share Posted June 20, 2008 ... it had long annoyed me that it didn't use a mono-spaced font. Good point. Also, some people used that instead of the ones with large amounts of code. That took up a lot of vertical space. Commonly, code in a post is intended as inline content. In which case having to scroll will make it harder to read. If the code it more of an attachment, then scrolling is ok. Just my €0.02. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570485 Share on other sites More sharing options...
Daniel0 Posted June 20, 2008 Share Posted June 20, 2008 Hmm... perhaps. I suppose I can change it if it's widespread opinion that and [code] should be distinctive. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570489 Share on other sites More sharing options...
448191 Posted June 20, 2008 Share Posted June 20, 2008 Fair enough. <off to campaign for unobtrusive tags/> Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570496 Share on other sites More sharing options...
FIREBALL5 Posted June 21, 2008 Share Posted June 21, 2008 Wait, does that mean I can use php on the forums or just color code the php? Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570689 Share on other sites More sharing options...
448191 Posted June 21, 2008 Share Posted June 21, 2008 Yes, and we also allow you to execute shell scripts and you can execute sql with grant privileges too. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-570690 Share on other sites More sharing options...
wildteen88 Posted June 28, 2008 Share Posted June 28, 2008 I know this is old post. B But there is an issue with the PHP tags. When you post code which is wrapped in PHP tags, it will post fine. However if you then edit the post, after saving some characters (especially spaces) get converted in to their html entities equivalent which really mess the code up. Example: if ($var == 'something') { // blah } Edited, to show results. In this case its only the spaces Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-576831 Share on other sites More sharing options...
.josh Posted June 28, 2008 Share Posted June 28, 2008 I know this is old post. B But there is an issue with the PHP tags. When you post code which is wrapped in PHP tags, it will post fine. However if you then edit the post, after saving some characters (especially spaces) get converted in to their html entities equivalent which really mess the code up. Example: if ($var == 'something') { // blah } Edited, to show results. In this case its only the spaces Hey yeah I been seeing that crop up a lot in people's posts recently. I wondered if that was some kind of forum glitch or if people were somehow being retarded and coding like that... edit: and yes, when I first quoted and posted this, it showed correctly, but when I edit/saved (didn't touch anything except the buttons) it's now bugged. edit edit: okay it doesn't seem to bug on the full modify button. It seems to only modify on the quick edit button on the bottom right of the post. If it's bugged, I can hit the full modify button and save (not pressing anything else) and it will fix it. But if I turn around and hit the quick edit and then save, it breaks again. So the moral of the story is that the quick edit button is bugged. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-576843 Share on other sites More sharing options...
Daniel0 Posted June 28, 2008 Share Posted June 28, 2008 Both the php and code tags have this bug. I've seen this in a long time. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-576881 Share on other sites More sharing options...
ober Posted June 30, 2008 Share Posted June 30, 2008 Yeah, I think there is something screwed up in the AJAX that passes the info back and forth... I'll talk to the SMF guys about it. Quote Link to comment https://forums.phpfreaks.com/topic/110982-php-tags/#findComment-578441 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.