Jump to content


Photo

PHP Tags - FIXED!


This topic has been archived. This means that you cannot reply to this topic.
12 replies to this topic

#1 phpfreak

phpfreak
  • Members
  • PipPipPip
  • Advanced Member
  • 527 posts

Posted 15 July 2005 - 03:52 PM

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--]
Eric 'phpfreak' Rosebrock
Got LAMP?
http://www.Phpfreaks.com Founder

#2 czambran

czambran
  • Staff Alumni
  • Advanced Member
  • 52 posts

Posted 15 July 2005 - 03:54 PM

THANK U!!!.
Chris
Using undefined variables in PHP is not an error, just sloppy coding practice. PHP5 Power Programming BOOK
--------------------------------------------------------------------------
PHP F.A.Q.
Linux User #394154

#3 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts

Posted 15 July 2005 - 03:58 PM

wonderful work!
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#4 czambran

czambran
  • Staff Alumni
  • Advanced Member
  • 52 posts

Posted 15 July 2005 - 03:59 PM

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 \"";
}

?>

Chris
Using undefined variables in PHP is not an error, just sloppy coding practice. PHP5 Power Programming BOOK
--------------------------------------------------------------------------
PHP F.A.Q.
Linux User #394154

#5 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts

Posted 15 July 2005 - 04:02 PM

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

You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#6 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts

Posted 15 July 2005 - 04:33 PM

Excellent!

#7 Arenium

Arenium
  • Staff Alumni
  • Advanced Member
  • 111 posts

Posted 15 July 2005 - 05:49 PM

Good stuff phpfreak. Keep it up :)

(Oh yeah, what happened to the smilies?)

#8 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 27 July 2005 - 07:00 PM

As we all know, the PHP tags are still not fixed.

I'm not sure which version we're using, but there's v1.1 of the mod out:

http://mods.invision...ndex.php/f/4155

#9 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts

Posted 13 September 2005 - 01:10 AM

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

#10 micah1701

micah1701
  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts

Posted 03 November 2005 - 05:10 PM

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?
"Confidence in the face of risk."

#11 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts

Posted 29 May 2006 - 10:11 PM


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.



#12 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 29 May 2006 - 11:23 PM

Yes. The mods are, by now, probably sick of answering this question. This topic has been up since 05! That should tell you something.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#13 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts

Posted 30 May 2006 - 09:49 AM

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

This thread has been locked and unpinned.