ich hab den hier drinnen, ist vom selben author ...
funktioniert auch einwandfrei, schon seit monaten verbaut und machte nie probleme ...
[code##############################################################
## MOD Title: Resize posted images based on max width
## MOD Author: spooky2280 <
webmaster@christianfecteau.com > (Christian Fecteau)
http://portfolio.christianfecteau.com/
## MOD Description: This a client-side (Javascript) MOD. Database and PHP scripts are not altered.
## Images resized are made clickable and openable in a popup in fullsize.
## You can specify a different max width for each of your themes.
## Images that do not exceed the max width are left as is.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: 3
## templates/subSilver/bbcode.tpl
## templates/subSilver/overall_header.tpl
## templates/subSilver/simple_header.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:
##
## This MOD uses Javascript and works in all W3C DOM browsers:
## NN6+, IE5+, Mozilla/Firefox/Camino, Safari, Opera7+, etc.
##
## Don't forget to edit all your themes in addition to subSilver.
##
## Make sure no other Javascript in all of your themes uses window.onload
## to call a different function. If one does, merge the two functions in one.
##
## As long as the three files to edit are present, this MOD will work in
## all versions of phpBB2 from 2.0.0 to 2.0.10
## It was however only tested with 2.0.8
##
##############################################################
## MOD History:
##
## 2004-11-12 - Version 1.0.0
## - initial release phpBB2 ver 2.0.10
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
# around line 56
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
#
#-----[ IN-LINE FIND ]------------------------------------------
#
/>
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
# line should look like: <!-- BEGIN img --><img src="{URL}" border="0" longdesc="resizemod" /><!-- END img -->
longdesc="resizemod"
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
# around line 222
</head>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<script type="text/javascript">
//<![CDATA[
<!--
window.onload = resizeImg;
function resizeImg()
{
/*//////////////////
/// edit begin ///
//////////////////*/
var max_width = 500; // you can change this number, this is the max width in pixels for posted images
/*//////////////////
/// edit end ///
//////////////////*/
if (!document.getElementsByTagName) return;
if (!document.body.getAttribute) return;
for (i=0; i<document.getElementsByTagName("IMG").length; i++)
{
var im = document.getElementsByTagName("IMG")
;
if (!im.getAttribute('longdesc')) continue;
if ( (im.width > max_width) && (im.getAttribute('longdesc').indexOf('resizemod')!=-1) )
{
im.style.width = String(max_width) + 'px';
eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + "','fullscale','top=10,left=10,width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
eval("im.onclick = pop" + String(i) + ";");
document.all ? im.style.cursor = 'hand' : im.style.cursor = 'pointer';
im.title = 'Click to enlarge';
}
}
}
//-->
//]]>
</script>
</head>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/simple_header.tpl
#
#-----[ FIND ]------------------------------------------
# around line 234
</head>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<script type="text/javascript">
//<![CDATA[
<!--
window.onload = resizeImg;
function resizeImg()
{
/*//////////////////
/// edit begin ///
//////////////////*/
var max_width = 500; // this should be set to the same value that you chose in overall_header.tpl
/*//////////////////
/// edit end ///
//////////////////*/
if (!document.getElementsByTagName) return;
if (!document.body.getAttribute) return;
for (i=0; i<document.getElementsByTagName("IMG").length; i++)
{
var im = document.getElementsByTagName("IMG");
if (!im.getAttribute('longdesc')) continue;
if ( (im.width > max_width) && (im.getAttribute('longdesc').indexOf('resizemod')!=-1) )
{
im.style.width = String(max_width) + 'px';
eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + "','fullscale','top=10,left=10,width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
eval("im.onclick = pop" + String(i) + ";");
document.all ? im.style.cursor = 'hand' : im.style.cursor = 'pointer';
im.title = 'Click to enlarge';
}
}
}
//-->
//]]>
</script>
</head>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM[/code]