Jump to content

Archived

This topic is now archived and is closed to further replies.

phpfreak

PHP Tags - FIXED!

Recommended Posts

I have fixed the PHP tags issues with exclamation points. If anyone has other characters that are goofed up, please post an example here in this thread using the syntax highlighter.

 

One problem though, the PHP tags are parsed before they go into the database. therefore, if there's any existing posts that use that tag, it will not be fixed until the person edits, corrects and saves the post.

 

I'm working on a fix for this as we speak, so be patient.

 

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php

 

[/span][span style=\"color:#007700\"]if(![/span][span style=\"color:#0000BB\"]$foo[/span][span style=\"color:#007700\"]);

{

   echo [/span][span style=\"color:#DD0000\"]\'Bar\'[/span][span style=\"color:#007700\"];

}

[/span][span style=\"color:#0000BB\"]?>[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

Share this post


Link to post
Share on other sites

Here is another problem with the php tag

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\"color:#0000BB\"]<?php

 

 

[/span][span style=\"color:#007700\"]if(!empty([/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"]))

{

echo [/span][span style=\"color:#DD0000\"]\'BLAH\'[/span][span style=\"color:#007700\"];

}

 

if([/span][span style=\"color:#0000BB\"]$bye [/span][span style=\"color:#007700\"]!= [/span][span style=\"color:#0000BB\"]$hello [/span][span style=\"color:#007700\"]&& [/span][span style=\"color:#0000BB\"]$hello [/span][span style=\"color:#007700\"]!= [/span][span style=\"color:#0000BB\"]$bye[/span][span style=\"color:#007700\"])

{

echo [/span][span style=\"color:#DD0000\"]\"\\"[/span][span style=\"color:#0000BB\"]Hello World [/span][span style=\"color:#007700\"]&[/span][span style=\"color:#FF8000\"]#092;\"\";

[/span][span style=\"color:#007700\"]}

 

[/span][span style=\"color:#0000BB\"]?>[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

 

<?php


if(!empty($_POST))
{
echo 'BLAH';
}

if($bye != $hello && $hello != $bye)
{
echo "\"Hello World \"";
}

?>

Share this post


Link to post
Share on other sites

one other problem is that when you have multiple php blocks, if you edit your post, the content from the first block with be in all of them:

 

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\"color:#0000BB\"]<?php

[/span][span style=\"color:#FF8000\"]// block one

[/span][span style=\"color:#0000BB\"]$whatever [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\'yadda yadda\'[/span][span style=\"color:#007700\"];

[/span][span style=\"color:#0000BB\"]?>

[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\"color:#0000BB\"]<?php

[/span][span style=\"color:#FF8000\"]// block two

[/span][span style=\"color:#0000BB\"]$foo [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\'bar\'[/span][span style=\"color:#007700\"];

[/span][span style=\"color:#0000BB\"]?>

[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

Share this post


Link to post
Share on other sites

Good stuff phpfreak. Keep it up :)

 

(Oh yeah, what happened to the smilies?)

Share this post


Link to post
Share on other sites

I just joined a few days ago and have noticed that when PHP blocks are quoted the backslashes keep on propogating. It's as though there is a stripslashes() function call omitted somewhere.

 

Ken

Share this post


Link to post
Share on other sites

had some serious issues again to day with PHP tags.

 

first, i re-encountered the problem where editing a post with 2 PHP boxes changes the second box to the same value as the first box.

 

then, it kept f*ing with my code. changing font elements to style tags. since when does the forum correct bad coding practices? I was trying to make a point with a bgcolor element and it kept changing it to bgstyle="color:..." what is up w/ that?

Share this post


Link to post
Share on other sites

 

Was it an update to the forums that broke the php code tags?

 

I miss them :P But I am sure someone is/has been looking into it.

 

 

Share this post


Link to post
Share on other sites

Yes. The mods are, by now, probably sick of answering this question. This topic has been up since 05! That should tell you something.

Share this post


Link to post
Share on other sites

Yes the PHP Tags and the SOLVED features had been removed when the forum was upgraded.

 

This thread has been locked and unpinned.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

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.