Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
9 - 3 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Geshi Syntax Highlighting
by canbula on 2006/9/11 22:05:34

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

le="color: #000000"><?php 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, $language, XOOPS_ROOT_PATH . '/class/geshi/'); // Enclose the code in a <div> $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 <br />'s added by GeSHi - they are added by phpBB later anyway $code = str_replace('<br />', '', $code); return $code; }


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

le="color: #000000"><?php 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, $language, XOOPS_ROOT_PATH . '/class/geshi/'); // Enclose the code in a <div> $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 <br />'s added by GeSHi - they are added by phpBB later anyway $code = str_replace('<br />', '', $code); // Added By Bora Canbula to show Turkish chars $code = str_replace('&eth;', '&#287;', $code); $code = str_replace('&yacute;', '&#305;', $code); $code = str_replace('&thorn;', '&#351;', $code); $code = str_replace('&ETH;', '&#286;', $code); $code = str_replace('&Yacute;', 'I', $code); $code = str_replace('&THORN;', '&#350;', $code); return $code; }


that's all..if anybody has a problem in his own language..can do the same thing
[/code]
Re: Geshi Syntax Highlighting
by canbula on 2006/9/8 10:34:21

the hack is works perfectly but there is a problem with Turkish characters like ş,ğ,ı,ö,ç...how can I solve this?
Re: Geshi Syntax Highlighting
by PTlooker on 2006/3/12 19:22:02

Thanks a lot for the attention... please send it to bmcouto@gmail.com
Once again thanks a lot!
Re: Geshi Syntax Highlighting
by wdsl1 on 2006/3/12 19:18:10

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

To heightlight your code you musst use
le="color: #000000"><?php
(or any other programming language)

mfg
wdsl
Re: Geshi Syntax Highlighting
by PTlooker on 2006/3/12 18:47:24

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

Who's Online

232 user(s) are online (186 user(s) are browsing Support Forums)


Members: 0


Guests: 232


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits