How to change image size

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre

How to change image size

Postby SexProffesor » Fri Oct 01, 2010 9:22 am

How to change image size because some of posts showing monster size

thanks in advance :D
SexProffesor
Registered User
 
Posts: 67
Joined: Tue Sep 21, 2010 8:47 am

Re: How to change image size

Postby Kyza » Fri Oct 01, 2010 11:29 am

Image size of?
Image
Kyza
Registered User
 
Posts: 90
Joined: Fri Jun 25, 2010 12:18 pm

Re: How to change image size

Postby SexProffesor » Fri Oct 01, 2010 11:38 am

size of forum posts image
SexProffesor
Registered User
 
Posts: 67
Joined: Tue Sep 21, 2010 8:47 am

Re: How to change image size

Postby Kyza » Fri Oct 01, 2010 11:40 am

Well, what theme are you using?
Image
Kyza
Registered User
 
Posts: 90
Joined: Fri Jun 25, 2010 12:18 pm

Re: How to change image size

Postby SexProffesor » Fri Oct 01, 2010 11:43 am

X-Treme blue
SexProffesor
Registered User
 
Posts: 67
Joined: Tue Sep 21, 2010 8:47 am

Re: How to change image size

Postby Pit$Bull » Fri Oct 01, 2010 11:56 am

Pit$Bull
Former Team Member
 
Posts: 23099
Joined: Sat Dec 02, 2006 4:08 pm
Name: Can't Remember

Re: How to change image size

Postby SexProffesor » Sat Oct 02, 2010 6:55 am

Brother can you explain me steps which i should to follow

pelase help me am new here
SexProffesor
Registered User
 
Posts: 67
Joined: Tue Sep 21, 2010 8:47 am

Re: How to change image size

Postby Kyza » Sat Oct 02, 2010 7:02 am

Create them again (smaller), then save as a .zip (with different names) then upload to
root/styles/yourstyle/imageset
Extract them, then go to:
ACP-->Styles-->Image sets-->yourtheme (click edit)

Click on the drop down menu, and change them by that.
Image
Kyza
Registered User
 
Posts: 90
Joined: Fri Jun 25, 2010 12:18 pm

Re: How to change image size

Postby seoforfunny » Sat Oct 02, 2010 12:04 pm

Open template overall_header.html, find this:
Code: Select all
// ]]>
</script>


and add before it this simple javascript:
Code: Select all
onload_functions[onload_functions.length] = 'ca_resize_images();';
// resize images
function ca_resize_images()
{
    var ca_item, i, limit;
    limit = 600;
    ca_item = document.getElementById('page-body');
    if(ca_item && ca_item.clientWidth)
    {
        limit = ca_item.clientWidth - 250;
    }
    if(limit < 500)
    {
        limit = 500;
    }
    if(ca_item)
    {
        ca_list = ca_item.getElementsByTagName('img');
    }
    else
    {
        ca_list = document.getElementsByTagName('img');
    }
    for(i=0; i<ca_list.length; i++)
    {
        ca_item = ca_list[i];
        if(ca_item.width > limit)
        {
            if(document.all)
            {
                ca_item.style.cursor = 'hand';
            }
            else
            {
                ca_item.style.cursor = 'pointer';
            }
            ca_item.style.width = (limit - 50) + 'px';
            ca_item.onclick = function() {
                ca_item = window.open(this.src, 'image', 'width=700,height=500,resizable=1,scrollbars=1');
            }
        }
    }
}
User avatar
seoforfunny
Registered User
 
Posts: 22
Joined: Thu Sep 30, 2010 9:20 am
Location: India
Name: SEOforFunny


Return to 3.0.x Support Forum

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], omgili [Bot], Oyabun1, Yahoo [Bot], youngjediknight and 60 guests