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

Closed Thread
 
Thread Tools
Details »»

Version: , by Cocomiel Cocomiel is offline
Developer Last Online: Mar 2005 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-17-2001 Last Update: Never Installs: 17
 
No support by the author.

Custom Avatars As Files Hack for VB 2.2.1
BASED ON THE KIER'S HACK

Description: This hack lets you store custom avatars in a separate folder rather than in the VBulletin database, saving space & querys in your MySQL database

Here are some of the features:
  • Allows to switch between file mode & database mode on the fly
  • You can specify the custom avatar folder
  • No SQL queries or PHP code required to display custom avatars
  • If you use the Apache Web Server, the avatars folder can be protected by .htaccess thus preventing bandwidth stealing
  • No cacheing issues with Internet Explorer 5.5
  • 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.

Intructions:
Upload install_fileavatar.php to your ADMIN directory and open it in your browser, then follow the screen instructions.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-18-2001, 10:24 PM
TheFox
Guest
 
Posts: n/a
Default

EXCELLENT HACK !!!

WORKS GREAT!

THANKS MAN
  #3  
Old 09-19-2001, 09:59 AM
grumpy grumpy is offline
 
Join Date: Nov 2001
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There seems to have been a slight problem with the database, etc etc

I backed it up first and then started from scratch, still got the same error.

I admit I don't know anything about php, but I'm curious about the coding in the instructions. For example, you say to find:
PHP Code:
if ($post[hascustomavatar] and $avatarenabled) {
        
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]"
and replace with:

PHP Code:
if ($post[hascustomavatar] and $avatarenabled) {
        if (
$usefileavatar$avatarurl=$fileavatarfolder "/avatar$post[userid]_$post[avatarrevision].gif";
        else 
$avatarurl="avatar.php?userid=$post[userid]"

As I say, I don't know PHP, but every instance I've seen of else is enclosed as } else {, but not in your script. Could this cause the error?

thanks
  #4  
Old 09-19-2001, 10:15 AM
grumpy grumpy is offline
 
Join Date: Nov 2001
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, received my tech error email, it shows:

Database error in vBulletin Control Panel: Invalid SQL: ALTER TABLE user ADD
avatarrevision INT (6) UNSIGNED DEFAULT '0' not null AFTER avatarid
mysql error: Duplicate column name 'avatarrevision'
mysql error number: 1060

  #5  
Old 09-19-2001, 03:23 PM
TheFox
Guest
 
Posts: n/a
Default

Grumpy:

if - else statements are not necessary enclosed by '}{'

I recommend you start from the original VB version ( unhacked ), and follow the instructions carefully.
  #6  
Old 09-19-2001, 03:30 PM
Cocomiel's Avatar
Cocomiel Cocomiel is offline
 
Join Date: Oct 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The second error you get is because you have the hack already installed, i will add code handle this in the next release.

If someone else is getting that error please tell.
Thanks, Cocomiel
  #7  
Old 09-19-2001, 04:28 PM
grumpy grumpy is offline
 
Join Date: Nov 2001
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure if this will help, but the error I posted from the tech email was from the first attempt.


thanks for your help
  #8  
Old 09-19-2001, 04:40 PM
Cocomiel's Avatar
Cocomiel Cocomiel is offline
 
Join Date: Oct 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, that explains everything.

The error appears because you already have an avatarrevision field in your database, that is because you already instaled another hack that added that field.

if you have phpMyAdmin instaled, select to your database
and in the USER table delete the 'avatarrevision' field

then go to the SETTINGS table and delete the last two fields

But, as previously was mentioned I suggest you to begin installing the hack with a clean VB.
  #9  
Old 09-20-2001, 12:48 PM
xtrim xtrim is offline
 
Join Date: Nov 2001
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Great work on this hack cocomiel.

I have not get into this or installed yet, but I was wandering if this hack could be made compatible or is already compatible with the avatar categories hack posted.

I dunno if its got anything to do with the code involved but I would like to know if both hacks could be installed to work together.

Thank you.
  #10  
Old 09-20-2001, 03:29 PM
Cocomiel's Avatar
Cocomiel Cocomiel is offline
 
Join Date: Oct 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xtrim, I dont know anything about that hack, but i will try to make it compatible in the next release
Closed Thread


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 08:16 AM.


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.04572 seconds
  • Memory Usage 2,289KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (8)postbit_onlinestatus
  • (10)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