phpfreak Posted January 25, 2005 Share Posted January 25, 2005 [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\"The PHP Tags are Back!\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/ Share on other sites More sharing options...
phpfreak Posted January 25, 2005 Author Share Posted January 25, 2005 Testing 123: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]function [/span][span style=\"color:#0000BB\"]unparse_php_tag[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]=[/span][span style=\"color:#DD0000\"]\"\"[/span][span style=\"color:#007700\"]) { global [/span][span style=\"color:#0000BB\"]$ibforums[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]str_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"<!--SDS-->$<!--EDS-->\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"$\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]str_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"<code>\" [/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]str_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"</code>\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]str_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"</font>\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]str_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"</span>\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]preg_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"#\<font(.+?)>#\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]preg_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"#\<span(.+?)>#\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]preg_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"#^<span(.+?)><br />(.+?)#\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\\2\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]preg_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"#(.+?)(?:<br />){1,}$#\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\\1\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$txt [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]str_replace[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"<br />\" [/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"\n\"[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"]); return [/span][span style=\"color:#DD0000\"]\"php\"[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$txt[/span][span style=\"color:#007700\"].[/span][span style=\"color:#DD0000\"]\"php\"[/span][span style=\"color:#007700\"]; } [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7036 Share on other sites More sharing options...
zq29 Posted January 25, 2005 Share Posted January 25, 2005 [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\"w00t!\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7037 Share on other sites More sharing options...
AndyB Posted January 25, 2005 Share Posted January 25, 2005 Click PHP button = Status Bar message - Script Error! At least it didn't say "user error" Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7038 Share on other sites More sharing options...
Tard Posted January 25, 2005 Share Posted January 25, 2005 How do you make it have the colors? Is it just [code ] or do you have to do something else? Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7040 Share on other sites More sharing options...
AndyB Posted January 25, 2005 Share Posted January 25, 2005 [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\"And no more script error message.\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7044 Share on other sites More sharing options...
phpfreak Posted January 26, 2005 Author Share Posted January 26, 2005 How do you make it have the colors? Is it just [code ] or do you have to do something else? 197525[/snapback] You have to put them in the PHP tags. Instead of code, use PHP for the tag. There's a pushbutton on the BB Code block for them. Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7048 Share on other sites More sharing options...
czambran Posted January 26, 2005 Share Posted January 26, 2005 I use FF 1.0 and the php bbcode button does not seem to work. Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7049 Share on other sites More sharing options...
obsidian Posted January 26, 2005 Share Posted January 26, 2005 I use FF 1.0 and the php bbcode button does not seem to work. 197830[/snapback] [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\"Same here! I can\'t get the button to work in FF 0.9, but manual entry does!\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7050 Share on other sites More sharing options...
zq29 Posted January 26, 2005 Share Posted January 26, 2005 Also using FF 1.0, PHP button doesn't work for me either. Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7051 Share on other sites More sharing options...
LordStanley Posted January 27, 2005 Share Posted January 27, 2005 really...i have firefox 1.0 and it works fine for me Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7056 Share on other sites More sharing options...
Tard Posted January 28, 2005 Share Posted January 28, 2005 [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\"Yay, i can do it now :P\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7063 Share on other sites More sharing options...
phpfreak Posted February 2, 2005 Author Share Posted February 2, 2005 [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\\\"color:#0000BB\\\"]<?php [/span][span style=\\\"color:#007700\\\"]echo [/span][span style=\\\"color:#DD0000\\\"]\\\"Yay, i can do it now :P\\\"[/span][span style=\\\"color:#007700\\\"]; [/span][span style=\\\"color:#0000BB\\\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] 198912[/snapback] Ironically, nothing changed on the website! Strange! Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7074 Share on other sites More sharing options...
coldkill Posted February 2, 2005 Share Posted February 2, 2005 w00t php tags [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<? session_start[/span][span style=\"color:#007700\"](); [/span][span style=\"color:#0000BB\"]$test [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'comment\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#0000BB\"]$username [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'user\'[/span][span style=\"color:#007700\"]]; echo[/span][span style=\"color:#DD0000\"]\'\'[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$test[/span][span style=\"color:#007700\"].[/span][span style=\"color:#DD0000\"]\' \'[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$username[/span][span style=\"color:#007700\"].[/span][span style=\"color:#DD0000\"]\'\'[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7075 Share on other sites More sharing options...
zq29 Posted February 2, 2005 Share Posted February 2, 2005 Just out of interest coldkill, why do you echo 'nothing' in places? For example: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\'\'[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$test[/span][span style=\"color:#007700\"].[/span][span style=\"color:#DD0000\"]\' \'[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$username[/span][span style=\"color:#007700\"].[/span][span style=\"color:#DD0000\"]\'\'[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Why don't you just put this: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$test [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\' \' [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$username[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] It has the same output, just less to type, or am I missing something? Its just that I've noticed you do this all the time and was wondering why. Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7076 Share on other sites More sharing options...
coldkill Posted February 2, 2005 Share Posted February 2, 2005 i just do it that way when i echo variables cos i know it works geuss its just preference Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7077 Share on other sites More sharing options...
Arenium Posted February 2, 2005 Share Posted February 2, 2005 Preference would imply that there's two equally "correct" ways of doing something. In this case, there's one acceptable and way...and one silly way You make the choice (hint: spare yourself and the parser the extraneous quotes) Ok, back on topic... ...which is off topic... [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\'It really has been a while. Missed these suckers.\'[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7079 Share on other sites More sharing options...
Masna Posted February 2, 2005 Share Posted February 2, 2005 [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"][?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\'test\'[/span][span style=\"color:#007700\"]; if (![/span][span style=\"color:#0000BB\"]$var[/span][span style=\"color:#007700\"]){ [/span][span style=\"color:#FF8000\"]//... [/span][span style=\"color:#007700\"]} [/span][span style=\"color:#0000BB\"]?][/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7080 Share on other sites More sharing options...
Arenium Posted February 2, 2005 Share Posted February 2, 2005 Yikes! Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7081 Share on other sites More sharing options...
zq29 Posted February 2, 2005 Share Posted February 2, 2005 And when you actually want to type the string of characters "& #33;" (without the space) you get a "!". Hows that for a piss take eh? Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7082 Share on other sites More sharing options...
coldkill Posted February 3, 2005 Share Posted February 3, 2005 lol and going back off topic both methods work so both methods are correct nethier (ie my method) can be classed as a silly method if it works Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7084 Share on other sites More sharing options...
dmsuperman Posted March 30, 2005 Share Posted March 30, 2005 [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<? [/span][span style=\"color:#007700\"]echo([/span][span style=\"color:#0000BB\"]$me[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$you[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Or do it like that, because it's the fastest. Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7338 Share on other sites More sharing options...
wildteen88 Posted March 31, 2005 Share Posted March 31, 2005 Yeah there are still a litle problem, with the PHP tags as the explanation mark chnages to hex in this case: [!--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\"]$var [/span][span style=\"color:#007700\"]&[/span][span style=\"color:#FF8000\"]#33;= \"something\") // OR [/span][span style=\"color:#007700\"]if (&[/span][span style=\"color:#FF8000\"]#33;$var) [/span][span style=\"color:#0000BB\"]But works fine like this[/span][span style=\"color:#007700\"]: echo [/span][span style=\"color:#DD0000\"]\"hello!!!\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7348 Share on other sites More sharing options...
ShadowMetis Posted April 6, 2005 Share Posted April 6, 2005 lol and going back off topic both methods work so both methods are correct nethier (ie my method) can be classed as a silly method if it works 201033[/snapback] Not to but into an argument that doesn't involve me, but your way _is_ silly because it contains pointless extra syntax. However, it _is_also_ correct, as you say, because it still outputs the intended string. Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7380 Share on other sites More sharing options...
448191 Posted May 24, 2005 Share Posted May 24, 2005 Something else: when I edit a post and there are multiple blocks of code, all other blocks in the textarea are identical to the first. I have to c&p the blocks from the topic display below the edit area... Really annoying. You guys probably already noticed this a long time ago, but I did not find any posts mentioning it. Link to comment https://forums.phpfreaks.com/topic/2144-php-tags-are-back/#findComment-7621 Share on other sites More sharing options...
Recommended Posts