Version: , by Kier
Developer Last Online: May 2011
Version: 2.2.x
Rating:
Released: 03-18-2001
Last Update: Never
Installs: 52
No support by the author.
Updated for vBulletin 2.2.2, 5th February 2002
Since there has been so much demand for this, I wrote a hack that will allow you to store all your custom avatars as files, rather than in the mySQL database.
Doing this will have the following benefits:
Avatars folder can be protected by .htaccess (Apache only) to prevent bandwidth stealing
No SQL queries or PHP code required to display custom avatars - server load decreases
No cacheing issues with Internet Explorer 5.5, so server bandwidth use should decrease
The install script will make the necessary modifications to your database, install a control panel option to switch the file-based avatars on, and convert your existing custom avatars from the database into files.
All avatar options that are present when using the standard mySQL avatar system are still present, and users will not notice a difference in the interface.
Full instructions for altering your PHP files are included in the zip file.
Once you have made the necessary modifications to the PHP scripts, you should run the enclosed install_favatar.php script from your admin/ folder.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Another stunning effort. Just one question. I know you have been in close connection with the developers on this issue, so do you know if this hack will be in Beta 4? I just don't want to install it then re-install when beat 4 comes out.
How about one last modification to avatar.php to prevent bandwidth stealers from circumventing the security measures people may put on the custom_avatars folder. Only bring this up because now there is a customavatar record again.
Either returning nothing, or the clear.gif image.
Ok, that's it... I promise. =) No, really! heheheh
Great work on the hack, and responding so quickly with a fix to the previous post of mine.
If you installed the hack previous to this message, please revisit the instructions and follow the steps to modify admin/user.php... I completely forgot to hack that file before
One thing before I install this hack. Will the database change that this hack does cause any problems when I upgrade to beta4? (Other than changing the php files of course)
Would I be able to use this hack in conjunction with upgrading my 1.13 forum.
See, right now the current VB 2.0 upgrade1.php script does not upgrade my "custom_avatar" table from freddies VB 1.13 "Custom Avatar HAck"...which means my users will have to all re-upload their custom avatars.
You seem to be a hack master around here lately...do you think you could figure it out?
If so here is the information: Here is my old 1.13 "custom_avatar" table:
Code:
CREATE TABLE custom_avatar (
id int(6) NOT NULL auto_increment,
bin_data longblob NOT NULL,
filename varchar(50) NOT NULL,
filesize varchar(50) NOT NULL,
filetype varchar(50) NOT NULL,
userid int(10) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (id),
UNIQUE userid (userid),
KEY userid_2 (userid)
);
And here is the new VB 2.0 "customavatar" table:
Code:
CREATE TABLE customavatar (
userid int(10) unsigned DEFAULT '0' NOT NULL,
avatardata mediumtext NOT NULL,
PRIMARY KEY (userid)
);
Anything you could do to help me salvage my current user's custom avaatrs would be fantastic. Even if it means upgrading the custom avatars into your hack...which I want to store them outside the database anyway.
rename bin_data to avatardata, change the type to mediumtext.
Drop the second index userid_2
p.s. now watch your avatars blow up in size as my hack made no checks on image height/width, only filesize. It used img tags to force all images to be the same size when displayed.