Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Kier Kier is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

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.

Comments
  #192  
Old 02-18-2002, 04:11 PM
newvbuser newvbuser is offline
 
Join Date: Jan 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I install this hack, what happens to the 20 or so users who are already using custom avatars and those are all stored in the dbase? Do I have to redo each of them? Thx !!
Reply With Quote
  #193  
Old 02-18-2002, 04:22 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Erwin Loh
Another note: Jawelin, your fix for the Welcome Panel and the User Profile does not help - avatar.php is still being used to display the avatars.
Mine isn't a 'fix', but a variation... as I used a parameter to setup the custom avatar directories.

If you always see the avatar.php? link instead of the image directly on the server, most probably your code doesn't enter the main if clause to that url.
Are all the settings correct ?
Reply With Quote
  #194  
Old 02-18-2002, 05:13 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I only see the avatar.php in the instances that I listed out. In all other cases (eg. in the postbit), I see the avatar on the server.
Reply With Quote
  #195  
Old 02-18-2002, 05:54 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think that was exactly the goal the author of this hack would reach: obtain a sensitive decrease of db queries to show avatars.

Reply With Quote
  #196  
Old 02-18-2002, 06:02 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I understand.

Thanks! The goal was reached admirably by the talented author.
Reply With Quote
  #197  
Old 02-19-2002, 03:19 AM
newvbuser newvbuser is offline
 
Join Date: Jan 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack creates mod to the database. When and if we upgrade to 3.x or something in between 2.2.2 and 3.x, would it affect the upgrade or would we hvae to manually drop the tables or it'll just ignore the extra tables?
Reply With Quote
  #198  
Old 02-19-2002, 04:09 AM
newvbuser newvbuser is offline
 
Join Date: Jan 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I installed this hack and it works great (PM's and messages show filed avatars). clicking on Profile still shows avatars via database so I'm not sure what'll happen when a new custom avatar is added.

My question is how to make sure the database will work with the new version when it is released?

Thanks kier for the great hack!
Reply With Quote
  #199  
Old 02-19-2002, 07:16 AM
Wolf42's Avatar
Wolf42 Wolf42 is offline
 
Join Date: Nov 2001
Location: Vienna, Austria, Europe
Posts: 150
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this hack Kier, works perfectly!
Reply With Quote
  #200  
Old 02-21-2002, 03:29 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great, Kier, thanks!!!!

I didn't see any mention in the readme of where to create the custom_avatars folder or that it had to be chmod set to 777, but managed to glean that from posts in the thread. Still, should be something included in the readme.

Just my 2c Australian, +GST
Reply With Quote
  #201  
Old 02-22-2002, 02:22 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kier, excuse if I'm still here.... :greedy:
Well. As I often said, your hack v2.2.2 works very well....

But, alone... :china: I tried installing other hacks like welcome panel and generally those which use getavatarurl() function to retrieve the name...
As already said, I even tried to modify myself that function you seem having forgotten in readme.htm.
Also tried to use the Bira's upgrade to 2.2.1 some posts above.

But still I see some image holes linking :
http://forumurl/images/avatars/custom/avatar1_0.gif
if I have a standard forum avatar and not a custom one....
(I'm UserId=1 and, remember, I changed the default directory, but it's seen correctly and this isn't the problem)...

It means that somehow the above fuction doesn't recognize I have a standard avatar and not a custom one....
Instead, in postbit and elsewhere (where the function isn't called), the right standard avatar is displayed linking to the image and not to the avatar.php? script, correctly as your hack makes it.

Are you planning to modify - also standing on all the above difficulties users found - that function too ?
Why not ???
:noid:

Thanks
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 01:32 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04534 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete