Hi everyone,
can anyone help me to make post image and attach image smaller on portal. I appreciate it.
Resize Image On Portal
Subject: Re: Resize Image On Portal
Last edited by darkasylum on Sat 19 Jan, 2008 20:47; edited 1 time in total
can you explan little more i may be able to help u!
Last edited by darkasylum on Sat 19 Jan, 2008 20:47; edited 1 time in total
Subject: Re: Resize Image On Portal
I want all my posted image and attached image smaller instead of full size on portal. I set and resize them in forum, but don't know how to fix it on portal.
see here
Thank you so much,
see here
Thank you so much,
Subject: Re: Resize Image On Portal
ok see if i get this right you want them as a thumbnail? of the portal yes!
Subject: Re: Resize Image On Portal
Inside "Special Categories" on attachments panel you can config it i think ;)
Subject: Re: Resize Image On Portal
Last edited by xmenfile on Tue 05 Feb, 2008 03:13; edited 2 times in total
Yes, there is and it makes all images same size a cross the board. But I want to set the images on Portal smaller than images in forum.
PS: I am sorry if this is the same issue. I thought, they are 2 different issues that's why i made 2 posts.
http://www.icyphoenix.com/viewtopic.php?f=2&t=3495
'cause on this post, i want to find out how came img tag pictures and attachment pictures in the same post resize 2 different sizes. eventhough, i set "Yes" resize images in Reside Mod.
Anyway, I want my images on Portal smaller than images in topicview. I also want my all my images ([img] images & attchment images0 in same post resize to only 1 size.
sorry for my englis, I hope my explanation is enough to understand.
PS: I am sorry if this is the same issue. I thought, they are 2 different issues that's why i made 2 posts.
http://www.icyphoenix.com/viewtopic.php?f=2&t=3495
'cause on this post, i want to find out how came img tag pictures and attachment pictures in the same post resize 2 different sizes. eventhough, i set "Yes" resize images in Reside Mod.
Anyway, I want my images on Portal smaller than images in topicview. I also want my all my images ([img] images & attchment images0 in same post resize to only 1 size.
sorry for my englis, I hope my explanation is enough to understand.
Last edited by xmenfile on Tue 05 Feb, 2008 03:13; edited 2 times in total
Subject: Re: Resize Image On Portal
Hi, no problem its a fair question and good idea. The way the resize system works in the post attachments, I think is ultimately through posting_attachments.php which is called every time a post is made, including in private messages. This file (and indeed the whole of attachment mod) does not resize the image directly, rather force users to load up images of a certain size, and there is nothing to distinguish where the post is being displayed, as you correctly observe.
There is a way of overriding the image sizes wherever you wish, by using javascript - you simply insert it wherever you want it to work (I used to use it in overall_header, because you can then control all images, i.e. linked images as well posted - at one stage IP (phpBBXS) had an image resize (based on max width) added, but it appears to be commented out in the current version. For portal, I guess you would need to insert it in the portal blocks. At this moment in time I cannot remember the javascript, but there are plenty of image resizing scripts out there. If I remember/find my old code, I'll post here.
There is a way of overriding the image sizes wherever you wish, by using javascript - you simply insert it wherever you want it to work (I used to use it in overall_header, because you can then control all images, i.e. linked images as well posted - at one stage IP (phpBBXS) had an image resize (based on max width) added, but it appears to be commented out in the current version. For portal, I guess you would need to insert it in the portal blocks. At this moment in time I cannot remember the javascript, but there are plenty of image resizing scripts out there. If I remember/find my old code, I'll post here.
Subject: 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!
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...
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>
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...
Subject: Re: Resize Image On Portal
Thumbnails size for attachments may be set in the Attachments section in ACP, while thumbnails size for images in posts may be set in Icy Phoenix Configuration => Images In Posts (I'm referring to RC3 or above).
You can set them in the same way if you want images to be resized to the same dimension.
Regarding different sizes in portal you have to edit some files for it and it is not directly achievable.
You can set them in the same way if you want images to be resized to the same dimension.
Regarding different sizes in portal you have to edit some files for it and it is not directly achievable.
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.64s (PHP: 3% SQL: 97%)
SQL queries: 10 - Debug Off - GZIP Enabled