vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Mini-Avatars Hack Released (https://vborg.vbsupport.ru/showthread.php?t=44593)

mewgood 10-14-2002 11:58 PM

Quote:

Try going to /icon.php?userid=xxxx and see if its there
what do you mean?

Mystikal 10-15-2002 12:17 AM

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.

Velocd 10-15-2002 12:34 AM

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.

Velocd 10-15-2002 02:32 AM

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 :p 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.

mewgood 10-15-2002 05:47 AM

yes I have phpmyadmin
what do I check?

mewgood 10-15-2002 05:56 AM

Ok when I go to phpmyadmin after i click the edit button it turns an error..
first ss

mewgood 10-15-2002 05:57 AM

here is the error

Ninth Dimension 10-15-2002 08:17 AM

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 :)

Harryli 10-15-2002 08:41 AM

I have the same error in phpmyadmin. Looks lige a CR behind 89a

Mystikal 10-15-2002 04:46 PM

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 :p 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).


All times are GMT. The time now is 10:54 AM.

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.01074 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete