Ook in me oude forum heeft dat eigenlijk nooit gewerkt, maar hij verkleinde dat vond ik toen al genoeg

##############################################################
## 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
Wat ik moest doen en wat ik heb gedaan, en wat ik heb is het volgende:
Code: Selecteer alles
#
#-----[ 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 -->
<!-- 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 -->
<!-- BEGIN img --><img src="{URL}" OnLoad="if(this.width > 800) {this.width=800}" OnError="this.src='error.gif'" alt="Deze afbeelding is helaas niet aanwezig." title="Afbeelding" border="0" /><!-- END img -->
Code: Selecteer alles
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>
</style>
<script language="Javascript" type="text/javascript">
<!--
function link_to_post(pid)
{
temp = prompt( "{COPY}", "<a target='_self' href='http://" + "{SERVER_NAME}" + "{SCRIPT_PATH}" + "viewtopic" + "." + "{PHPEX}" + "?" + "{POST_POST_URL}" + "=" + pid + "#" + pid +"'><b>link</b></a>");
return false;
}
-->
</script>
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
<script language="javascript" type="text/javascript">
<!--
function resize_images()
{
for (i = 0; i < document.images.length; i++)
{
while ( !document.images.complete )
{
break;
}
if ( document.images.width > 550 )
{
document.images.width = 550;
}
}
}
//-->
</script>
<script type="text/javascript">
function checksubmit(submitbtn){
submitbtn.form.submit()
checksubmit=blocksubmit
return false
}
</script>
Code: Selecteer alles
#
#-----[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()"
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" onload="resize_images()">