Firefox PHP

Module: BBcode GeSHi (code syntax highlighting)

Posted by Maurice Makaay 
All files from this thread

File Name File Size   Posted by Date  
bbcode_geshi_flyer.png 24.2 KB open | download Maurice Makaay 01/23/2008 Read message
bbcode_geshi-1.0.5.tar.gz 619.1 KB open | download Maurice Makaay 07/24/2011 Read message
bbcode_geshi-1.0.5.zip 826.7 KB open | download Maurice Makaay 07/24/2011 Read message
plaintext.php 1.9 KB open | download Joe Curia 10/06/2008 Read message
missing_toolbar.png 6.6 KB open | download deamon 06/16/2009 Read message
Module: BBcode GeSHi (code syntax highlighting)
January 23, 2008 12:45AM
This module implements syntax highlighting by extending the BBcode "code" tag. It can be used for adding syntax highlighted program code to messages. For highlighting, the excellent GeSHi (Generic Syntax Highlighter) package is used.

Some features for this module:

- Support for more than 200 programming languages and growing (see also the GeSHi website).
- Also supports the phpBB tag [syntax="language"] .... [/syntax] for those who are used to it.
- Support for the Editor Tools module. Implements a nice drop down menu below the code button.
- Easy configuration of the languages that should be shown in the drop down menu.
- Line numbering can be enabled for a code block easily from this drop down menu as well.

Changelog:
----------

2011-07-22 v1.0.5

    - Fixed a really edge-case MSIE8 CSS rendering issue with this module.
      The issue caused MSIE8 to ignore parts of the total CSS code,
      resulting in random page rendering issues.

    - Upgraded the included GeSHi package to version to 1.0.8.10.

    - Fixed PHP warning:
      Deprecated: Function split() is deprecated in ... bbcode_geshi.php

    - Fixed incorrect stripping of leading white space. Only leading white
      lines have to be stripped.

    - Improved rebuilding the CSS cache for this module, by also rebuilding
      it when the bbcode_geshi.php module file is updated. This improves
      rebuilding the cache during module development and after upgrades.

    - The CSS code now only contains the code for the activated languages
      in the module configuration.

2010-06-08 v1.0.4

    - Upgraded the included GeSHi package to version to 1.0.8.8.

2009-06-16 v1.0.3

    - Upgraded the included GeSHi package to version to 1.0.8.4.

2008-01-24 v1.0.2

    - Made the language string case insensitive, so both [code=lang]
      and [code=LANG] will work.

2008-01-24 v1.0.1

    - Minor fix in the CSS to make line number appear correctly in MSIE.

2008-01-23 v1.0.0

    - Initial release.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 8 time(s). Last edit at 07/24/2011 03:20AM by Maurice Makaay.


Attachments:
open | download - bbcode_geshi-1.0.5.tar.gz (619.1 KB)
open | download - bbcode_geshi-1.0.5.zip (826.7 KB)
Re: Module: BBcode GeSHi (code syntax highlighting)
January 23, 2008 01:37AM
Re: Module: BBcode GeSHi (code syntax highlighting)
January 23, 2008 02:22AM
Hey,

This is really cool, been using Geshi in DokuWiki for the longest time, awesome to see it as an option in Phorum.

Thanks!

--
Bert Garcia - When all you have is a keyboard
Re: Module: BBcode GeSHi (code syntax highlighting)
January 24, 2008 01:35AM
Marcus,

IE7 on WinXP is not showing the line numbers: [forum.xpattern.net]

--
Bert Garcia - When all you have is a keyboard



Edited 1 time(s). Last edit at 01/24/2008 05:26AM by hcgtv.
Re: Module: BBcode GeSHi (code syntax highlighting)
January 24, 2008 08:55AM
Who is Marcus? =)

The line numbers are implemented using standard <ol> <li> lists. So it's very strange that you can't see them. I'm on a Linux machine myself, so I'd have to find a Windows machine to test this out myself. I guess it has something to do with the offset of the list numbers. If I look at your page in MSIE6, I see that the numbers are outside the message div box.

Try changing this definition (original = margin: 0) from the mods/bbcode_geshi/templates/emerald/css.tpl to:
#phorum pre.bbcode_geshi ol {
    margin-top: 0;
    margin-bottom: 0;
}


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: BBcode GeSHi (code syntax highlighting)
January 24, 2008 10:50AM
The margin for the <ol> was indeed the problem, as I found out with help of Thomas' MSIE7. Version 1.0.1 contains the fixes CSS code. You can also apply above fix manually.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: BBcode GeSHi (code syntax highlighting)
January 24, 2008 09:42PM
Quote
mmakaay
Who is Marcus? =)

Maurice,

Been bouncing all over the place lately, carrying on 4 or 5 conversations at the same time, I got confused, sorry.

Thanks for the quick fix.

--
Bert Garcia - When all you have is a keyboard
Re: Module: BBcode GeSHi (code syntax highlighting)
January 24, 2008 11:43PM
No problem. I listen to Maurice, Marcus and Marcel too.
People easily call me random names starting with "Ma..." for some reason ;-)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: BBcode GeSHi (code syntax highlighting)
January 26, 2008 11:14PM
Hello Maurice,
i love this module :-))))))))))))))))))))))))))))))))

I have try to make for my Phorum GeSHi into VBA for Excel

I have copied \mods\bbcode_geshi\geshi\geshi\vb.php to a new file "vba_excel.php"
Edit in this File (line 42):
 $language_data = array (
	'LANG_NAME' => 'VBA for Excel',
	'COMMENT_SINGLE' => array(1 => "'"),

and edit the stylesarray (line 105):
	'STYLES' => array(
		'KEYWORDS' => array(
			1 => 'color: #0000FF;'
			),
		'COMMENTS' => array(
			1 => 'color: #008000;'
			),

Make new setting in the adminarea of this Module
The new file works, but my formatingsettings don't work.
I can add other keywords - works well
only my formatchanges don't will change :-(

Have you any idea?

@ all: Anyone interessed for other VBA-Applications as Word, PP, Outlook....?
I have problems with the keywords because i'm only expert in Excel VBA

Thank You
Berti

I speek swabian and german very well - not english :-(

My Phorum on [clever-forum.de]

My testfforum with version 5.2.x is on [test.clever-forum.de] (user: Phorum password: Clever)
Re: Module: BBcode GeSHi (code syntax highlighting)
January 27, 2008 10:02PM
For support on the GeSHi library, I'd like to redirect you to the authors of that package. I merely use its interface and have only briefly looked at the internals. I'm not really up to the task of extending and improving GeSHi and I'd like to keep it that way =)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login