PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Oct 17, 2019 6:40 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Jun 16, 2010 11:37 am 
Offline
DevNet Master

Joined: Wed Feb 11, 2004 4:23 pm
Posts: 4872
Location: Palm beach, Florida


Top
 Profile  
 
PostPosted: Wed Jan 12, 2011 3:29 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1532
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>';
} ?>


Top
 Profile  
 
PostPosted: Wed Jan 12, 2011 4:09 pm 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
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?

_________________
Image


Top
 Profile  
 
PostPosted: Wed Jan 12, 2011 5:15 pm 
Offline
Forum Regular

Joined: Wed Jan 13, 2010 8:22 pm
Posts: 757
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 ?


Top
 Profile  
 
PostPosted: Thu Jan 13, 2011 2:59 pm 
Offline
DevNet Master

Joined: Wed Feb 11, 2004 4:23 pm
Posts: 4872
Location: Palm beach, Florida
When I quote posts the code looks good, so in theory they should replace "[php]" with "[syntax=php]" with a rewrite rule.


Top
 Profile  
 
PostPosted: Thu Jan 13, 2011 3:41 pm 
Offline
DevNet Master
User avatar

Joined: Sun Jan 21, 2007 12:06 am
Posts: 4135
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]";


Top
 Profile  
 
PostPosted: Thu Jan 13, 2011 4:16 pm 
Offline
DevNet Master

Joined: Wed Feb 11, 2004 4:23 pm
Posts: 4872
Location: Palm beach, Florida


Top
 Profile  
 
PostPosted: Fri Jan 14, 2011 1:03 am 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
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.

_________________
Image


Top
 Profile  
 
PostPosted: Fri Jan 14, 2011 12:17 pm 
Offline
Forum Regular

Joined: Wed Jan 13, 2010 8:22 pm
Posts: 757
@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 ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group