Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
Mini-Avatars Hack Released Details »»
Mini-Avatars Hack Released
Version: 1.00, by Mystikal Mystikal is offline
Developer Last Online: May 2003 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 10-12-2002 Last Update: Never Installs: 23
Is in Beta Stage  
No support by the author.

I've re-released this hack with a completely re-written database independent version Enjoy.

The mini-avatars system will enable users to have their own 16x16 image in front of their username in threads, and in the who's online portion of the website. The hack creates 1 table and alters a few files, with 2 new files created.

I'm working on the the new modifications to the admin panel, but this will get you up and running so far =)

Show Your Support

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

Comments
  #22  
Old 10-14-2002, 11:58 PM
mewgood mewgood is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Try going to /icon.php?userid=xxxx and see if its there
what do you mean?
Reply With Quote
  #23  
Old 10-15-2002, 12:17 AM
Mystikal Mystikal is offline
 
Join Date: Apr 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have phpMyAdmin or direct access to the database?

Check to make sure you actually have an entry.. maybe there's a bug but I didn't think so.
Reply With Quote
  #24  
Old 10-15-2002, 12:34 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Two questions:

Can you implement a check where it insures the user does not upload an avatar larger than 16 by 16 pixels? Personally I don't want to add the width and height attributes to the image tag, incase somebody uses a larger or smaller icon. This should be possible, if you view the avatar-source code in member.php.

Second, is there any possible way to check if the gif image contains transparency? Probably not, but I'd like all my members to make the backgrounds of their icons transparent, or else the icon looks very tacky.
Reply With Quote
  #25  
Old 10-15-2002, 02:32 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I figured my first request out pretty easily, you can forget the second since I know it's not possible.

---------------------------------------

For those wanting to check the icon size insuring it's not larger than 16x16 pixels, use this very easy to install add-on:

In member.php, find:
PHP Code:

        
if( !$HTTP_POST_FILES['file1']['size'] || $HTTP_POST_FILES['file1']['size'] < ) {
            eval(
"standarderror(\"".gettemplate("error_invalid_image")."\");");
        } 
Below it add:
PHP Code:
        // check valid image
        
if ($imginfo=@getimagesize($HTTP_POST_FILES['file1']['tmp_name'])) {
          if (
$imginfo[0]>16 or $imginfo[1]>16) {
            eval(
"standarderror(\"".gettemplate("error_invalid_image")."\");");
          }
        } 
And there we go There is no need to set width and height attributes to the image tag. You can also check for it not to be lower than a certain amount, by modifying the if statement with a lesser than (<) clause.
Reply With Quote
  #26  
Old 10-15-2002, 05:47 AM
mewgood mewgood is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes I have phpmyadmin
what do I check?
Reply With Quote
  #27  
Old 10-15-2002, 05:56 AM
mewgood mewgood is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok when I go to phpmyadmin after i click the edit button it turns an error..
first ss
Reply With Quote
  #28  
Old 10-15-2002, 05:57 AM
mewgood mewgood is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here is the error
Reply With Quote
  #29  
Old 10-15-2002, 08:17 AM
Ninth Dimension's Avatar
Ninth Dimension Ninth Dimension is offline
 
Join Date: Oct 2001
Location: London, England.
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's funny, but I was thinking on doing something like this myself a few weeks ago, but yours looks much better than anything I could have developed, so good job to you
Reply With Quote
  #30  
Old 10-15-2002, 08:41 AM
Harryli Harryli is offline
 
Join Date: Dec 2001
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the same error in phpmyadmin. Looks lige a CR behind 89a
Reply With Quote
  #31  
Old 10-15-2002, 04:46 PM
Mystikal Mystikal is offline
 
Join Date: Apr 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Velocd
Well I figured my first request out pretty easily, you can forget the second since I know it's not possible.

---------------------------------------

For those wanting to check the icon size insuring it's not larger than 16x16 pixels, use this very easy to install add-on:

In member.php, find:
PHP Code:

        
if( !$HTTP_POST_FILES['file1']['size'] || $HTTP_POST_FILES['file1']['size'] < ) {
            eval(
"standarderror(\"".gettemplate("error_invalid_image")."\");");
        } 
Below it add:
PHP Code:
        // check valid image
        
if ($imginfo=@getimagesize($HTTP_POST_FILES['file1']['tmp_name'])) {
          if (
$imginfo[0]>16 or $imginfo[1]>16) {
            eval(
"standarderror(\"".gettemplate("error_invalid_image")."\");");
          }
        } 
And there we go There is no need to set width and height attributes to the image tag. You can also check for it not to be lower than a certain amount, by modifying the if statement with a lesser than (<) clause.
This mod will -not- function on certain servers. This is why I chose -not- to include this. The reason why the getimagesize() function does not work is uknown to most people, and when I tried it.. worked on 1 server, failed on the other (both had the graphic libraries installed that were required).
Reply With Quote
Reply

Thread Tools

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 05:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08893 seconds
  • Memory Usage 2,319KB
  • 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_php
  • (2)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
  • (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