Back to vBulletin 3.0 Add-Ons

Remotely Hosted Avatars
Mod Version: 1.00, by Dataforce

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 8
Released: 26 Feb 2004 Last Update: Never Downloads: 14
Not Supported  

Adapted from here

**NO SUPPORT GIVEN**
**USE AT YOUR OWN RISK**

=======

This has been tested, and works on VB3 RC4

not sure about other browsers.

This checks the image dimensions and if its a real image, but does NOT check the file size as the image is not being uploaded to the server, it is eing linked remotely.

Dimension checking is so that it can't screw up layouts.

=======

If A user already has an avatar that is NOTremotely hosted - it will be displayed, else the remotely hsoted avatar will be displayed.

to include the avatar in other places on your site, add an if statement:
PHP Code:
if ($post[avatar2] != '' AND $post[avatar2] != "http://www." AND $post[avatar2] != "http://"  AND $post[avatar2] != "www.") {
        
$post['avatarurl'] = $post[avatar2];

Another alternative (which unfortunatly adds another query) if you only have the userid is:

PHP Code:
$pic $DB_site->query("SELECT * FROM `"TABLE_PREFIX ."user` WHERE userid = ".$userid);
$piccy $DB_site->fetch_array($pic) ;
if (
$piccy['avatar2'] != '' AND $piccy['avatar2'] != "http://www." AND $piccy['avatar2'] != "http://"  AND $piccy['avatar2'] != "www.") {
        
$avatarurl $piccy['avatar2'];

(Replace $avatarurl with whatever the variable is for the url of the avatar to show )
=======
Requires:

File Modifications: 6
File Uploads: 0
SQL Queries: 1
Template additions: 0
Template Changes: 0

=======
Enjoy

-DF

Edit: Attatched

Edit: Fixed Small bugs
- Incomplete lines from editing in pico
- if avatar2 was "http://www." for some reason - it displayed no avatar, rather than the old avatar.

Edit: Added Ability for users to still use predefined avatars or no avatar (In last 2 If statements made it set avatar2 to http://www.)

if user enters NONE in the customavatar URL field - it also sets their avatar to no avatar. (Its up to you to change the phrase if you want your members to know - else they can use the "no avatar" setting above as normal)

Works in member.php aswell now

Edit: Fixed more Pico erros and added example of getting avatar url direclty from DB

Download

This modification is archived and cannot be downloaded.

Similar Mods

Remotely Hosted Avatars vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024