Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Custom Avatars as Files (updated for vBulletin 2.2.2) Details »
Custom Avatars as Files (updated for vBulletin 2.2.2)
Mod Version: 1.00, by Kier (Member) Kier is offline
Developer Last Online: May 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (0 vote - 0 average) Installs: 52
Released: 19 Mar 2001 Last Update: Never Downloads: 4
Not Supported  

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.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Custom Avatars as Files Cocomiel vBulletin 2.x Full Releases 76 22 Mar 2002 12:57
[RE-RELEASE custom avatars-as-files] ztsky vBulletin 2.x Full Releases 1 30 Jul 2001 23:59

Comments
  #2  
Old 19 Mar 2001, 01:04
Guest
 
Hi kier,
does your system allow admin to set max avatar size (lets say 80 x 80) and a weight (lets say 3ko) ?

This worked with mysql storing , will it work with your sysem ?
Reply With Quote
  #3  
Old 19 Mar 2001, 01:06
Guest
 
Oh, and does it allow user to upload their files, switch from one avater to the other (and have the previous one replaced and eareased ) ?
Reply With Quote
  #4  
Old 19 Mar 2001, 01:08
Guest
 
Kier, you know what ?
It would be GREAT to port this system to attached files to
Reply With Quote
  #5  
Old 19 Mar 2001, 01:12
Guest
 
Originally posted by Sharg
does your system allow admin to set max avatar size (lets say 80 x 80) and a weight (lets say 3kb) ?

Oh, and does it allow user to upload their files, switch from one avater to the other (and have the previous one replaced and eareased ) ?
Yes, All avatar options that are present when using the standard mySQL avatar system are still present

Originally posted by Sharg
Kier, you know what ?
It would be GREAT to port this system to attached files to
I'm not really interested in doing this for attached files, partly for security reasons, and partly because storing attachments in the database does not have the same problems/disadvantages as the avatar system. The reason I have done this for avatars is mainly to solve a problem with IE's cache which causes avatars to be downloaded again for every page, leading to increased server load and bandwidth use.
Reply With Quote
  #6  
Old 19 Mar 2001, 01:22
Guest
 
Yes, All avatar options that are present when using the standard mySQL avatar system are still present
Ok, just wanted to make sure they worked with directory storing, as I thought these size and weight option were database storing specific.

Another question: do I need to set to 777 the directory storing the avatars ?
Reply With Quote
  #7  
Old 19 Mar 2001, 01:26
Guest
 
Originally posted by Sharg
Another question: do I need to set to 777 the directory storing the avatars ?
Do the instructions say you have to? Have a read. http://kier.3dfrontier.com/vbhacks/avatarasfile.php
Reply With Quote
  #8  
Old 19 Mar 2001, 01:29
Guest
 
And I quote:

1) Firstly, you will need to create a new folder in your forums directory called custom_avatars and set the permissions on the folder to 777.
Reply With Quote
  #9  
Old 19 Mar 2001, 01:32
Guest
 
Just a last question before I try to install it:

I'm not really interested in doing this for attached files, partly for security reasons,
What's the security concern that attachement files folder storing involve that isn't involved by avatar folder storing ?
Reply With Quote
  #10  
Old 19 Mar 2001, 01:35
Guest
 
Originally posted by Sharg
What's the security concern that attachement files folder storing involve that isn't involved by avatar folder storing ?
Avatars are always stored as xxxx.gif. Attachments can be of any file type that the administrator decides to allow. If an administrator decided to let .php files be uploaded, and they were stored as files on the system, anyone could run a php script that could destroy the server.

It's a bad idea.
Reply With Quote
  #11  
Old 19 Mar 2001, 01:41
Guest
 
Ok, got it, thanks Kier.
I didn't considered this cause I would only allow jpg,gif, txt and zip and would use it.

Anyway, good job with this hack. Gives the webmaster the final decision.
Reply With Quote
  #12  
Old 19 Mar 2001, 02:14
Guest
 
Another wonderful hack, thanks Kier.... I already have it installed and working on Me2Be's forums.

Just one small typo, in the control panel options, it says "Store Custom Avatars in Database?", but this has to be set to "yes" to use files, "no" to use the database. It should say "Store Custom Avatars as Files?". But otherwise it works great!

Thanks
Reply With Quote
  #13  
Old 19 Mar 2001, 02:23
Guest
 
Fixed

If you have this problem and want to correct it, run this query:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #14  
Old 19 Mar 2001, 02:40
Guest
 
important

I just discovered that two php files that require modifications were not mentioned in the original documentation... please revisit the docs and follow the steps to modify private.php and announcement.php if you installed this hack prior to the posting of this message.
Reply With Quote
  #15  
Old 19 Mar 2001, 11:22
Guest
 
Kier, you are great!

Are all avatars stored as GIFs? Even those uploaded as JPGs? I'm asking because you said "Avatars are always stored as xxxx.gif".
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:42.

Layout Options | Width: Wide Color: