Welcome to Geeklog, Anonymous Tuesday, July 16 2024 @ 08:59 am EDT

Geeklog Forums

user photo limitations


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.

Status: offline


Site 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

Status: offline


Forum User
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; }

All times are EDT. The time is now 08:59 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