code 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

Post Reply
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

code tags

Post by josh »

onion2k wrote:How I Help Here: If it's obvious you're not bothered about your problem (eg you don't post any code, you've not got any error messages) then I won't bother helping very much. If you make it clear you care and you're trying your best (eg you post code in

Code: Select all

tag[/b]s, you've tried a few different fixes already) I'll do my best to help you.[/quote]

We haven't had

Code: Select all

tags in a while have we. I vote add an "alias" tag! itd fix all the old posts too
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: code tags

Post by califdon »

Code: Select all

didn't work for some interim period, I believe, but they've worked for all or nearly all the time I've been posting here--a couple of years. Just no button for them.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: code tags

Post by josh »

Code: Select all

 
echo 'foo';
 
cool. they were disabled at one point when they introduced the

Code: Select all

 stuff, looks like theyre a step ahead of me
MichaelR
Forum Contributor
Posts: 148
Joined: Sat Jan 03, 2009 3:27 pm

Re: code tags

Post by MichaelR »

The

Code: Select all

tag doesn't seem to be working. I've been looking through the older posts in the Code Snippet forum, and none of the samples show up as code.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: code tags

Post by califdon »

MichaelR wrote:The

Code: Select all

tag doesn't seem to be working. I've been looking through the older posts in the Code Snippet forum, and none of the samples show up as code.[/quote]
They work on new or edited posts. The BBcode tags are apparently parsed when the the post is saved. An earlier discussion mentioned that it didn't make sense to go to a lot of work fixing old posts that probably have little readership.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: code tags

Post by josh »

Oh.. that explains why I thought they "weren't working" ( I was looking at old posts )

But you could do this in 2 lines of sql, with the regex() function; for instance find all the \[php\] and replace with \

Code: Select all

, find all  and replace with  :-)

What is the proper way to escape writing the [syntax=php]tag? ( when it is followed by a closing one )[/syntax]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: code tags

Post by John Cartwright »

The problem is PHPBB parses the tags and replaces it with it's internal bbcode handling during the post submission. So unfortunately, it's not as simple as simply updating the SQL.
Post Reply