vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Custom Avatars as Files (updated for vBulletin 2.2.2) (https://vborg.vbsupport.ru/showthread.php?t=11760)

Kier 03-18-2001 10:00 PM

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.

http://kier.3dfrontier.com/vbhacks/avatarasfile.gif

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.

03-18-2001 11:04 PM

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 ?

03-18-2001 11:06 PM

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 ) ?

03-18-2001 11:08 PM

Kier, you know what ? :)
It would be GREAT to port this system to attached files to :)

03-18-2001 11:12 PM

Quote:

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

Quote:

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.

03-18-2001 11:22 PM

Quote:

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 ?

03-18-2001 11:26 PM

Quote:

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

03-18-2001 11:29 PM

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.

03-18-2001 11:32 PM

Just a last question before I try to install it:

Quote:

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 ?

03-18-2001 11:35 PM

Quote:

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.


All times are GMT. The time now is 12:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01293 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete