[RELEASE vB2.0] Custom Avatars as Files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trog
    Member
    • Feb 2001
    • 86

    #31
    Another stunning effort. Just one question. I know you have been in close connection with the developers on this issue, so do you know if this hack will be in Beta 4? I just don't want to install it then re-install when beat 4 comes out.

    Comment

    • PFunk
      New Member
      • Mar 2001
      • 14

      #32
      One last thorn!

      Ok, this is the final thorn I will use today.

      How about one last modification to avatar.php to prevent bandwidth stealers from circumventing the security measures people may put on the custom_avatars folder. Only bring this up because now there is a customavatar record again.

      Either returning nothing, or the clear.gif image.

      Ok, that's it... I promise. =) No, really! heheheh

      Great work on the hack, and responding so quickly with a fix to the previous post of mine.

      Comment

      • jojo85
        Senior Member
        • Jan 2001
        • 915

        #33
        one more kier
        you are the best of the best!

        Comment

        • Kier
          Former Lead Developer, vBulletin
          • Sep 2000
          • 8179

          #34
          Re: One last thorn!

          Originally posted by PFunk
          Either returning nothing, or the clear.gif image.
          Easy, if you use avatars-as-files, just edit avatar.php and at the top of the file, under <?php just put

          exit;

          I'm not going to do anything more fancy than that, as it would add extra queries to avatar.php, which I am not prepared to do.

          Comment

          • Kier
            Former Lead Developer, vBulletin
            • Sep 2000
            • 8179

            #35
            Another Addition to the Instructions

            If you installed the hack previous to this message, please revisit the instructions and follow the steps to modify admin/user.php... I completely forgot to hack that file before

            Comment

            • PFunk
              New Member
              • Mar 2001
              • 14

              #36
              Re: Re: One last thorn!

              << removed >>
              Last edited by PFunk; Tue 20 Mar '01, 6:55am.

              Comment

              • Kier
                Former Lead Developer, vBulletin
                • Sep 2000
                • 8179

                #37
                NO NO NO!!!!!!!

                Originally posted by PFunk
                Add this:

                Code:
                require("./global.php");
                if ($usefileavatar) exit;
                This will cause avatar.php not to return the graphic if Use File Avatars is enabled, otherwise, it works as before.
                Oh my god do you not want to add that!!!!

                If you use require("./global.php") in avatar.php, you will be executing huge numbers of queries every time an avatar is displayed...

                This code should really (really) not be added!

                Comment

                • Robert Basil
                  Senior Member
                  • Sep 2000
                  • 242
                  • 2.0.x

                  #38
                  Kier,

                  Great hack! This should speed up my forum a lot.

                  One thing before I install this hack. Will the database change that this hack does cause any problems when I upgrade to beta4? (Other than changing the php files of course)

                  Thanks again!

                  Comment

                  • VirtueTech
                    Senior Member
                    • Jun 2000
                    • 561

                    #39
                    Hello Kier,

                    Would I be able to use this hack in conjunction with upgrading my 1.13 forum.

                    See, right now the current VB 2.0 upgrade1.php script does not upgrade my "custom_avatar" table from freddies VB 1.13 "Custom Avatar HAck"...which means my users will have to all re-upload their custom avatars.

                    You seem to be a hack master around here lately...do you think you could figure it out?

                    If so here is the information:
                    Here is my old 1.13 "custom_avatar" table:
                    Code:
                    CREATE TABLE custom_avatar (
                       id int(6) NOT NULL auto_increment,
                       bin_data longblob NOT NULL,
                       filename varchar(50) NOT NULL,
                       filesize varchar(50) NOT NULL,
                       filetype varchar(50) NOT NULL,
                       userid int(10) unsigned DEFAULT '0' NOT NULL,
                       PRIMARY KEY (id),
                       UNIQUE userid (userid),
                       KEY userid_2 (userid)
                    );
                    And here is the new VB 2.0 "customavatar" table:
                    Code:
                    CREATE TABLE customavatar (
                       userid int(10) unsigned DEFAULT '0' NOT NULL,
                       avatardata mediumtext NOT NULL,
                       PRIMARY KEY (userid)
                    );
                    Anything you could do to help me salvage my current user's custom avaatrs would be fantastic. Even if it means upgrading the custom avatars into your hack...which I want to store them outside the database anyway.

                    Thanks for your time.
                    PaintballCity.com
                    VB Board of the Month: October

                    Comment

                    • Freddie Bingham
                      Former vBulletin Developer
                      • May 2000
                      • 14057
                      • 1.1.x

                      #40
                      drop the new customavatar table.

                      rename custom_avatar to customavatar.

                      Drop the fields id, filename,filesize, & filetype

                      rename bin_data to avatardata, change the type to mediumtext.

                      Drop the second index userid_2

                      p.s. now watch your avatars blow up in size as my hack made no checks on image height/width, only filesize. It used img tags to force all images to be the same size when displayed.

                      Comment

                      • DVD Plaza
                        Senior Member
                        • Sep 2000
                        • 697
                        • 3.0.1

                        #41
                        This might be a silly question (sorry!), but why isn't this a part of the official product?

                        Comment

                        • TechTalk
                          Senior Member
                          • Jul 2000
                          • 769

                          #42
                          Originally posted by DVD Plaza
                          This might be a silly question (sorry!), but why isn't this a part of the official product?
                          I would like to know too....

                          Kier, can we just make sure all of your hacks make it in the final releases? I would be a much happier man

                          ~Chris

                          Comment

                          • Freddie Bingham
                            Former vBulletin Developer
                            • May 2000
                            • 14057
                            • 1.1.x

                            #43
                            It will be part of 2.1

                            Comment

                            • jojo85
                              Senior Member
                              • Jan 2001
                              • 915

                              #44
                              Nice

                              Comment

                              • VirtueTech
                                Senior Member
                                • Jun 2000
                                • 561

                                #45
                                Thank you very much Kier
                                PaintballCity.com
                                VB Board of the Month: October

                                Comment

                                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                                Working...