1
wdsl1
Geshi Syntax Highlighting
  • 2005/3/27 22:53

  • wdsl1

  • Just popping in

  • Posts: 39

  • Since: 2004/11/3


Hi,
i have made a liddle bugfix for GeSHi Syntax Highlighting.

- " will not change to \"
and other small things

to Download: heer

mfg
wdsl

2
Mithrandir
Re: Geshi Syntax Highlighting

Any multi-byte support?

3
wdsl1
Re: Geshi Syntax Highlighting
  • 2005/3/28 21:52

  • wdsl1

  • Just popping in

  • Posts: 39

  • Since: 2004/11/3


Sorry how can i test it?

It was didn't used this Funktions.(http://de.php.net/manual/de/function.mb-internal-encoding.php)

But in the Origenal module.textsanitizer it wasn't done too.

Sorry i didn't looked for other charsets until now. But when i can test it i will it include.

mfg
wdsl

4
wdsl1
Re: Geshi Syntax Highlighting
  • 2005/4/8 19:16

  • wdsl1

  • Just popping in

  • Posts: 39

  • Since: 2004/11/3


Sorry i have forgotten to open it for anonymous Visitors. Now it can be downloaded:

http://www.a-bout.de/modules/PDdownloads/singlefile.php?cid=2&lid=2

mfg
wdsl

5
PTlooker
Re: Geshi Syntax Highlighting
  • 2006/3/12 18:47

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Hi,
How can i test this? I tried to use [code] but no highlight happened... [phpcode] doesnt work too... anyone please?

6
wdsl1
Re: Geshi Syntax Highlighting
  • 2006/3/12 19:18

  • wdsl1

  • Just popping in

  • Posts: 39

  • Since: 2004/11/3


yes of course. Give me your Email i will send you my last version.

To heightlight your code you musst use
?>
(or any other programming language)

mfg
wdsl
visit a-bout.de

7
PTlooker
Re: Geshi Syntax Highlighting
  • 2006/3/12 19:22

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Thanks a lot for the attention... please send it to bmcouto@gmail.com
Once again thanks a lot!

8
canbula
Re: Geshi Syntax Highlighting
  • 2006/9/8 10:34

  • canbula

  • Just popping in

  • Posts: 42

  • Since: 2006/7/10


the hack is works perfectly but there is a problem with Turkish characters like ş,ğ,ı,ö,ç...how can I solve this?
hhttp://www.xoops-tr.com - Turkish Xoops

9
canbula
Re: Geshi Syntax Highlighting
  • 2006/9/11 22:05

  • canbula

  • Just popping in

  • Posts: 42

  • Since: 2006/7/10


yes I solve the problem finally..at the end of the module.textsanitizer.php the function geshi_highlight is written..look at old function;

function geshi_highlight$source$language )
    {
        
$source str_replace('"''"'$source);
        include_once(
XOOPS_ROOT_PATH '/class/geshi.php');
        
$language strtolower($language);
        
$source $this->undoHtmlSpecialChars($source);
        
        
        
// Create the new GeSHi object, passing relevant stuff
        
$geshi = new GeSHi($source$languageXOOPS_ROOT_PATH '/class/geshi/');
        
// Enclose the code in a 

        $geshi->set_header_type(GESHI_HEADER_PRE);
        
        
// Turn CSS classes on to reduce output code size
        
$geshi->enable_classes();

        
// Parse the code
        
$code $geshi->parse_code();
        
// Remove 's added by GeSHi - they are added by phpBB later anyway
        
$code str_replace(''''$code);
        
        return 
$code;
    }


I made some changes and now the hack is cool following chars;

function geshi_highlight$source$language )
    {
        
$source str_replace('"''"'$source);
        include_once(
XOOPS_ROOT_PATH '/class/geshi.php');
        
$language strtolower($language);
        
$source $this->undoHtmlSpecialChars($source);
        
        
        
// Create the new GeSHi object, passing relevant stuff
        
$geshi = new GeSHi($source$languageXOOPS_ROOT_PATH '/class/geshi/');
        
// Enclose the code in a 

        $geshi->set_header_type(GESHI_HEADER_PRE);
        
        
// Turn CSS classes on to reduce output code size
        
$geshi->enable_classes();

        
// Parse the code
        
$code $geshi->parse_code();
        
// Remove 's added by GeSHi - they are added by phpBB later anyway
        
$code str_replace(''''$code);
            
// Added By Bora Canbula to show Turkish chars
        
$code str_replace('ð''ğ'$code);
        
$code str_replace('ý''ı'$code);
        
$code str_replace('þ''ş'$code);
        
$code str_replace('Ð''Ğ'$code);
        
$code str_replace('Ý''I'$code);
        
$code str_replace('Þ''Ş'$code);
        

        return 
$code;
    }


that's all..if anybody has a problem in his own language..can do the same thing
[/code]
hhttp://www.xoops-tr.com - Turkish Xoops

Login

Who's Online

440 user(s) are online (328 user(s) are browsing Support Forums)


Members: 0


Guests: 440


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits