PHP Developers Network
http://forums.devnetwork.net/

Old php tags should be deprecated
http://forums.devnetwork.net/viewtopic.php?f=7&t=117638
Page 1 of 1

Author:  josh [ Wed Jun 16, 2010 11:37 am ]
Post subject:  Old php tags should be deprecated


Author:  McInfo [ Wed Jan 12, 2011 3:29 pm ]
Post subject:  Re: Old php tags should be deprecated

I'm bumping this topic to raise awareness that [syntax=php] tags should be used instead of [php] tags because this issue still exists.

Sample [php][/php]

Sample [syntax=php][/syntax]
Syntax: [ Download ] [ Hide ]
<?php if (true) {
    echo '<a href="http://nowhere/nothing.php">Link</a>';
} ?>

Author:  Benjamin [ Wed Jan 12, 2011 4:09 pm ]
Post subject:  Re: Old php tags should be deprecated

I don't know where in the code this is implemented. It may be a part of the same library we are using to add all the other tags. I'll look into it when I get a minute. Have I mentioned the phpBB codebase is psychotic?

Author:  mikosiko [ Wed Jan 12, 2011 5:15 pm ]
Post subject:  Re: Old php tags should be deprecated

maybe I'm wrong... but is not just matter of:
a) delete the row associated to the [php] tag in the table bbcodes or
b) update that row with the same definitions that the tag [syntax] has, allowing in this way to don't break old post ?

Author:  josh [ Thu Jan 13, 2011 2:59 pm ]
Post subject:  Re: Old php tags should be deprecated

When I quote posts the code looks good, so in theory they should replace "[php]" with "[syntax=php]" with a rewrite rule.

Author:  superdezign [ Thu Jan 13, 2011 3:41 pm ]
Post subject:  Re: Old php tags should be deprecated

While that could work, it would also replace [php] with [syntax=php] right here, making me look as though I'm comparing [syntax=php] with [syntax=php]. While not a huge deal right now, who knows if it could be in the future. What if I was writing code that used an array with php as a key?

Syntax: [ Download ] [ Hide ]
$languages = array(
  'asp' => 'okay',
  'php' => 'awesome',
);

echo "PHP is $languages[php]";

Author:  josh [ Thu Jan 13, 2011 4:16 pm ]
Post subject:  Re: Old php tags should be deprecated


Author:  Benjamin [ Fri Jan 14, 2011 1:03 am ]
Post subject:  Re: Old php tags should be deprecated

I took a brief look at the code and it appears that it uses the language such php, css, html, ini etc to look for a corresponding parser which is located as a file on disk based on the language name. I'm not able to spend much time on that right now so if anyone else wants to have a look feel free. I believe the geshi code for phpBB is easy to find.

Author:  mikosiko [ Fri Jan 14, 2011 12:17 pm ]
Post subject:  Re: Old php tags should be deprecated

@benjamin:

Maybe you could attach the message_parser.php file in case somebody could take a look at it, also will help to know which phpbb mod was installed to implement Geshi... was bbGeshi_0.7.5 ?

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/