[php] tags?

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

User avatar
Verminox
Forum Contributor
Posts: 101
Joined: Sun May 07, 2006 5:19 am

[php] tags?

Post by Verminox »

I'm sure this has been mentioned many times before, but I couldn't find a topic about this in the Suggestions forum, so I made one anyway.

The

Code: Select all

tags don't work anymore. Therefore all old topics, including ones on the first page in forums such as Tutorials, Snippets, and sticky topics which are still frequently read, are... well.... ugly. 

Can the admins fix this? Possibly by updating all posts and replace instances of

Code: Select all

with

Code: Select all

? Maybe not all, but at least the recent ones in tutorials, snippets, code critique and stickies with broken tags, if any.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: [php] tags?

Post by RobertGonzalez »

It isn't that easy unfortunately. phpBB ties each post with a bbCode id tag. So to clean up those older posts we would need to literally open each post and save it again.

Sorry.
User avatar
Verminox
Forum Contributor
Posts: 101
Joined: Sun May 07, 2006 5:19 am

Re: [php] tags?

Post by Verminox »

Aww damn :(
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: [php] tags?

Post by Chris Corbyn »

We tend to just fix them as we stumble upon them. I don't have a standard user account, but is there some kind of "alert a moderator" button on threads in phpBB3?

EDIT | Yeah, if you use "Report this post" we get notified of it. Just pop a message in there that the post needs fixing :)
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: [php] tags?

Post by Christopher »

Verminox wrote:The

Code: Select all

tags don't work anymore. [/quote]
To clarify,

Code: Select all

tags still work in new posts ... just not in post before the upgrade to phpBB3.

It would be nice to get the

Code: Select all

button back in the post editor though.
(#10850)
jason.carter
Forum Commoner
Posts: 35
Joined: Sat Jan 10, 2009 10:05 am

Re: [php] tags?

Post by jason.carter »

PHP tags work fine for me.

Try [syntax=php] [/syntax]
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: [php] tags?

Post by califdon »

jason.carter wrote:PHP tags work fine for me.

Try [ code] 
That's not a

Code: Select all

tag, it doesn't use smart coloring based on PHP syntax.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: [php] tags?

Post by kaisellgren »

You either type

Code: Select all

[ /php] or [code=php ][ /code] :)

Although I don't understand why there is no button for PHP code tag...
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: [php] tags?

Post by califdon »

kaisellgren wrote:You either type

Code: Select all

[ /php] or [code=php ][ /code] :)[/quote]
Right. But not just [ code].
[quote]Although I don't understand why there is no button for PHP code tag...[/quote]
It would make things a bit easier, wouldn't it? Actually, I have become accustomed to just entering the tags directly, as I enter a message. It has become faster for me to do that than move my mouse up to the button bar and find the right button to click.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: [php] tags?

Post by RobertGonzalez »

There is no PHP button because it would require us to modify the phpBB default install. Every time we upgrade we would overwrite those changes and would have to remodify the templates.

I think there was a greasemonkey script around here once that added the PHP button. But like califdon said, I am at a point right now where typing the tags as I post/reply is faster.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: [php] tags?

Post by kaisellgren »

Everah wrote:There is no PHP button because it would require us to modify the phpBB default install. Every time we upgrade we would overwrite those changes and would have to remodify the templates.

I think there was a greasemonkey script around here once that added the PHP button. But like califdon said, I am at a point right now where typing the tags as I post/reply is faster.
Okay that makes sense. 8)
socket1
Forum Commoner
Posts: 82
Joined: Mon Dec 08, 2008 7:40 pm
Location: Shokan, New York

Re: [php] tags?

Post by socket1 »

This needs updating..... viewtopic.php?f=1&p=197050#p197050 the

Code: Select all

tags don't do anything.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: [php] tags?

Post by califdon »

socket1 wrote:This needs updating..... viewtopic.php?f=1&p=197050#p197050 the

Code: Select all

tags don't do anything.[/quote]
Hmmm. I just opened that post in Edit mode (as a Moderator, I can do that) and saved it again, [u]without making even the slightest change[/u], and now it works. Either something glitched when you saved it or there's something special that I don't know about that lets mods do it. Hey, Robert, what's going on?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: [php] tags?

Post by pickle »

I believe the code is parsed when the post is saved, not when it's viewed. As we've migrated through different syntax highlighters, the "rendered" view got lost. Re-editing the post & saving it again allows the parser to re-parse the file & re-render the code.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: [php] tags?

Post by kaisellgren »

I think it's David Copperfield what happened.

Seriously, I think reposting/editing will make the php tags to get parsed just like pickle said.
Post Reply