Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Mod Name / Version: Upload Avatar 1.0.3

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.
Attachments
79896-upload_avatar_1-0-3.zip (0 Bytes, 68 downloads)

Last edited by Dave_L; 05/30/2003 2:24 AM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thansk Dave.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
yes, thanks, very handy


- Allen wavey
- What Drives You?
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
This fix the distortion problem? Thanks I got a previous version working and love it.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
If a user edits his profile, the avatar dimensions get reset to the theme defaults. That's a bug in changebasic.php that is unrelated to this hack.

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Updated to version 1.0.3 - Record actions in admin log.

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Thx, Dave!

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Cheers Dave - very handy


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)