Description: Allows an administrator to upload a user's avatar.
Working Under: UBB.Threads 6.2-6.3
Mod Status: Finished
Any pre-requisites: PHP >= 4.0.5
Author(s): Dave_L
Date: 05/30/03
Credits:
Files Altered: admin/menu.php (optional)
New Files: admin/upload_avatar.php
Database Altered: yes (updates Users.U_Picture, Users.U_PicWidth and Users.U_PicHeight)
Info/Instructions: 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.
------------ 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. ------------
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 2003-05-12 Dave_L - 1.0.2 chmod uploaded file to 0666 2003-05-30 Dave_L - 1.0.3 Record actions in admin log
Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
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.