Hi!
I've already worked out the solution... Well, a friend of mine told me that adding the code at the begining of viewtopic_body only works on local forums (as in LAN), so I appended it before the "<!-- INCLUDE overall_footer.html -->" line, almost at the end of the template...
I'll show you my code, it might help other people... please, DO NOTE i first define the function resizeimg and then I add it to the onload event...
Code: Select all
<script type="text/javascript">
function resizeimg(){
if (document.getElementsByTagName) {
for (i=0; i<document.getElementsByTagName('img').length; i++) {
im = document.getElementsByTagName('img')[i];
if (im.width > 600) {
im.style.width = '600px';
eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
eval("im.onclick = pop" + String(i) + ";");
if (document.all) im.style.cursor = 'hand';
if (!document.all) im.style.cursor = 'pointer';
im.title = 'Click Here To See Image Full Size ';
}
}
}
}
window.onload = resizeimg();
</script>
<!-- INCLUDE overall_footer.html -->
Now i'm trying to avoid resizing the header!...
Anyway, I'd like to thank you for your reponse ^^!...
EDIT.
Just in case anyone wants to know how to avoid resizing the header, here you have my workaround (not that clever lol)
Code: Select all
<script type="text/javascript">
function resizeimg(){
if (document.getElementsByTagName) {
for (i=0; i<document.getElementsByTagName('img').length; i++) {
im = document.getElementsByTagName('img')[i];
if (im.width > 600 && im.src != 'http://FORUM_ROOT/styles/STYLEFOLDER_NAME/imageset/site_logo.gif') {
im.style.width = '600px';
eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
eval("im.onclick = pop" + String(i) + ";");
if (document.all) im.style.cursor = 'hand';
if (!document.all) im.style.cursor = 'pointer';
im.title = 'Click Here To See Image Full Size ';
}
}
}
}
window.onload = resizeimg();
</script>
just focus on that line:
if (im.width > 600 && im.src != 'http://FORUM_ROOT/styles/STYLEFOLDER_NAME/imageset/site_logo.gif') {