Jump to content

[PHP] tags


Recommended Posts

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

... 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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.  

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.