Syntax highlighting

  • (2 Pages)
  • +
  • 1
  • 2

24 Replies - 2649 Views - Last Post: 12 August 2007 - 10:04 AM

#16 ajaymatrix   User is offline

  • D.I.C Regular
  • member icon

Reputation: 1
  • View blog
  • Posts: 410
  • Joined: 15-May 07

Re: Syntax highlighting

Posted 18 June 2007 - 11:24 PM

but there is one wordpress plugin which uses this...
maybe you should read up a bit more on Geshi..
ask some webmaster where this is being used..
I am definite that he/she will help..

Syntax highlighting is awesome...
makes reading the code a pleasure
Was This Post Helpful? 0
  • +
  • -

#17 skyhawk133   User is offline

  • Head DIC Head
  • member icon

Reputation: 1981
  • View blog
  • Posts: 20,434
  • Joined: 17-March 01

Re: Syntax highlighting

Posted 19 June 2007 - 07:05 AM

The problem with implementing it in IPB, is Geshi adds the highlighting when the data is committed to the database, so it adds tons of <span> tags. This works the first time, but when you edit your post it tries to add them again so you end up with double span tags, then triple, and it messes up the post_parser which does [b], [img], [code], etc.

I can do some research and see if there is something new available, but I'm not aware of anything that actually works.

As I've said before, I don't like to modify the forum back end code because it can make upgrading extremely difficult or just plain impossible.
Was This Post Helpful? 0
  • +
  • -

#18 ajaymatrix   User is offline

  • D.I.C Regular
  • member icon

Reputation: 1
  • View blog
  • Posts: 410
  • Joined: 15-May 07

Re: Syntax highlighting

Posted 19 June 2007 - 07:17 AM

I get the point...
any way if you get some time work on it as the results will be rewarding...
Was This Post Helpful? 0
  • +
  • -

#19 Xing   User is offline

  • D.I.C Addict
  • member icon

Reputation: 19
  • View blog
  • Posts: 725
  • Joined: 22-July 06

Re: Syntax highlighting

Posted 11 August 2007 - 08:08 AM

Is there any update on this?
Was This Post Helpful? 0
  • +
  • -

#20 skyhawk133   User is offline

  • Head DIC Head
  • member icon

Reputation: 1981
  • View blog
  • Posts: 20,434
  • Joined: 17-March 01

Re: Syntax highlighting

Posted 11 August 2007 - 01:13 PM

Still not likely.
Was This Post Helpful? 0
  • +
  • -

#21 Louisda16th   User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Syntax highlighting

Posted 11 August 2007 - 09:32 PM

How about having a separate code box just like the snippets. You could have some sort of button which drops down a box (like FastReply or QuickEdit) where you can enter code. I see one problem in this though. You wont be able to show code in between what you type.
Only a suggestion. I know nothing about web design so I don't know if it is easy or not.

This post has been edited by Louisda16th: 11 August 2007 - 09:39 PM

Was This Post Helpful? 0
  • +
  • -

#22 snoj   User is offline

  • Married Life
  • member icon

Reputation: 93
  • View blog
  • Posts: 3,583
  • Joined: 31-March 03

Re: Syntax highlighting

Posted 12 August 2007 - 07:23 AM

That's not the problem though. As Chris earlier stated, the problem is that IPB parses the text from database on the fly. Thus for syntax highlighting would give out HTML code if you went back to edit the post/code later.

Here is Chris' earlier post. You can find the original post in this same thread.

Quote

The problem with implementing it in IPB, is Geshi adds the highlighting when the data is committed to the database, so it adds tons of <span> tags. This works the first time, but when you edit your post it tries to add them again so you end up with double span tags, then triple, and it messes up the post_parser which does [b], [img], [code], etc.

I can do some research and see if there is something new available, but I'm not aware of anything that actually works.

As I've said before, I don't like to modify the forum back end code because it can make upgrading extremely difficult or just plain impossible.

Was This Post Helpful? 0
  • +
  • -

#23 Louisda16th   User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Syntax highlighting

Posted 12 August 2007 - 09:51 AM

What exactly is IPB? I don't know. As I said, Im a dummy as far as web design is concerned. How are the snippet boxes different then?
Was This Post Helpful? 0
  • +
  • -

#24 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1663
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Syntax highlighting

Posted 12 August 2007 - 09:55 AM

View PostLouisda16th, on 11 Aug, 2007 - 09:32 PM, said:

I know nothing about web design so I don't know if it is easy or not.


Trust me, if it was an easy thing Chris would have already done it. Until there is a way to implement it without having the alter the back end code he isn't going to do it, causes way to many problems in the future.
Was This Post Helpful? 0
  • +
  • -

#25 skyhawk133   User is offline

  • Head DIC Head
  • member icon

Reputation: 1981
  • View blog
  • Posts: 20,434
  • Joined: 17-March 01

Re: Syntax highlighting

Posted 12 August 2007 - 10:04 AM

View PostLouisda16th, on 12 Aug, 2007 - 10:51 AM, said:

What exactly is IPB? I don't know. As I said, Im a dummy as far as web design is concerned. How are the snippet boxes different then?


IPB = Invision Power Board

It's the software that runs the forums (and a lot of other areas of the site)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2