News:

Join the Facebook Fan Page.

Main Menu

GeSHiSmf

Started by AzaToth, September 25, 2005, 06:50:16 PM

Previous topic - Next topic

AzaToth

Link to Mod

A implementation of GeSHI (Generic Syntax Highlighter) for SMF

This is a modification that replace the ordinary code tags, to enable them to syntax highlight code other than php. This is done by parsing the code throught GeSHi and print the result in the post. Support is for  languages like perl, html, c, qbasic etc...

Quote from: GeSHi homepage (http://qbnz.com/highlighter/)GeSHi started as an idea to create a generic syntax highlighter for the phpBB forum system, but has been generalised to this project. GeSHi aims to be a simple but powerful highlighting class, with the following goals:

    * Support for a wide range of popular languages
    * Easy to add a new language for highlighting
    * Highly customisable output formats

GeSHi aims to do this all as quickly as possible. Many customisable features of GeSHi facilitate speed increases, and you can easily find a balance between the amount of highlighting done and the speed in which it is done.

Supported languages:
  • Actionscript
  • ADA
  • Apache Log
  • AppleScript
  • ASM
  • ASP
  • Bash
  • C
  • C for Macs
  • C#
  • C++
  • CAD DCL
  • CadLisp
  • CSS
  • Delphi
  • DIV
  • DOS
  • Eiffel
  • FreeBasic
  • GML
  • HTML
  • Inno
  • Java
  • Javascript
  • Lisp
  • Lua
  • Microprocessor ASM
  • NSIS
  • Objective C
  • OCaml
  • OpenOffice BASIC
  • Oracle 8 SQL
  • Pascal
  • Perl
  • PHP
  • Python
  • Q(uick)BASIC
  • Ruby
  • Scheme
  • SDLBasic
  • Smarty
  • SQL
  • VB.NET
  • Visual BASIC
  • Visual Fox Pro
  • XML


Example:



Usage:

[code=perl]my $var = undef;[/code]


One pulldown menu in default and classic is also implemented:


Only tested on vanilla 1.1 RC1

ExistenZ

WOW! I have been waiting for this ll my life! THANK YOU!
Regards,
Andre

ANARCH¥

arghhh i want this ... for SMF 1.0 RC2.
lol

hmmm sry

AzaToth

Quote from: ANARCH¥ on September 25, 2005, 07:26:35 PM
arghhh i want this ... for SMF 1.0 RC2.
lol

hmmm sry
a reason to upgrade :)

Jazhawk

What does this do exactly?

-Jazhawk

JayBachatero

Quote from: Jazhawk on September 25, 2005, 10:58:00 PM
What does this do exactly?

-Jazhawk

You can use it to highlight syntax code for other programming languages other than php.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Enc0der


AzaToth

If anyone have problem with uninstalling this mod please tell me, if you do not have problem with uninstalling then there is a bug in SMF and you should contact [unknown].

Phoenix Man

Nice.
Just a small add-on, but would you like to add support for the DM language as well?

It's the standard BYOND language. http://developer.byond.com/ [nofollow]

AzaToth

Quote from: Phoenix Man on September 26, 2005, 12:23:48 PM
Nice.
Just a small add-on, but would you like to add support for the DM language as well?

It's the standard BYOND language. http://developer.byond.com/
That I'm sorry you have to speak to the GeSHi developer (http://qbnz.com/highlighter), I have just make the interface for smf.

ArkServer

Could be me.. there is no install option for 1.1 beta 3

AzaToth

Quote from: ArkServer on September 26, 2005, 01:28:37 PM
Could be me.. there is no install option for 1.1 beta 3
Thats because I have no beta3 installation, I don't know exactly whats the difference for RC1 and beta3 is for this kind of mod, You can try to substitute RC 1 to beta 3 Public and see if it works...

ArkServer

Quote from: AzaToth on September 26, 2005, 01:38:09 PM
Quote from: ArkServer on September 26, 2005, 01:28:37 PM
Could be me.. there is no install option for 1.1 beta 3
Thats because I have no beta3 installation, I don't know exactly whats the difference for RC1 and beta3 is for this kind of mod, You can try to substitute RC 1 to beta 3 Public and see if it works...

oh ok, it says it 's compatible with 1.1 beta 3 but  nevermind :P ill keep an eye open for this topic in case you make it 1.1 beta 3 compatible



AzaToth

Quote from: ArkServer on September 26, 2005, 03:49:27 PM
Quote from: AzaToth on September 26, 2005, 01:38:09 PM
Quote from: ArkServer on September 26, 2005, 01:28:37 PM
Could be me.. there is no install option for 1.1 beta 3
Thats because I have no beta3 installation, I don't know exactly whats the difference for RC1 and beta3 is for this kind of mod, You can try to substitute RC 1 to beta 3 Public and see if it works...

oh ok, it says it 's compatible with 1.1 beta 3 but  nevermind :P ill keep an eye open for this topic in case you make it 1.1 beta 3 compatible

I had to choose one, and 1.1 RC1 option isn't there, sorry...


Bosswaiter

VERY nice and very helpful !

Only changed the css (smaller font + no maximum lines) for improved reading.

.geshi {
   color: #000000;
   background-color: #cccccc;
   font-family: monospace;
   font-size: small;
   border: 1px solid #000000;
   margin: 1px auto 1px auto;
   padding: 1px;
   width: 99%;
   overflow: auto;
   white-space: pre;
}


dtm.exe


v3x

Can this be updated for the newest SMF version?

AzaToth

Quote from: v3x on October 02, 2005, 02:04:06 AM
Can this be updated for the newest SMF version?
It's for SFM 1.1 RC1, it's says "Compatible for 1.1 beta3" because  the mod-section isn't updated yet.

v3x

Will it interfere with any of my currently installed mods? Like for example, the arcade button and such.

Edit: I'm talking about the upgrade, not this mod.

Advertisement: