We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Avatar Size Limitations
Topic Started: Jun 20 2013, 05:58 PM (1,385 Views)
Jerrbear65
Member
[ * ]
Board Address: w11.zetaboards.com/Imperial_Union/index/
Board Software: Zetaboards
Description: So I want a code that allows each of my INDIVIDUAL themes to have specific avatar size limits, so for one theme it must be 50 * 50 pixels and the other theme it must be 150 * 150 pixels. Thank you :) So I would like ontop of these a maluable code that I can change to make my own limitations and if I want to edit them please :) Thank you once again!

-Jeremie
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

This can be accomplished with CSS, no need for any code. All you need is to place the following at the bottom of your Theme Appearance (for each theme):
Code:
 
.avatar {
width:50px!important;
height:50px!important;
}
You can replace 50px with whatever value you wish to enter for that theme.
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Hmm I tried to use this code for my forum. But it doesn't set a limitation, it only makes everyones avatar that size I wrote in the code. I placed this code below my Theme Appearance code.
Code:
 
.avatar {
width:50px!important;
height:50px!important;
}


Any code that sets a Maximum length a members avatar can be. So if I set the limit to 160x160, if someone uploads a 75x75 avatar, it would stay at that length. But if someone tried to upload an avatar that is 180x180, it won't allow them or just automatically resize the image to 170x170.
Offline Profile Goto Top
 
silvershoes
Member Avatar
Member
[ *  *  * ]
I can see resizing to fit, but what do you gain by forcing an upload limit? Are you saying if a member changes themes, you'd want them to reupload their avatar?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Board Customization Posted Image Preferences Posted Image Profiles

Posted Image
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Cory
Jun 22 2013, 08:51 AM
Admin CP Posted Image Board Customization Posted Image Preferences Posted Image Profiles

Posted Image
Thx Cory, I thought that only works with uploading an avatar not using an URL.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
What those options do is sets the CSS max-width and max-height properties on avatar images and a DIV around the avatar image, so if you add a 100x100 avatar either by uploading or inserting the direct image URL and the maximum avatar width/height is set to 50x50, then the 100x100 avatar will be resized to 50x50.
Offline Profile Goto Top
 
Moonface
Member Avatar


If you want it that avatars are limited to a maximum size, but can also be smaller, the CSS used should be this:

Code:
 
.avatar {
max-width:120px!important;
max-height:120px!important;
}


The original CSS posted in this topic would just resize all avatars to that size. The CSS I just posted will let avatars be no bigger than that, but can also be smaller. So a 100x100 avatar will remain 100x100, not stretched to 120x120.
Offline Profile Goto Top
 
Moonface
Member Avatar


Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic