HELP: Ik heb de imagetags gesloopt :S
Geplaatst: 03 jan 2006, 21:27
Ik was bezig met een code in te voegen die de foto's moest resizen. Nu werk enkel de imagetag code niet meer :S
Dit is de gebruiksaanwijzing van de mod:
Wie kan me helpen???????
de link van het forum is http://members.lycos.nl/autoopinie/Autoforum
Gr Rio-man
Dit is de gebruiksaanwijzing van de mod:
Code: Selecteer alles
##############################################################
## MOD Title: Image width and height BBcode
## MOD Author: robinhier < admin@robintown.nl > (Robin van der Markt) http://www.robintown.nl
## MOD Description: With this mod you can set the weidth and height of an image via the BBcode
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 5 Minutes
## Files To Edit: bbcode.php, bbcode.tpl
## Included Files: (n/a)
##############################################################
## 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:
## My first 'real' mod :P
##############################################################
## MOD History:
##
## 2005-02-15 - Version 1.0.0
## - release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bbcode_tpl['imgwh'] = str_replace('{URL}', '\\3', $bbcode_tpl['imgwh']);
$bbcode_tpl['imgwh'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['imgwh']);
$bbcode_tpl['imgwh'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['imgwh']);
#
#-----[ FIND ]------------------------------------------
#
// matches a [url]xxxx://www.phpbb.com[/url] code..
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// [img width= height= ] and [/img] code..
$patterns[95] = "#\[img width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]):$uid\](.*?)\[/img:$uid\]#si";
$replacements[95] = $bbcode_tpl['imgwh'];
#
#-----[ FIND ]------------------------------------------
#
// [img]image_url_here[/img] code..
$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);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [img width= heigth=] and [/img] code..
$text = preg_replace("#\[img width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/img\]#si","[img width=\\1 height=\\2:$uid\]\\3[/img:$uid]", $text);
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN imgwh --><img src="{URL}" width={WIDTH} height={HEIGHT}></img><!-- END imgwh -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
de link van het forum is http://members.lycos.nl/autoopinie/Autoforum
Gr Rio-man