News:

Wondering if this will always be free?  See why free is better.

Main Menu

[BETA] SMF Syntax Highlighter

Started by X3mE, February 02, 2009, 11:43:32 AM

Previous topic - Next topic

wilkolak

Is it in development any more..?

It would be nice to see a version based on SyntaxHighlither 2.0 and running on smf 2.0 RC2
Can you do it?

Sirius OCTeam

I'm into it, but still with the Syntax Highlighter 1.5.1

The Syntax Highlighter 2.1.364 is pretty hard to implement and this is some work to do.

My version 2.0a of this MOD (RC2 only) is already running on my test board, but can't find the way to implement the dropdownlist, I'm not the only one who want to put another dropdownlist to the editor, but nobody's want to tell us how to ?
http://www.simplemachines.org/community/index.php?topic=345402.0

So for the moment I must use the BBcode button with the type of code.

Arantor

It isn't so much that no-one wants to, more like no-one really knows outside the dev team. To my knowledge that other thread is the only place it's been discussed.

Satan911

So any idea when you are going to have a new version? The one you have there seems good but I'd like something stable to put on my forum. The new forum I have working isn't going public before 1 month so if you are going to release something better within that month I'll wait. But the community I work for has more that 10 000 users and many coders who will enjoy this function if it's working properly.

Great work by the way! (and the person who developed this syntax highlighter is even greater, sorry :P)

Sirius OCTeam

#64
If you want to give it a try

Notes:

  • Alpha stage
  • Doesn't work with quick edit (at this time)
  • Only for SMF 2.0 RC2

Satan911

Well I'm running RC1.2 at the moment. Guess I should update to RC2 but I have a lot of mods installed. I'll contact you later maybe.

wilkolak

#66
2.xx doesn't give many more functionality. It will be nice to run it but if it is hart to implement then it isn't must have I think... Not for me for sure. ;)

I've installed your beta, and it runs. But it destroyed linebreaks in my code. Please see the attachment.
If I add html <br/> it breaks the line... but it is impossible to do in 100lines code...
Also it would be nice if you fix the < > problem.

Informatics

Quote from: wilkolak on November 19, 2009, 08:17:30 PM
2.xx doesn't give many more functionality. It will be nice to run it but if it is hart to implement then it isn't must have I think... Not for me for sure. ;)

I've installed your beta, and it runs. But it destroyed linebreaks in my code. Please see the attachment.
If I add html <br/> it breaks the line... but it is impossible to do in 100lines code...
Also it would be nice if you fix the < > problem.

yeah, me too.... and we should change < into &lt;and > into &gt; manually


You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id




Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

wilkolak


t0nedef

Can't wait till you get this working guys, my board could really use this! ( on a side note, I've downloaded the package and seeing if I can't hack the source into shape... I'll keep you posted. So if these guys don't get it done, I'm going to do my best to ensure there is something out there )

eattheword

#70
I love this mod and want to use it for a work-related site. Here's my problem: I need to support ActionScript 3.0 syntax. I have created a shBrushAS3.js brush. If I copy that to the js directory on the server and manually edit the Subs.php file to include 'shBrushAS3' in the appropriate array then everything works fine.

If I add the shBrushAS3.js to the mod's zip file and upload and install the package that way it works ok, but obviously I need to edit the install-1.x.xml file to reflect the new array value. So, if I extract the install-1.x.xml file, amend it accordingly, and put it back into the zip file, I can upload the mod, but when I try to apply it I get a "Modification parse error". Even if all I do is extract install-1.x.xml from the zip and put it back again unchanged I still get this error.

Any clues as to what I should be doing differently?

[EDIT] Ok, sussed it. It seems there is something in the way OS X zip applications which produces archives that SMF doesn't like. I fired up VMware, opened a Windows session and did the file changes using 7zip. And it worked fine.

So, anyone got any workarounds for how to modify the zip files on OS X without having to resort to opening a Windows session?

[EDIT2] And how do you integrate it with other themes? I followed the link two pages back but the page concerned doesn't seem to address this.

[EDIT3] Ok, solved it. If you want to use this mod with other themes, here's what you do. Using the theme editor in the SMF admin panel, edit the 'index.template.php' file for each theme you want to apply Syntax Highlighter to.

Find:

<title>', $context['page_title'], '</title>';


And put this beneath it:


// Syntax Highlighting javascript...
syntaxHighlightingJavascript();


Then, find Sources/Subs.php and edit that. You need to find the 'function syntaxHighlightingJavascript()' section. Inside that function replace every occurrence of
theme_url with default_theme_url. I think there were four occurrences.

And that should do it.

prisonhunter

I typed [code =C++] CODE [/ code] (no spaces ofc) and why do I have this?

Thank you in advance. :)

johnny mercy

People I need some help!!

My version is 2.0 RC3 and when I try to install it doesn't work!! (Many tests not passed)

What should I do?
Thanks


johnny mercy

I've tried that but I can't get it to work :S
Maybe I'm doing something wrong..

What version should I download to work with 2.0 RC3?
Thanks

Bugo

Quote from: johnny mercy on July 10, 2010, 04:43:25 PM
I've tried that but I can't get it to work :S
Maybe I'm doing something wrong..

What version should I download to work with 2.0 RC3?
Thanks

Yes, it works with 2.0 RC2-RC3.

Simple paste your code between tags [ code=language] ... [/code ]
Example (w\o spacebars):
Quote[ code=xml]xml-code[/code ]

johnny mercy

What version should I download? Your version?

And where should I put that code? xD (i'm little noob when it comes to install mods manually)

Thanks

RockerMan

#77
OK so I have installed this mod and I am just getting this...


Can anyone help me please?
My forum is version 2 RC3 and the link is graphics-post.com [nofollow]

Thanks in advance,
Mike

flapjack

Quote from: RockerMan on August 09, 2010, 03:49:18 PM
OK so I have installed this mod and I am just getting this...


Can anyone help me please?

Thanks in advance,
Mike

You can start here: How do I ask support questions the smart way?

RockerMan

Dude, I only forgot the link and version....

Added it

Advertisement: