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
  #92  
Old 06-10-2001, 07:44 PM
huythuy huythuy is offline
 
Join Date: Oct 2001
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this hack .

How can I have "custom_avartars" in another folder not the vBB fodler ? Coz I want a share avatars folder with another forum and gallery .

Thanks in advance
Reply With Quote
  #93  
Old 06-15-2001, 07:19 PM
huythuy huythuy is offline
 
Join Date: Oct 2001
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please anyone ??????
Reply With Quote
  #94  
Old 06-23-2001, 07:20 AM
Tolitz
Guest
 
Posts: n/a
Default

Has anyone been able to make this work on VB 2.0.1? What changes in the instructions did you do? I "really" like to incorporate this hack coz it'll save me valuable database space, as well as protect my avatar images with mod_rewrite ...

Anyone care to update the instructions? please?
Reply With Quote
  #95  
Old 06-23-2001, 02:12 PM
ztsky
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Tolitz
Has anyone been able to make this work on VB 2.0.1? What changes in the instructions did you do? I "really" like to incorporate this hack coz it'll save me valuable database space, as well as protect my avatar images with mod_rewrite ...

Anyone care to update the instructions? please?
Check my board
Reply With Quote
  #96  
Old 06-23-2001, 02:34 PM
ztsky
Guest
 
Posts: n/a
Default

See this,I edit this hack from Kier.
It works well on my board vb2.0.1.
this zip include two files. install_db2fileavatars.php adn install.txt.
Unzip this zip,upload and run install_db2fileavatars.php in your board admin dir.Then edit and upload your file as install.txt.
Good luck!
Reply With Quote
  #97  
Old 06-26-2001, 09:52 AM
Christian Christian is offline
 
Join Date: Nov 2001
Location: wuerzburg.germany.earth
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When the hack is installed and all files are stores in the folder, is it safe to empty the custom_avatar table then?
Reply With Quote
  #98  
Old 06-29-2001, 10:25 PM
Dimitri
Guest
 
Posts: n/a
Default

Only problem with ztsky's version of this hack is that the avatar will no longer display on the profile page, whether it's your edit profile page or someone else's view profile page. Can you modify the 'hack' in the members.php file so it still shows it in profile pages? Works fine otherwise.
Reply With Quote
  #99  
Old 07-02-2001, 07:00 PM
ztsky
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Dimitri
Only problem with ztsky's version of this hack is that the avatar will no longer display on the profile page, whether it's your edit profile page or someone else's view profile page. Can you modify the 'hack' in the members.php file so it still shows it in profile pages? Works fine otherwise.
just like this
in member.php,
1??find :
Code:
$userinfo[avatarurl]=getavatarurl($userinfo[userid]);
  if ($userinfo[avatarurl]=="") {
    $userinfo[avatarurl]="images/clear.gif";
replace with this:
Code:
$userinfo[avatarurl]=getavatarurl($userinfo[userid]);
  if ($userinfo[avatarurl]=="") {
  if ($userinfo[avatarrevision]>0) {
	  	$userinfo[avatarurl]="custom_avatars/avatar$userinfo[userid]"."_$userinfo[avatarrevision].gif";
     }	  else
    $userinfo[avatarurl]="images/clear.gif";
2??find

Code:
if ($bbuserinfo[avatarurl]=="") {
    $bbuserinfo[avatarurl]="images/clear.gif";
replace with this:
Code:
if ($bbuserinfo[avatarurl]=="") {
  if ($bbuserinfo[avatarrevision]>0) {
	  	$bbuserinfo[avatarurl]="custom_avatars/avatar$bbuserinfo[userid]"."_$bbuserinfo[avatarrevision].gif";
	}  else
    $bbuserinfo[avatarurl]="images/clear.gif";
Reply With Quote
  #100  
Old 07-16-2001, 06:39 AM
ForzaGrifo
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Dakota

the dateline you guys are talking about didn't affect it when I installed it. I just acted like it wasn't there, and just put what is in the installation instructions. It works fine without the dateline stuff.
I've got 2.0.0. So do I just ignore the dateline stuff and put what's in the installation instruction? Will it really work?

I'm hesitant of hacking the code unless I'm 100% sure it will work and not crash.

btw can somebody update the instruction for 2.0.x users?
Reply With Quote
  #101  
Old 07-16-2001, 10:02 AM
ztsky
Guest
 
Posts: n/a
Default

Quote:
Originally posted by ForzaGrifo


I've got 2.0.0. So do I just ignore the dateline stuff and put what's in the installation instruction? Will it really work?

I'm hesitant of hacking the code unless I'm 100% sure it will work and not crash.

btw can somebody update the instruction for 2.0.x users?
http://161.58.84.213/forum/showthrea...threadid=22115
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 07:34 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.05519 seconds
  • Memory Usage 2,297KB
  • 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
  • (4)bbcode_code
  • (4)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
  • (4)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