BETA/SOON
You are not logged in.
Pages: 1
Topic closed
some text
some text
some text
some text
some text
test
default:
/*** 2011-02-06 BEGIN AmigoJack
GeSHi additional syntax highlighting ***/
// Force case insensitivity
$stx= strtolower( $stx );
switch( $stx ) {
case '': // Failsafe: no programming/script language given? Pseudo name to prevent warnings
$sStxGeshi= 'no_code_lang_given';
break;
case 'html': // Custom (short) alias
$sStxGeshi= 'html4strict';
break;
case 'js': // ...another custom (short) alias
$sStxGeshi= 'javascript';
break;
case 'c++': // ...and another custom (short) alias - define your own ones this way
$sStxGeshi= 'cpp';
break;
default: // Use as exactly given
$sStxGeshi= $stx;
break;
}
// Import GeSHi, resolve entities and instantiate object
global $phpbb_root_path, $phpEx;
include_once( $phpbb_root_path. 'includes/geshi/geshi.'. $phpEx );
$oGeshi= new GeSHi( html_entity_decode( $code ), $sStxGeshi );
// In case of errors (no syntax highlighting found) return normal code box
if( $oGeshi-> error() ) {
// phpBB's original single code line in this case block
return '[code:'. $this-> bbcode_uid. ']'. $this-> bbcode_specialchars( $code ). '[/code:'. $this-> bbcode_uid. ']';
}
// Render syntax highlighting
$oGeshi-> set_header_type( GESHI_HEADER_NONE ); // No wrapper
$oGeshi-> set_line_ending( "\n" ); // Prevent nl2br()
return "[code=$stx:\". $this-> bbcode_uid. ']'. $oGeshi-> parse_code(). '[/code:'. $this-> bbcode_uid. ']';
//return '[code:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($code) . '[/code:' . $this->bbcode_uid . ']';
/*** 2011-02-06 END ***/
test
http://www.youtube.com/watch?v=JXOfH16TxIE
testttt
[hide]test[/hide]
Offline
Pages: 1
Topic closed
[ Generated in 0.015 seconds, 8 queries executed - Memory usage: 1.44 MiB (Peak: 1.51 MiB) ]