Verfasst: 26.04.2006 19:02
Danke, ich werde die mal einbauen...
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
This hack will add a new flash bbcode to your forums.
The bbcode will look like this [swf width=# height=#]url[/swf]
The bbcode will not work if width or height is left out.
This also adds buttons to your posting page so users can add flash easily.
These instructions are based on a fresh install of phpBB 2.0.4 with no other bbcode hacks installed.
If you have other bbcode hacks installed follow the directions very carefully.
Make sure you backup your files before installing this hack.
This hack was created by Curtis Sanderson. ( sanderson_250@yahoo.com )
This hack was modified by Ted Herman (kazoom@sympatico.ca) to provide functionality with phpBB 2.0.4.
Speak to Curtis if you have problems, I cannot provide support as I only modified the hack, I did not write it.
This hack will only work in phpBB 2.0.4. If you are using a newer version, try this, but it may not work.
If you are using an older version of phpBB 2, download the older hack at http://www.phpbbhacks.com/viewhack.php?id=487
Support for this and other hacks can be found at http://phpbbhacks.com/forums/
---- Open /includes/bbcode.php -----
----- Find: -----
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
----- After add: -----
$bbcode_tpl['swf'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['swf']);
$bbcode_tpl['swf'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['swf']);
$bbcode_tpl['swf'] = str_replace('{URL}', '\\3', $bbcode_tpl['swf']);
----- Find: -----
// [email]user@domain.tld[/email] code..
$patterns[] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];
----- After add: -----
// [swf width=# height=#]filename[/swf]
$patterns[] = "#\[swf width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]):$uid\](.*?)\[/swf:$uid\]#si";
$replacements[] = $bbcode_tpl[swf];
----- Find: -----
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^ \n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text);
----- After add: -----
// [swf width=# height=#]url[/swf]
$text = preg_replace("#\[swf width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/swf\]#si","[swf width=\\1 height=\\2:$uid\]\\3[/swf:$uid]", $text);
----- Save, close, and upload -----
----- Open /posting.php -----
----- Find: -----
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
----- After add: ----- If you've installed other bbcode hacks you may already have a 'L_BBCODE_R_HELP' defined. In that case pick a letter that hasn't been used and use it instead of r in this hack. If you changed the letter in this step make sure you change it in all steps.
'L_BBCODE_R_HELP' => $lang['bbcode_r_help'],
----- Save, close, and upload -----
----- Open /language/lang_english/lang_main.php -----
----- Find: -----
$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';
----- After add: -----
$lang['bbcode_r_help'] = 'Flash: [swf width=# height=#]http://swf_url[/swf]';
----- Save, close, and upload -----
----- Open /templates/subSilver/bbcode.tpl -----
----- Find: -----
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
----- After add: -----
<!-- BEGIN swf -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width={WIDTH} height={HEIGHT}>
<param name=movie value={URL}>
<param name=quality value="best">
<param name=menu value=false>
<param name=wmode value=transparent>
<embed src="{URL}" quality=best wmode=transparent width={WIDTH} height={HEIGHT} type="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>
<!-- END swf -->
----- Save, close, and upload -----
----- Open /templates/subSilver/posting_body.tpl -----
----- Find: -----
f_help = "{L_BBCODE_F_HELP}";
----- After add: -----
r_help = "{L_BBCODE_R_HELP}";
----- Find: ----- In the rest of these steps pay close attention to the numbers if you've installed other bbcode hacks. The numbers should increase by 2 for each bbcode.
<td><span class="genmed">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
</span></td>
----- After add: -----
<td><span class="genmed">
<input type="button" class="button" accesskey="r" name="addbbcode18" value="Flash" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('r')" />
</span></td>
----- Find: ----- If you have other bbcode hacks installed do not replace but add ,'[swf width= height=]','[/swf] onto the end so it looks like ,'[swf width= height=]','[/swf]');
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
Code: Alles auswählen
','
Wenn ich abschicken will, kommt das da:[marq=left]test[/marq]
Wenn ich Flash einfügen will, benutze ich diesen Code:Fatal error: Call to undefined function: e() in C:\Programme\xampp\htdocs\modhackforum\box\forum\includes\bbcode.php on line 246
Fehlermeldung dazu:[flash width=500 height=250]http://localhost/intro.swf[/flash]
Gleiche Meldung wie oben
Code: Alles auswählen
##############################################################
## MOD Title: Flash MOD 2.0.11
## MOD Author: smithy_dll < davidls14 AT yahoo DOT com DOT au > (David Smith) http://phpbbstuff.ddblog.org/
## MOD Description: Flash BBcode tag MOD, with quick access buttons.
## MOD Version: 2.0.11
##
## Installation Level: Easy
## Installation Time: 12 minutes
## Files To Edit: includes/bbcode.php
## language/lang_english/lang_main.php
## templates/subSilver/bbcode.tpl
## templates/subSilver/posting_body.tpl
## Included Files:
## Generator: MOD Studio 3.0 Beta 1 [mod functions 0.4.1721.37118]
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## You must have Multiple BBCode MOD installed for this to work.
## Get it here: http://www.phpbb.com/phpBB/viewtopic.php?t=74705
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$EMBB_widths = array(''
#
#-----[ IN-LINE FIND ]------------------------------------------
#
array(''
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'50'
#
#-----[ FIND ]------------------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'Flash'
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//Begin Flash Mod for 2.0.11
$bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{LOOP}', '\\3', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{URL}', '\\4', $bbcode_tpl['flash']);
$bbcode_tpl['cf'] = str_replace('{URL}', '\\1', $bbcode_tpl['cf']);
//End Flash Mod for 2.0.11
#
#-----[ FIND ]------------------------------------------
#
$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//Begin Flash Mod for 2.0.11
//[flash width= height= loop= ]and[/flash]code..
$patterns[] = "#\[flash width=([0-8]?[0-9]?[0-9]) height=([0-6]?[0-9]?[0-9]) loop=(true|false):$uid\](.*?)\[/flash:$uid\]#si";
$replacements[] = $bbcode_tpl[flash];
//[flash]and[/flash]code..
$patterns[] = "#\[flash:$uid\](.*?)\[/flash:$uid\]#si";
$replacements[] = $bbcode_tpl[cf];
//End Flash Mod for 2.0.11
#
#-----[ FIND ]------------------------------------------
#
# Note, the find is much longer:
# $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#
$text = preg_replace("#\[img\]((
#
#-----[ AFTER, ADD ]------------------------------------------
#
//Begin Flash Mod for 2.0.11
//[flash width= heigth= loop=] and[ /flash ]
$text = preg_replace("#\[flash width=([0-8]?[0-9]?[0-9]) height=([0-6]?[0-9]?[0-9]) loop=(true|false)\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=\\3:$uid\]\\4[/flash:$uid]", $text);
$text = preg_replace("#\[flash width=([0-8]?[0-9]?[0-9]) height=([0-6]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=false:$uid\]\\3[/flash:$uid]", $text);
//End Flash Mod for 2.0.11
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
# NOTE: the full line to look for is:
# $lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
#
$lang['bbcode_f_help'] =
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['bbcode_help']['flash'] = 'Flash: [flash width=000 height=000 loop=(true|false)]url to swf file[/flash] (alt+%s)';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN flash -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}">
<param name="allowScriptAccess" value="never" />
<param name="movie" value="{URL}" />
<param name="loop" value="{LOOP}" />
<param name="quality" value="high" />
<param name="scale" value="noborder" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#000000" />
<embed allowScriptAccess="never" src="{URL}" loop="{LOOP}" quality="high" scale="noborder" wmode="transparent" bgcolor="#000000" width="{WIDTH}" height="{HEIGHT}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object><!-- END flash -->
<!-- BEGIN cf -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">
<param name="allowScriptAccess" value="never" />
<param name="movie" value="{URL}" />
<param name="quality" value="high" />
<param name="scale" value="noborder" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#000000" />
<embed allowScriptAccess="never" src="{URL}" quality="high" scale="noborder" wmode="transparent" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object><!-- END cf -->
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
# NOTE: the actual line to find is MUCH longer, containing all the bbcode tags
#
bbtags = new Array(
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'[url]','[/url]'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'[flash]','[/flash]'
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM