NAME: Upload Avatar VERSION: 1.0.1 DESCRIPTION: Allows an administrator to upload a user's avatar. WORKING UNDER: UBB.threads 6.2.2-6.3b1 PREREQUISITES: PHP >= 4.0.5 AUTHORS: Dave Lerner (Dave_L) CREDITS: none DEMO: none FILES ALTERED: admin/menu.php DATABASE ALTERED: yes (updates Users.U_Picture, Users.U_PicWidth and Users.U_PicHeight) NEW FILES: admin/upload_avatar.php
HISTORY: 2003-03-01 Dave_L - 1.0.0 Original release 2003-04-21 Dave_L - 1.0.1 Updated instructions for UBB.threads 6.3b1
******** ABSTRACT ********
This addon script allows an administrator to upload an avatar for a user, regardless of whether users are permitted to upload their own avatars. The database is updated appropriately.
The avatar directory path, URL and the maximum avatar file size are obtained from the config settings $config['avatars'], $config['avatarurl'] and $config['avatarsize'].
The maximum avatar dimensions are obtained from the theme settings $theme['PictureWidth'] and $theme['PictureHeight'].
The permissible avatar file types (.gif, .jpg and .png) are hardcoded here.
The PHP function getimagesize is used for checking the image dimensions and image type.
------------ P.S. The instructions show how to add this function to the admin menu, but you can also run this as a standalone script, if you prefer not to modify admin/menu.php.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.