Results 1 to 15 of 132
Page 1 of 9
FirstFirst 1 2 3 ... LastLast

Thread: [RELEASE vB2.0] Custom Avatars as Files

  1. #1
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    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 are available here.

    Please insure that you have thoroughly read the instructions before asking questions, as they are probably already answered there.
    Last edited by Kier; Mon 19th Mar '01 at 3:46pm.
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  2. #2
    Senior Member Sharg is on a distinguished road
    Join Date
    Jun 2000
    Posts
    1,606
    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 ?
    Sharg.
     

  3. #3
    Senior Member Sharg is on a distinguished road
    Join Date
    Jun 2000
    Posts
    1,606
    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 ) ?
    Sharg.
     

  4. #4
    Senior Member Sharg is on a distinguished road
    Join Date
    Jun 2000
    Posts
    1,606
    Kier, you know what ?
    It would be GREAT to port this system to attached files to
    Sharg.
     

  5. #5
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    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.
    Last edited by Kier; Sun 18th Mar '01 at 9:17pm.
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  6. #6
    Senior Member Sharg is on a distinguished road
    Join Date
    Jun 2000
    Posts
    1,606
    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 ?
    Sharg.
     

  7. #7
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    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
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  8. #8
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    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.
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  9. #9
    Senior Member Sharg is on a distinguished road
    Join Date
    Jun 2000
    Posts
    1,606
    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 ?
    Sharg.
     

  10. #10
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    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.
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  11. #11
    Senior Member Sharg is on a distinguished road
    Join Date
    Jun 2000
    Posts
    1,606
    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.
    Sharg.
     

  12. #12
    Senior Member Chris Schreiber is on a distinguished road
    Join Date
    Jun 2000
    Location
    Philadelphia, PA
    Age
    37
    Posts
    4,113
    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
    Chris Schreiber || Fast 4GL Systems, Inc. || ProgressTalk.com Forums

    * vBulletin Moderator (MySQL / Server Configuration) and Support
     

  13. #13
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    Fixed

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

    Code:
    UPDATE setting SET title='Store Custom Avatars as Files?' WHERE varname='usefileavatar'
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  14. #14
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6

    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.
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  15. #15
    Member -saturn- is on a distinguished road -saturn-'s Avatar
    Join Date
    Jan 2001
    Location
    Greece
    Age
    31
    Posts
    93
    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".
     

Page 1 of 9
FirstFirst 1 2 3 ... LastLast

Similar Threads

  1. [RELEASE vB2.0.3] Custom Avatars as Files
    By cocomiel in forum Releases: Version 2.x
    Replies: 26
    Last Post: Tue 30th Oct '01, 2:10am
  2. [RELEASE] Extract Old Custom Avatars Hack
    By phumphries in forum Releases: Version 2.x
    Replies: 5
    Last Post: Mon 20th Aug '01, 2:12pm
  3. [RELEASE v2] Allow ONLY mods and admins to use custom avatars
    By Chen in forum Releases: Version 2.x
    Replies: 1
    Last Post: Thu 9th Aug '01, 3:34pm
  4. [RE-RELEASE custom avatars-as-files]
    By ztsky in forum Releases: Version 2.x
    Replies: 1
    Last Post: Mon 30th Jul '01, 7:59pm
  5. [RELEASE] Vb2.0 Viewing custom avatars
    By JeroenBoonstra in forum Releases: Version 2.x
    Replies: 0
    Last Post: Wed 16th May '01, 7:11am

Bookmarks

Posting Permissions

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