Welcome to Geeklog, Anonymous Sunday, September 08 2024 @ 01:03 am EDT
Geeklog Forums
user photo limitations
Anonymous
Anonymous
Is there a way to limit the user photo upload to a specific size?
100*100px would be ideal.
I dont want to effect the size of the story photos though, Thanx.
7
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The max. size of uploaded images is hard-coded in system/classes/upload.class.php to
var $_maxImageWidth = 300;
var $_maxImageHeight = 300;
You could change that to 100, but that would then also limit the max. size of images in stories.
bye, Dirk
9
5
Quote
Status: offline
twistedfreak
Forum User
Junior
Registered: 05/08/02
Posts: 29
I done it, I altered the public_html/usersettings.php saveuser function.
under
$upload->setMaxFileSize(20480); //20KB
I placed the code:
$upload->setMaxImageHeight(100); //Pixels
$upload->setMaxImageWidth(100); //Pixels
Then in the system/classes/uload.class.php I added:
function setMaxImageWidth($size_in_pixels)
{
if (!is_numeric($size_in_pixels)) {
return false;
}
$this->_maxImageWidth = $size_in_pixels;
return true;
}
function setMaxImageHeight($size_in_pixels)
{
if (!is_numeric($size_in_pixels)) {
return false;
}
$this->_maxImageHeight = $size_in_pixels;
return true;
}
10
6
Quote
All times are EDT. The time is now 01:03 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content