Verfasst: 29.05.2008 08:52
jetzt funktioniert alles, man sollte oben mal den Code anpassen
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Also das finde ioch sinnvoller diese Fette Mod weiter zu entwickeln!dgroeser hat geschrieben:Da könnte man doch einen fertigen Mod machen oder?
Vielleicht sogar diesen Mod weiter entwickeln
Mod
Code: Alles auswählen
/**
* Second parse code tag
*/
/**
* Second parse code tag
*/
function bbcode_second_pass_code($type, $code)
{
// when using the /e modifier, preg_replace slashes double-quotes but does not
// seem to slash anything else
$code = str_replace('\"', '"', $code);
// ------------------------------------------------------------------------------------
// edited by jb (nebler.org)
// including geshi
// geshipfad, relativ zum haupt-ordner (oder absolut (untested))
$geshi_path = './includes/geshi/geshi.php';
if(!include_once( $geshi_path))
{
// include = zur laufzeit, requier zum start
echo 'geshi konnte nicht eingebunden werden!';
}
else
{
//------------------------------If-Schleife implementiert von mrxcptn, um Fehlermeldung zu vermeiden,
//------------------------------wenn man nur [ code ] ohne parameter als bbcode aufruft
if(strlen($type) > 0) //überprüfen ob der typ, der hinter dem [code= steht überhaupt vorhanden ist
{
// Es kommt nicht ursprünglicher Code an ...
// hier die rückformatierung, vllt nicht schön aber selten ;)
// Not the english way ... steht irgendwo im quellcode :)
$astr_to = array('<', '>', '[', ']', '.', ':','"');
$astr_from = array('<', '>', '[', ']', '.', ':','"');
$code = str_replace($astr_from, $astr_to, $code);
// binde geshi ein, siehe geshi-faq
// geshi Objekt erzeugen und code erzeuegn
$geshi = new GeSHi( $code, $type );
// header type setzten, siehe documentation von geshi
$geshi->set_header_type(GESHI_HEADER_NONE);
// code parsen und highlighten
$code = $geshi->parse_code();
// überflüssige <br /> entfernen
$code = str_replace( '<br />', '', $code );
}
}
Code: Alles auswählen
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 1885: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 1885: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 2238: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3187: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3239: implode() [function.implode]: Argument must be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3270: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3270: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3313: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3313: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3458: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3458: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 1885: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 1885: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 2238: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3187: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3239: implode() [function.implode]: Argument must be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3270: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3270: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3313: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3313: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3458: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3458: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 1885: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 1885: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 2238: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3187: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3239: implode() [function.implode]: Argument must be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3270: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3270: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3313: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3313: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3458: array_keys() [function.array-keys]: The first argument should be an array
[phpBB Debug] PHP Notice: in file /includes/geshi/geshi.php on line 3458: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3760: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3762: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3763: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3764: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
Code: Alles auswählen
Code: Alles auswählen
oder z.B. [code=php] verwende...
Woran kann das liegen...
PS: Falls mir jmd nen highlight für LSL (Linden Script Language) hat wäre ich auch dankbar :P