Iframe Mod
Geplaatst: 09 nov 2003, 17:25
Hallo,
ik maak een iframe mod
aleen er zitten een aantal fouten in en het lukt mij niet om ze op te lossen.
mischien heeft iemand anders meer geluk?','
#
#-----[ AFTER, ADD ]------------------------------------------
#
bbtags = new Array('','','','','','','[quote]','[/quote]','','
#
#-----[ FIND ]------------------------------------------
#
<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
#
#-----[ AFTER, ADD ]------------------------------------------
#
<select name="addbbcode19" onChange="bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
#
#-----[ FIND ]------------------------------------------
#
</select> {L_FONT_SIZE}:<select name="addbbcode17" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
#
#-----[ AFTER, ADD ]------------------------------------------
#
</select> {L_FONT_SIZE}:<select name="addbbcode19" onChange="bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('i')">
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM[/code]
ik maak een iframe mod
aleen er zitten een aantal fouten in en het lukt mij niet om ze op te lossen.
mischien heeft iemand anders meer geluk?
Code: Selecteer alles
#################################################################
## Mod Title: DJKoe's IFRAME Mod
## Mod Version: 1.0
## Author: DJKOE - http://www.flashfx.nl
## Description: This mod creates a new bbcode that will
## Allow you to have a iframe in your text.
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: 4
## includes/bbcode.php
## posting.php
## templates/subSilver/bbcode.tpl
## templates/subSilver/posting_body.tpl
##
#################################################################
##
## Author Note:
##
## You should change all your templates
##
## This MOD is Copyright © DJKoe 2003
##
## (Any changes to this MOD must retain my Copyright Notice)
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
##
## Revision History:
##
## v1.1.0
## - Made the Txt file.
##
#################################################################
## Example Page: http://www.flashfx.nl
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bbcode_tpl['iframe'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['iframe']);
$bbcode_tpl['iframe'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['iframe']);
$bbcode_tpl['iframe'] = str_replace('{URL}', '\\3', $bbcode_tpl['iframe']);
#
#-----[ FIND ]------------------------------------------
#
$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [iframe width=# height=#]filename[/iframe]
$patterns[] = "#\[iframe width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]):$uid\](.*?)\[/iframe:$uid\]#si";
$replacements[] = $bbcode_tpl[iframe];
#
#-----[ FIND ]------------------------------------------
#
d]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [iframe width=# height=#]url[/iframe]
$text = preg_replace("#\[iframe width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/iframe\]#si","[iframe width=\\1 height=\\2:$uid\]\\3[/iframe:$uid]", $text);
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_BBCODE_I_HELP' => $lang['bbcode_I_help'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_dutch/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['bbcode_f_help'] = 'Letter grootte: [size=small]Kleine tekst[/size]';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['bbcode_i_help'] = 'Iframe: [iframe width=# height=#]http://iframe_url[/iframe]';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN iframe -->
<IFRAME SRC="{URL}" WIDTH={WIDTH} HEIGHT={HEIGHT}></IFRAME>
<!-- END iframe -->
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
f_help = "{L_BBCODE_F_HELP}";
#
#-----[ AFTER, ADD ]------------------------------------------
#
i_help = "{L_BBCODE_I_HELP}";
#
#-----[ FIND ]------------------------------------------
#
<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="i" name="addbbcode19" value="Iframe" style="width: 40px" onClick="bbstyle(19)" onMouseOver="helpline('i')" />
</span></td>
#
#-----[ FIND ]------------------------------------------
#
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
- ','
- ','
#
#-----[ AFTER, ADD ]------------------------------------------
#
bbtags = new Array('','','','','','','[quote]','[/quote]','
Code: Selecteer alles
','
- ','
- ','
#
#-----[ FIND ]------------------------------------------
#
<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
#
#-----[ AFTER, ADD ]------------------------------------------
#
<select name="addbbcode19" onChange="bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
#
#-----[ FIND ]------------------------------------------
#
</select> {L_FONT_SIZE}:<select name="addbbcode17" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
#
#-----[ AFTER, ADD ]------------------------------------------
#
</select> {L_FONT_SIZE}:<select name="addbbcode19" onChange="bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('i')">
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM[/code]