Hello everyone,
I did a new mambot .....it's for mambo 4.5.1
You can download it from
bot_mosgeshi_1.0beta.zip
-----------------------------------------------------------------------------------------------------------------------------
What's this?
This is a mambot(content bot) using the popular GeSHi - Generic Syntax Hilighter. It can support Over 30 supported languages: PHP, HTML, C and more. You can get more information at :
http://qbnz.com/highlighter/
This bot will load your code files ouside the content items.(default in "your-mambo-root/codefiles" )
-----------------------------------------------------------------------------------------------------------------------------
Why not directly insert the code lines inside the bot tag (like {moscode}...{/moscode})?
When use the WYSIWYG Editors, they always "EAT" your code characters.
-----------------------------------------------------------------------------------------------------------------------------
The official mambot {moscode} seems to do the same job(I think it will in 4.5.2) ?
When i use the "{moscode}...my code lines...{/moscode}", i often have some troubles. BTW, I can't wait for it and i think the "Load from file" method maybe the another good solution to display formatted code in content items.
How to install it?
1. Use the Mambot install in your administration.
2. Publish it.
3. Configurate the parameters
-----------------------------------------------------------------------------------------------------------------------------
How to use it?
look the tag definition below:
Usagelang ,start, nth is optional)
{mosgeshi file="the_file" lang="the_lang" start="the_start_line_number" nth="the_nth_line_number"}
You MUST assign a file name to the attribute "file", like "test.java", "mambo.php"...etc.
The attribute "lang" has the default value "php".
You can change it to "asp", "java" ,"sql"...any language in the GeSHi.
Or you can configurate the default language in the parameters in this bot.
The attribute "start" is a positive integer using in the line numbering.
You can now make the line numbers start at any number.
The attribute "nth" is a number using in the Fancy line numbering.
Fancy line numbers means that you can specify a different style for each nth line number.
You change the value of n (default 5)