Seite 2 von 2

Verfasst: 09.11.2006 18:38
von IPB_Flüchtling
Ahoi,

also zumindest dass [ size ] und [ color ] nicht geparst wird, ist nicht überraschend. Das hier ist der BBCode-Teil Deiner grabber.php:

Code: Alles auswählen

// BB-Code processing
            
            // Extra character removal (these characters are identifiers that
            // are concatenated into the BB-code commands themselves in order
            // to help phpBB track appropriated opening and closing commands).
            $topic_text = preg_replace("/\:[0-9a-z\:]+\]/si", "]", $topic_text);
            // Bold
            $topic_text = str_replace("[b]", "<B>", $topic_text);
            $topic_text = str_replace("[/b]", "</B>", $topic_text);
            // Italics
            $topic_text = str_replace("[i]", "<I>", $topic_text);
            $topic_text = str_replace("[/i]", "</I>", $topic_text);
            // Underline
            $topic_text = str_replace("[u]", "<U>", $topic_text);
            $topic_text = str_replace("[/u]", "</U>", $topic_text);
            // Quote (style #1)
            $topic_text = preg_replace("/\[quote=(.*)\](.*)\[\/quote\]/Usi", "<DIV STYLE=\"padding: 7px\">$2</DIV>", $topic_text);
            // Quote (style #2)
            $topic_text = str_replace("[quote]", "<B>Quote:</B><BR><I>", $topic_text);
            $topic_text = str_replace("[/quote]", "</I>", $topic_text);
            // Code
            $topic_text = str_replace("[code]", "<B>Code:</B><BR><I>", $topic_text);
            $topic_text = str_replace("
", "</I>", $topic_text);
// List
$topic_text = preg_replace("/\[list\](.*)\[\/list\]/si", "<DIV STYLE=\"padding: 7px\">$1</DIV>", $topic_text);
$topic_text = preg_replace("/\
  • (.*)\[\/list\]/si", "<DIV STYLE=\"padding: 7px\">$1</DIV>", $topic_text);
    // Image
    $topic_text = str_replace("[img]", "<IMG SRC=\"", $topic_text);
    $topic_text = str_replace("[/img]", "\" ALT=\"Image\">", $topic_text);
    // URL
    $topic_text = preg_replace("/\[url\](.*)\[\/url\]/Usi", "<A HREF=\"$1\" TARGET=\"_blank\">$1</A>", $topic_text);
    $topic_text = preg_replace("/\[url=(.*)\](.*)\[\/url\]/Usi", "<A HREF=\"$2\" TARGET=\"_blank\">$2</A>", $topic_text);
    // Endlines
    $topic_text = str_replace("\n", "<BR>\n", $topic_text);[/code]

    Du könntest das Ganze jetzt anhand dieser Vorlage und des Codes, den Du in der bbcode.php findest, anzupassen versuchen.

    Allerdings verstehe ich nicht, weshalb Du statt des phpBB Latest Topic Displayer nicht einfach den Recent Topics Mod und/oder den ForumSpy nimmst. Würde Dir vermutlich einiges an Arbeit ersparen.

    LG, Wolfgang

Verfasst: 09.11.2006 19:39
von kolja
danke erstmal für deine hilfe

werd mich mal dem vergleichen hingeben

diesen grabber möchte ich nutzen, weil alles so schön kompakt ist

werd mir aber mal kurz deine beiden angebote anschauen

danke kolja

Verfasst: 09.11.2006 20:46
von kolja
ich hab mir diese bbcode sache mal genauer angeschaut

wie schon gesagt fehlen in dem grabber script die bbc: size und color
das sind auch die einzigen beiden, die mehr als einen eintrag, genauer mehr als zwei pro bbcode brauchen
-durch die angabe der grösse bzw farbe-

jetzt könnte man natürlich für jede farbe bzw grösse einen eigenen code schreiben,
find ich aber unelegant...

desshalb versuchte ich, per include die includes/bbcode.php zu integrieren

Code: Alles auswählen

  define("IN_PHPBB", true);
  include($phpbb_root_path . "extension.inc");
  include($phpbb_root_path . "common.".$phpEx);
  include($phpbb_root_path . "config.".$phpEx);
  include($phpbb_root_path . "/includes/bbcode.".$phpEx);
leider hat dies keine auswirkungen...(am / vor dem verzeichnis liegt es nicht)

sollte doch, oder ??

kolja

Verfasst: 09.11.2006 23:53
von area57
Moin,

entferne mal das / vor includes ;)

Verfasst: 16.11.2006 11:09
von kolja
also ich habe jetzt die schriften deren farben und grössen per hand eingefügt
(naja noch nicht alle, aber zumindest ist es jetzt nur noch fleissarbeit..)


nun wollte ich auch einen flash mp3 player einschreiben,
schaffe es aber nicht, ohne bbcode.tpl auszukommen

will sagen, ich schaffe es nicht das was als variable ([$bbcode_tpl['code_open'])
aus der .tpl

kommt direkt in die grabber.php zu schreiben

Code: Alles auswählen

<!-- BEGIN mp3 -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="20"
		codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" >
    <param name="movie" value="flash_mp3_player/mp3player.swf" />
    <param name="flashvars" value="file={MP3}&autostart=false" />
    <embed src="flash_mp3_player/mp3player.swf" width="300" height="20" flashvars="file={MP3}&autostart=false" 
    	type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>    
<font size="1" class="gensmall"><a href="http://www.jeroenwijering.com/" target="jw">Core flash mp3 script</a> || <a href="http://www.phpbbinstallers.com">PhpBBinstallers installation</a></font>
<!-- END mp3 -->
das wäre der letzte bbcode den ich brauche,
dannach nur noch das layout

natürlich werde ich wenn alles fertig ist das ganze (mit dem hinweis, das der grösste teil nicht von mir kommt)
hier mal veröffentlichen

bisherigenr stand:

www.mona-davinci.de/phpbb/grabber.php

kolja