Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 03:46 am EST
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.
8
8
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
11
6
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;
}
12
7
Quote
All times are EST. The time is now 03:46 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