Slashes Removed From My Post

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
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Slashes Removed From My Post

Post by jackpf »

Hi all,
I'm not really sure if this is a bug with PHPBB or this forum or what...
But this post has had it's slashes removed...

If you go to edit the post, you'll see the slashes are there, but when viewing the post they are not. The quotes are just blue. This could be a bug with PHPBB's syntax highlighter?

Anyway, just thought I'd see if anyone knew about this or has had the same problem?

Thanks,
Jack.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Slashes Removed From My Post

Post by jackpf »

It happened again here
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Slashes Removed From My Post

Post by McInfo »

I don't see a "suggestion" in this topic...

I think there is a bug in GeSHi (the syntax highlighter used by this forum). Here are some workarounds. The first is the most desirable.

Workaround 1: Use double quotes when you need to use a literal single quote in a string.

Code: Select all

[code=php]echo "'"; 
[/code]

Code: Select all

echo "'"; 
Workaround 2: Use the "text" instead of "php" code type and use a double backslash in place of a single backslash.

Code: Select all

[code=text]echo '\\'';
[/code]

Code: Select all

echo '\'';
Workaround 3: Use two (or three) backslashes and make a notation in your post about the need to convert double backslashes to a single backslash when copying the code. When you edit your post, remember to delete the extra line breaks that get appended to the code.

Code: Select all

[code=php]echo '\\''; 
[/code]

Code: Select all

echo '\\''; 
Edit: This post was recovered from search engine cache.
Last edited by McInfo on Wed Jun 16, 2010 3:10 pm, edited 1 time in total.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Slashes Removed From My Post

Post by jackpf »

Oh yeah...

That kind of sucks though.

I wonder why PHPBB don't just use php's highlight string function....

That's a pretty big bug.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Slashes Removed From My Post

Post by pickle »

PHPBB has not built-in syntax highlighting. We use Geshi. Geshi isn't built to be dependent on any language - they built their highlighting engine & you add new languages with language highlight definition files.

Using the built-in function would make a lot of sense - perhaps we'll do that when/if we move to MyBB.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Slashes Removed From My Post

Post by jackpf »

I just downloaded & installed MyBB on my local machine.

Not impressed :|

I prefer phpBB. Are you guys considering changing over?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Slashes Removed From My Post

Post by Weirdan »

I just checked that code snippet on GeSHi's website - it works properly. Probably we need to consider upgrading.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Slashes Removed From My Post

Post by pickle »

jackpf wrote:I just downloaded & installed MyBB on my local machine.

Not impressed :|

I prefer phpBB. Are you guys considering changing over?
It's nothing official - just a couple of us mods playing around (or planning to at least). MyBB is much more supportive of mods, which will make it much easier for us to provide some of the functionality users are asking for, without adding fear of upgrading.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Slashes Removed From My Post

Post by jackpf »

Hmm...but phpBB has such a huge community behind it. I would have thought there would be more mods for it....

I don't know...I don't dislike MyBB. I just find some of its features annoying. For example, the search feature - why does it display a page with "Your search has been submitted" or something, and then redirect you after a few seconds? Why not just redirect straight to the results? Better yet - why not just display the results on the first page??

Plus phpBB is a lot more stylish...you must admit.

IMO, vBulletin is the best...but you actually have to pay for it!!!!

SMF has some good features, but the layout looks a bit naff. I suppose with a decent theme it'd be pretty cool....

It'd be interesting to get a vote going or something; see what other people think :)

In fact...what would be cool is if we all pooled in, and made our own forum!!!! A bunch of PHP developers - who better for the job?! :D
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Slashes Removed From My Post

Post by pickle »

phpBB does have lots of mods. The trouble is with how they're installed. With phpBB, you have to go into various files & modify the source code. With MyBB, it's just a matter of enabling the mod in the control panel. If all we had to do was modify the code once, that'd be fine. However, we'd need to do that every time we update the forum software. This has resulted in us not installing as many mods as we'd like, nor keeping phpBB up-to-date.

Building our own forum would never happen - too many cooks in the kitchen.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Slashes Removed From My Post

Post by jackpf »

Ahh right, I've never really used phpBB to that extent so I wouldn't know...

That seems stupid though. I would have thought such a popular forum with such a large community would have developed a method of installing mods by now....
Building our own forum would never happen - too many cooks in the kitchen.
Heh, yeah...I guess. Nice analogy.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Slashes Removed From My Post

Post by Eran »

Building our own forum would never happen - too many cooks in the kitchen.
Why not? if everyone agrees on the underlying structure (ie, a particular framework) and some coding standards it can be done. we could split into small teams and write separate modules. why not put up a poll on it?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Slashes Removed From My Post

Post by pickle »

If you want to post that poll, feel free.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Slashes Removed From My Post

Post by Eran »

don't think I won't, cause I might!!

seriously though, would you guys (mods) consider replacing phpBB with a collaboration project of the forum members?
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Slashes Removed From My Post

Post by jackpf »

I posted a poll :D

viewtopic.php?f=7&t=104474

I think that would be a cool idea...even if it wasn't to replace the current forum software, it'd still be fun.
Post Reply