Quote:
Originally posted by Velocd
Well I figured my first request out pretty easily, you can forget the second since I know it's not possible.
---------------------------------------
For those wanting to check the icon size insuring it's not larger than 16x16 pixels, use this very easy to install add-on:
In member.php, find:
PHP Code:
if( !$HTTP_POST_FILES['file1']['size'] || $HTTP_POST_FILES['file1']['size'] < 1 ) {
eval("standarderror(\"".gettemplate("error_invalid_image")."\");");
}
Below it add:
PHP Code:
// check valid image
if ($imginfo=@getimagesize($HTTP_POST_FILES['file1']['tmp_name'])) {
if ($imginfo[0]>16 or $imginfo[1]>16) {
eval("standarderror(\"".gettemplate("error_invalid_image")."\");");
}
}
And there we go There is no need to set width and height attributes to the image tag. You can also check for it not to be lower than a certain amount, by modifying the if statement with a lesser than (<) clause.
|
This mod will -not- function on certain servers. This is why I chose -not- to include this. The reason why the getimagesize() function does not work is uknown to most people, and when I tried it.. worked on 1 server, failed on the other (both had the graphic libraries installed that were required).