[BETA] SMF Syntax Highlighter

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

Previous topic - Next topic

X3mE

Everyone can download and test it :)

It's attached in the first post on page 1 of this topic.
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



kromonos

Could you add a description for manual installation? .. please .. for smf1.1.8

Axcess

blocks of c code with includes have a

</stdio.h> appended to them, which is not accurate. I think this is because of the
#include <stdio.h> at the beginning of the block

I'll attach a pic.

X3mE

There will be an update soon, updating the background "engine" which does the highlight, I suppose many of the highlighting errors will be fixed.

Can't say exactly when, as I'm overwhelmed with studies and work obligations, but I'll do my best to find some time.
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



jpaulino

X3mE,

Great job!

I only found a problem until now: it doesn't work with WYSIWYG editor  :(

Are you planning to include that ?

X3mE

What exactly is the problem with WYSIWYG?
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



jpaulino

Quote from: X3mE on April 27, 2009, 01:21:36 PM
What exactly is the problem with WYSIWYG?

Hi,

The problem is that the tags doesn't show in the editor after you select the code. It works very fine with the regular editor but with that one don't.

I got an javascript error:

QuoteWebpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.1)
Timestamp: Mon, 27 Apr 2009 17:52:16 UTC

Message: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
Line: 401
Char: 3
Code: 0
URI: http://www.-----.org/testplatform/forumteste/Themes/default/scripts/script.js?rc1


Thanks for the reply!

cut|throat

hi there.
this is a brilliant mod. been looking for one of these everywhere.
any chance of an update to working with 2.0 rc1?
cheers.

X3mE

Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



cut|throat

thank you very much for this.
just to confirm, this works fine on 2.0 RC1.1 :D
brilliant mod.
i would donate but im afraid i'm pretty strapped for cash. ill donate when i can ;).

one feature request that would be great though, is for it to all be in a small scrolling box rather than all stretched out for long codes.

Daniel15

Before you submit it to the mods site, I suggest you change 1.0 - 1.99.99 to 1.1 - 1.1.99 in the mod file, unless you actually *did* test with SMF 1.0 ;)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

cut|throat

Hi I may have spotted a potential security risk or it may just be an annoying bug but it should be fixed either way.
The php code tags (possibly other web development languages too) some of the code actually displays.
Like for example text fields sometimes display etc.
Hope this helps :)

islam2hamy

#52
nice mod
When it will be submited in the mod site ??

Arabic translation (utf-8) :

$txt['SMF_Syntax_Highlighting'] = 'شفرة برمجية';
$txt['SMF_Syntax_Highlighting_C'] = 'C';
$txt['SMF_Syntax_Highlighting_Csharp'] = 'C#';
$txt['SMF_Syntax_Highlighting_Cpp'] = 'C++';
$txt['SMF_Syntax_Highlighting_ColdFusion'] = 'ColdFusion';
$txt['SMF_Syntax_Highlighting_CSS'] = 'CSS';
$txt['SMF_Syntax_Highlighting_Delphi'] = 'Delphi';
$txt['SMF_Syntax_Highlighting_HTML'] = 'HTML';
$txt['SMF_Syntax_Highlighting_Java'] = 'Java';
$txt['SMF_Syntax_Highlighting_JavaScript'] = 'JavaScript';
$txt['SMF_Syntax_Highlighting_Pascal'] = 'Pascal';
$txt['SMF_Syntax_Highlighting_Perl'] = 'Perl';
$txt['SMF_Syntax_Highlighting_PHP'] = 'PHP';
$txt['SMF_Syntax_Highlighting_PlSQL'] = 'Pl/SQL';
$txt['SMF_Syntax_Highlighting_Python'] = 'Python';
$txt['SMF_Syntax_Highlighting_Ruby'] = 'Ruby';
$txt['SMF_Syntax_Highlighting_SQL'] = 'SQL';
$txt['SMF_Syntax_Highlighting_VB'] = 'Visual Basic';
$txt['SMF_Syntax_Highlighting_VBNET'] = 'VB .NET';
$txt['SMF_Syntax_Highlighting_XML'] = 'XML';
$txt['SMF_Syntax_Highlighting_XHTML'] = 'XHTML';


please before put the translation in the file be sure that the file encode is UTF-8

Arabic Translator - Web Designer
My Mods / My Themes  //  GfxLand





ViRuXe

Nice mod. ;)

How can we add another programming language to it?

silvios

#54
Aw just the mod i was looking for. Why the ****** wouldnt gesi work with SMF, if its open sourced why wouldnt we be able to use it with this forum software?

Either way this one ur using looks nicer overall, just doesnt support as many languages

Arantor

Because you need to integrate the two. GeSHi on its own doesn't have anywhere to link to SMF, so you have to add code to link the two. I just don't think it's been fully done yet.

青山 素子

GeSHi is under the GPL, and the license interaction with SMF keeps it from being used. If the developers were to use a less restrictive license, I don't think there would be such a problem.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Dipa

I have a problem with operator "<"
like Axcess when have problem with include

if i want #include <name.h>
dint work
like cout<<variable<<endl;
endl error
variable error
name.h error

if i set cout<<  variable<<  endl;
works, but....can fixed that ??




MrCreatoR

Nice mod.
Is there a language file for AutoIt syntax highlighting?

P.S
The copy link does not working in Opera browser.

bbqau

#59
Really nice customisation, works a treat for programming oriented sites :)

however my current theme seems to override how code is displayed :( on the default theme it works fine, however on anything other than SMF's default theme, the nice code block and line numbering simply do not show up. Is there a setting i am missing or some kind of configuration.

The theme i am using is DarkZ ~ http://custom.simplemachines.org/themes/index.php?lemm

Advertisement: