downloadAvatar
Description
Downloads file from url and stores it locally for avatar use by ID_MEMBER.
Syntax
Parameter $url
Expected type: String
Description: The URL of the avatar to download
Parameter $memID
Expected type: Integer
Description: The ID of the member that this avatar belongs to
Parameter $max_width
Expected type: Integer
Description: The maximum width for the image
Parameter $max_height
Expected type: Integer
Description: The maximum height for the image
Return value
Expected type: Boolean
Description: Supports GIF, JPG, PNG, BMP and WBMP formats. Detects if GD2 is available. If GIF support isn't present in GD, handles GIFs with gif_loadFile() and gif_outputAsPng(). Uses resizeImage() to resize to max_width by max_height, if needed, and saves the result to a file. Updates the database info for the member's avatar. Returns whether the download and resize was successful.
Notes
- Supports GIF, JPG, PNG, BMP and WBMP formats.
- Detects if GD2 is available.
- If GIF support isn't present in GD, handles GIFs with gif_loadFile() and gif_outputAsPng().
- Uses resizeImage() to resize to max_width by max_height, if needed, and saves the result to a file.
- Updates the database info for the member's avatar.
- Returns whether the download and resize was successful.