Ik heb mij gistren de MOD
image max size
nu ik heb alles perfect gedaan en het werkt ook uitstekend
MAAR
-hij resized mijn banner op de footer ook,ondank ik het script al aangepast op naar i=1 heb ook al i=5 geprobeerd.
-dan hij resized geuploaden foto's (van de attachkmod) maar hij kan de werkelijke grote niet weergeven in een aparte venster.
iemand idee of gaat het niet?
mvg
Code: Selecteer alles
############################################################## 
## MOD Title: Resize Fix
## MOD Author: Mike Lothar < community@mikelothar.com > ( Mike Lothar ) http://www.mikelothar.com
## MOD Description:
## Resize images in posts to prevent them from breaking the tables on templates with a fixed width. The resized image
## can be clicked and will open in full size in a new window.
## 
## MOD Version: 1.0.0
## 
## Installation Level: (Easy) 
## Installation Time: 3 Minutes 
## Files To Edit: 
##               subSilver/bbcode.tpl 
##               subSilver/overall_header.tpl 
## Included Files: resizefix.php
##############################################################
## 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 hack will by default resize images that are wider than 550 pixels. Should you prefer a different width,
## simply just change the '550' width to your desired one. You will have to change this twice in bbcode.tpl and
## twice in the javascript of overall_header.tpl.
## Some templates, like NoseBleed etc, uses an image wider than 550 pixels. You can make this hack skip the
## first image(s) of the template to prevent all images to be resized. You do this by changing the 'i=0' value
## in the javascript of overall_header.tpl. For example, to prevent the first image to be resized, set 'i=1', to
## prevent the first two images, set 'i=2', etc.
##############################################################
## MOD History: 
## 
##   2004-11-23 - Version 1.0.0 
##      - initial release 
## 
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ COPY ]---------------------------
#
copy resizefix.php to templates/subSilver/resizefix.php
# 
#-----[ OPEN ]------------------------------------------ 
#
subSilver/bbcode.tpl
# 
#-----[FIND]------------------------------------------ 
# 
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
# 
#-----[REPLACE WITH]------------------------------------------ 
# 
<!-- BEGIN img -->
<script language="javascript" type="text/javascript"> 
<!-- 
function pointercursor(){document.body.style.cursor = "move";}
function unpointercursor(){document.body.style.cursor="";}
//--> 
</script>
<img src="{URL}" border="0" onmouseout="unpointercursor();" onmouseover="if(this.width == 550) {pointercursor();}" onclick="if(this.width == 550) { window.open('templates/subSilver/resizefix.php?originalsize={URL}', '_blank' ,'scrollbars=1,toolbar=no,resizable=1,menubar=no,directories=no,status=yes'); return false; }" alt="" />
<!-- END img -->
# 
#-----[ OPEN ]------------------------------------------ 
#
subSilver/overall_header.tpl
# 
#-----[FIND]------------------------------------------ 
#
<!-- END switch_enable_pm_popup -->
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<script language="javascript" type="text/javascript"> 
<!-- 
  function resize_images() 
  { 
    for (i = 0; i < document.images.length; i++) 
    { 
      while ( !document.images[i].complete ) 
      { 
        break;
      } 
      if ( document.images[i].width > 550 ) 
      { 
        document.images[i].width = 550; 
      } 
    } 
  } 
//--> 
</script>
# 
#-----[FIND]------------------------------------------ 
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
vlink="{T_BODY_VLINK}"
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
onload="resize_images()"
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM