
Re: Resize Image On Portal
OK, so heres the javascript for resizing images, it can work pretty much anywhere (most people put javascript statements within <head> tags, but that isn't really necessary - and with this code you just put this before the main table to which the posts / topics are parsed (which contain images)... in your case it will be the relevant blocks under templatesmg_themesblocks, before table. Alternatively... or probably the best place to put it, is in:
templatesmg_themes index_body.tpl
place code just after {BOARD_INDEX}
I
think it should work then for all other blocks, elements loaded on that page. I say
think because I haven't followed the changes in the templates for a while, but its quicker to check and rule that out before trying to edit a load of blocks!
<script>
window.onload = resizeimg;
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 ';
}
}
}
}
</script>
note : you may change( 600px) to whatever you want
NB I do not claim credit for this particular code (I lost mine when my bloody host lost all my data!) this particular example comes from
here...