Page 1 of 1

code tags

Posted: Wed Aug 05, 2009 7:00 pm
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

Re: code tags

Posted: Wed Aug 05, 2009 7:12 pm
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.

Re: code tags

Posted: Thu Aug 06, 2009 4:41 pm
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

Re: code tags

Posted: Wed Sep 30, 2009 10:32 am
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.

Re: code tags

Posted: Wed Sep 30, 2009 2:18 pm
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.

Re: code tags

Posted: Thu Oct 01, 2009 2:39 am
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]

Re: code tags

Posted: Mon Oct 26, 2009 1:36 pm
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.