Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Re: geshi code beautifier

posts: 6

Danke schön Pi

Ifinally understood what was wrong in my code ( although it wasn't the string replace...but your idea let me go in the right direction😛)

As I have always the allowhtml, I needed to have Tiki not to read my code after geshi: just insert pp and that is it!!

Ok, so jezt ist mein Code farbenvol 😁

Copy to clipboard
function wikiplugin_code($data,$params) { require_once("lib/wiki-plugins/geshi.php"); extract($params); $geshi = new GeSHi($data, strtolower($lg), "lib/wiki-plugins/geshi"); $geshi->set_header_type(GESHI_HEADER_PRE); $geshi->enable_classes(); $geshi->set_overall_class('code'); $data = $geshi->parse_code(); $data = ("~pp~".$data."~/pp~"); return $data; }



Thanks again
Vendo

There are no comments at this time.

Upcoming Events

1)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3) 
Tiki birthday
4)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting