1
Mods & Plugins (Requests & Discussions) / Re: Url/link images Auto-Thumbnail Resizing
« on: June 14, 2007, 11:18:00 PM »
Great post. If u want any help you should even TRY to describe your problem a bit more...
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<!-- Template file for JPG Files -->
<!-- <img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br /> -->
<script language="javascript">
var ow = 0;
var oh = 0;
var s = 728;
var onload_blows = 0;
function scale(img)
{
if (!onload_blows)
scale_load(img);
i = document.getElementById(img);
if (i.width > s) {
i.style.cursor = "pointer";
i.width = s;
i.height = s / (ow / oh);
} else if (i.width == s) {
i.width = ow;
i.height = oh;
}
}
function scale_load(img)
{
onload_blows = 1;
t = 0;
if (navigator.appName == "Netscape")
t = window.innerWidth;
else if (navigator.appName.indexOf("Microsoft") != -1 ||
navigator.appName.indexOf("Opera") != -1)
t = document.body.offsetWidth;
if (t > 64 && t < s)
s = t - 16;
i = document.getElementById(img);
ow = i.width;
oh = i.height;
scale(img);
}
</script>
<font color="black" face="Verdana" size=-2>
Die Bilder werden teilweise verkleinert dargestellt. Klicken um das Original zu sehen <P>
</font>
<img style="cursor: pointer;" id="picture" onclick="scale('img')" onload="scale_load('img')" src="{media_src}" alt="{image_name}">
<!-- Template file for JPG Files -->
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br />
<!-- Template file for JPG Files -->
<!-- <img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br /> -->
<script language="javascript">
var saveWidth = 0;
function scaleImg(what){
what = document.getElementById(what);
if (navigator.appName=="Netscape")
winW = window.innerWidth;
if (navigator.appName.indexOf("Microsoft")!=-1)
winW = document.body.offsetWidth;
if (what.width>(720) || saveWidth>(720)) {
if (what.width==(720))
what.width=saveWidth;
else
{
saveWidth = what.width;
what.style.cursor = "pointer";
what.width=(720);
}
}
}
</script>
<font color="black" face="Verdana" size=-2>
Die Bilder werden teilweise verkleinert dargestellt. Klicken um das Original zu sehen <P>
</font>
<img id="picture" onClick="scaleImg('picture')" onLoad="scaleImg('picture')" SRC="{media_src}" alt="{image_name}">
<!-- Template file for JPG Files -->
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br />
<!-- Template file for JPG Files -->
<!-- <img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br /> -->
<script language="javascript">
var saveWidth = 0;
function scaleImg(what){
what = document.getElementById(what);
if (navigator.appName=="Netscape")
winW = window.innerWidth;
if (navigator.appName.indexOf("Microsoft")!=-1)
winW = document.body.offsetWidth;
if (what.width>(720) || saveWidth>(720)) {
if (what.width==(720))
what.width=saveWidth;
else
{
saveWidth = what.width;
what.style.cursor = "pointer";
what.width=(720);
}
}
}
</script>
<font color="black" face="Verdana" size=-2>
Picture is scaled to fit in view. Click to see the original file <P>
</font>
<img id="picture" onClick="scaleImg('picture')" onLoad="scaleImg('picture')" SRC="{media_src}" alt="{image_name}">