Seite 2 von 3

Verfasst: 29.05.2008 08:52
von DoctorUltra
jetzt funktioniert alles, man sollte oben mal den Code anpassen

Verfasst: 08.08.2008 12:22
von DoctorUltra
Was mir noch aufgefallen ist im Board3 Portal funktioniert die anzeige nicht richtig es werden keine Farben angezeigt, es schaut aus wie der normale code?

Verfasst: 11.10.2008 15:59
von Phisker
dgroeser hat geschrieben:Da könnte man doch einen fertigen Mod machen oder?

Vielleicht sogar diesen Mod weiter entwickeln

Mod
Also das finde ioch sinnvoller diese Fette Mod weiter zu entwickeln!

Re: GeSHi in phpBB3 (3.0.1) einbinden

Verfasst: 06.01.2009 00:20
von mrxcptn
Ich habe das ganze einmal ausprobiert, funktioniert auch alles wunderbar, so lange bis man nur [ code ] als Tag angibt.
Weil ich ein bisschen php kann, google verwenden kann und gerne ein wenig bastle, hab ich den Bug behoben.
Er liegt in der bbcode.php
Das hier ist meine überarbeitete Version von dem was man einfügen muss:

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 );
                          }
		}
Ich verwende übrigens phpBB 3.0.4, dort funktioniert das ohne probleme

Re: GeSHi in phpBB3 (3.0.1) einbinden

Verfasst: 06.01.2009 19:24
von Boecki91
http://code.google.com/p/phpbb3-geshi/

Das ist das was wir damals gebastelt haben, wurde aber nie veröffentlicht. Wenn das jemand nutzen will, von meiner Seite aus gerne, steht schließlich unter GPL.

Re: GeSHi in phpBB3 (3.0.1) einbinden

Verfasst: 28.02.2009 14:13
von bugses
DE: Ich habe ein Problem mit meinem Forum phpbb3 v3.0.4, forum.android.com.pl
Ich habe geshi auf meinem Forum und ich habe einen Fehler wie den folgenden:

EN: I have a problem with my forum phpbb3 v3.0.4, forum.android.com.pl
I have installed geshi on my forum and I have a error like this:

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)

DE: Können Sie mir helfen?
Sorry für mein Deutsch, aber ich bin aus dem Englischen zu übersetzen.

EN: Could you help me?
Sorry for my Deutsch, but I'm translate to from English.

Re: GeSHi in phpBB3 (3.0.1) einbinden

Verfasst: 28.02.2009 14:20
von jerikool
Kann mir bitte einer erklären was GeShi ist? Was soll ein Syntax Highlighter sein? :S

Re: GeSHi in phpBB3 (3.0.1) einbinden

Verfasst: 28.02.2009 17:36
von test_nick
Ich verstehe die Anleitung nicht wirklich.

Bitte erklärt mir bzw. giebt mir die Stellen die ich mit einer Ersetzen muss.....

Jan

Re: GeSHi in phpBB3 (3.0.1) einbinden

Verfasst: 28.02.2009 18:13
von bugses
DE: Ich habe diesen Fehler, wenn ich geshi unter phpbb3.
Ich denke, dass diese Datei auch: bbcode.php machen das Problem.

Wenn Sie PHPBB3 und Sie haben keine Probleme mit geshi, bitte senden Sie mir diese Datei, so dass ich versuchen Sie zu vergleichen mit meinem bbcode.php

EN: I have this error when I use geshi under phpbb3.
I think that this file is: bbcode.php make the problem.

If you use PHPBB3 and you do not have any problem with geshi, please send me this file, so I try to compare with my bbcode.php

Große Bilder bitte nur verlinken - KB:16 - JFooty
http://android.com.pl/blad%20geshi.jpg
Große Bilder bitte nur verlinken - KB:16 - JFooty

Re: GeSHi in phpBB3 (3.0.1) einbinden

Verfasst: 12.03.2009 10:42
von cyberghost66
Hallo zusammen...

Zumindest habe ich hier mal eine Anleitung gefunden, die (wenn man sie zu 100% befolgt) nicht das komplette Forum zerschiesst.

Allerdings habe ich trotzdem noch ein Problem, was das ganze im Endeffekt zunicht macht.

Nachdem ich alle oben genannten änderungen an den Dateien vorgenommen habe wird bei mir der KOMPLETTE Bereich überhaupt nicht mehr im Post angezeigt.... :(

Inklusive der Tags.

Dabei ist es egal, ob ich nun NUR

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