Code: Alles auswählen
##############################################################
## MOD Title: [img] autoresize MOD
## MOD Author: MagMo
##
## MOD Description: Via [img] angezeigte Bilder werden, falls erforderlich, automatisch an die angegebene Maximalgroesse angepasst.
## Es werden nur die Formate JPG, GIF und PNG unterstuetzt.
##
## MOD Compatibility: 2.0.18
##
## MOD Version: 0.1.1
##
## Installation Level: easy
## Installation Time: 1 Minutes
##
## Files To Edit: 1
## includes/bbcode.php
##
## Included Files: 0
##
##############################################################
## MOD History:
##
## 2006-01-03 - Version 0.1.1
## - Wenn bei ein [img]-Tag die schließende Klammer fehlt, dann kann ein Fehler auftreten -> behoben
## - Wenn die Bilddaten nicht ermittelt werden können, da z.B. das Bild nicht vorhanden ist, und [img] wird mit [url] kombiniert, dann tritt ein Fehler auf. -> behoben
##
## 2006-01-03 - Version 0.1
## - Initial Release
##
##############################################################
## This MOD is released under the GPL License. Intellectual Property is retained by the MOD Author(s) listed above. http://www.gnu.org
##############################################################
## For Security Purposes, Please Check: http://phpbb.mwegner.de/ for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum.
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up Your Complete Database And All Files Related To This MOD !
##############################################################
## INSTALLATION OF THE ECard MOD:
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------------
#
// [img]image_url_here[/img] code..
// This one gets first-passed..
#
#-----[ ADD BEFORE ]------------------------------------------------
#
/* [img] autoresize MOD - Start
#
#-----[ FIND ]------------------------------------------------
#
$replacements[] = $bbcode_tpl['img'];
#
#-----[ ADD AFTER ]------------------------------------------------
#
[img] autoresize MOD - Ende */
#
#-----[ FIND ]------------------------------------------------
#
// Remove our padding from the string..
$text = substr($text, 1);
#
#-----[ ADD BEFORE ]------------------------------------------------
#
// [img] autoresize MOD - Start
// Maximale Bildbreite, bei $ImageMaxWidth = 0 wird die Breite nicht ueberprueft
$ImageMaxWidth = 0;
// Maximale Bildhoehe, bei $ImageMaxHeight = 0 wird die Hoehe nicht ueberprueft
$ImageMaxHeight = 0;
$textIMG_a = array();
$textIMG_a = preg_split("#\[img:$uid\]#is", $text);
if ((is_array($textIMG_a)) && (count($textIMG_a) > 0))
{
unset($textIMG_e);
unset($i);
$textIMG_c = count($textIMG_a);
$textIMG_e = array();
for ($i=0; $i<$textIMG_c; $i++)
{
if ((($i == 0) && (substr($textIMG_a[0],0,1) != ' ')) || ($i > 0))
{
$textIMG_e[] = preg_replace("#\[/img:$uid\].*#is", '', $textIMG_a[$i]);
}
}
if ((isset($textIMG_e)) && (is_array($textIMG_e)))
{
unset($i);
$textIMG_s = $text;
$textIMG_c = count($textIMG_e);
for ($i=0; $i<$textIMG_c; $i++)
{
$textIMG_e[$i] = eregi_replace('\[','\[',$textIMG_e[$i]);
unset($ImageInfo);
$ImageInfo = @ getimagesize($textIMG_e[$i]);
if ((!isset($ImageInfo)) || (is_null($ImageInfo)) || (!is_array($ImageInfo)) || (($ImageInfo[2] != 1) && ($ImageInfo[2] != 2) && ($ImageInfo[2] != 3)))
{
$textIMG_s = preg_replace("#\[img:$uid\]".$textIMG_e[$i]."\[/img:$uid\]#is", '<img src="'.$textIMG_e[$i].'" border="0" />', $textIMG_s);
}
else
{
unset($ImageWidth);
unset($ImageHeight);
unset($ImageFactor);
$ImageWidth = $ImageInfo[0];
$ImageHeight = $ImageInfo[1];
if (($ImageWidth > $ImageMaxWidth) && ($ImageMaxWidth > 0))
{
$ImageFactor = $ImageMaxWidth / $ImageWidth;
$ImageWidth = $ImageWidth * $ImageFactor;
$ImageHeight = $ImageHeight * $ImageFactor;
}
if ((floor($ImageHeight) > $ImageMaxHeight) && ($ImageMaxHeight > 0))
{
$ImageFactor = $ImageMaxHeight / $ImageHeight;
$ImageWidth = $ImageWidth * $ImageFactor;
$ImageHeight = $ImageHeight * $ImageFactor;
}
$ImageWidth = floor($ImageWidth);
$ImageHeight = floor($ImageHeight);
$textIMG_s = preg_replace("#\[img:$uid\]".$textIMG_e[$i]."\[/img:$uid\]#is", '<img src="'.$textIMG_e[$i].'" width="' . $ImageWidth . '" height="' . $ImageHeight . '" border="0" />', $textIMG_s);
}
}
$text = $textIMG_s;
}
}
// [img] autoresize MOD - Ende
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
Nun bekomm ich wenn ich ein Thema anklicken will folgende Fehlermeldung:
Code: Alles auswählen
Fatal error: Call to undefined function: bbencode_second_pass() in /home/webpages/lima-city/greenday4eva/html/phpbb2/viewtopic.php on line 1101
Hier der Link zu meinem Forum: http://www.greenday-forumplanet.de.vu
Hoffe ihr könnt mir helfen!