', '', $code);
$code = str_replace('
', '
', $code);
$string = str_replace($result[2][$i],$code,$string);
$i ++ ;
}
$string = preg_replace('%\[code([^\]]*)\](.*?)\[/code\]%si', '$2', $string);
return $string;
}
$language = "html";
if($_POST['lang'] != '' )$language= $_POST['lang'];
if( strlen( $_POST['code'] ) > 2 ){
$geshi = new GeSHi($_POST['code'], $language);
$geshi->set_header_type(GESHI_HEADER_DIV);
$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
$out = str_replace("‘","'",$geshi->parse_code() ) ;
$out = str_replace("’","'",$out ) ;
$out = str_replace("”","\"",$out ) ;
$out = str_replace("“","\"",$out ) ;
$out = "".$out."
";
echo stripslashes( $out );
}
else{// star plugin function
if(function_exists('get_bloginfo')) $BlogUrl = @get_bloginfo('siteurl');
else $BlogUrl = '';
$ThisPluginUrl = $BlogUrl. '/wp-content/plugins/ajaxcoderender/';
define('ThisPluginUrl',$ThisPluginUrl);
if( !function_exists('AjaxCodeRenderCss') ){
function AjaxCodeRenderCss(){
echo '';
}
}
if( !function_exists('AjaxCodeRenderJs') ){
function AjaxCodeRenderJs(){
echo '';
}
}
if( !function_exists('RenderCodeJs') ){
function RenderCodeJs(){?>