vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Quick Sig Image Size Limiter (https://vborg.vbsupport.ru/showthread.php?t=60354)

Oblivion Knight 04-17-2004 08:37 PM

It appears to work for some images and not others..

Any idea why this is the case?

Boofo 05-05-2004 12:41 PM

Which images are you having a problem with?

Christine 05-15-2004 03:33 PM

Working great on 3.0.0 without any problems!

Any plans to take this out of Beta?

hogarth 05-16-2004 10:46 PM

There's a problem with PHP's getimagesize(), I've run into it many times myself. I have no idea why this problem exists but some images, mainly ones I've found were saved from Photoshop, will fail to read corrently using PHP's imaging functions -- anything: getimagesize(), imagesx(), imagepng(), etc. Because of this "limitation," I've had to use X11's convert program to do my scaling, displaying, and image information. This is accomplished by a system() or exec() call and can be expensive but I've found it works 100% of the time no matter what's thrown at it. But, this is limited to a UNIX environment and assumes the vB installation has execute permission to the program convert.

Maybe a look into the ImageMagick PHP extension imagick might be worth looking at to see if this problem goes away then. But then this hack ends up with a "requirements" list.

This hack works great on 3.0.1 perfect. But on my board I also have a problem with members putting too many images in their sigs as well. I've made a very small modification to the original source that limits the total number of images and attached it for others.

ImportPassion 05-18-2004 10:54 AM

hogarth: does that include smilies too? if so, anyway that, that could be removed?

D

Boofo 05-18-2004 11:00 AM

Quote:

Originally Posted by hogarth
There's a problem with PHP's getimagesize(), I've run into it many times myself. I have no idea why this problem exists but some images, mainly ones I've found were saved from Photoshop, will fail to read corrently using PHP's imaging functions -- anything: getimagesize(), imagesx(), imagepng(), etc. Because of this "limitation," I've had to use X11's convert program to do my scaling, displaying, and image information. This is accomplished by a system() or exec() call and can be expensive but I've found it works 100% of the time no matter what's thrown at it. But, this is limited to a UNIX environment and assumes the vB installation has execute permission to the program convert.

Maybe a look into the ImageMagick PHP extension imagick might be worth looking at to see if this problem goes away then. But then this hack ends up with a "requirements" list.

This hack works great on 3.0.1 perfect. But on my board I also have a problem with members putting too many images in their sigs as well. I've made a very small modification to the original source that limits the total number of images and attached it for others.

Can you please tell us which code was changed from the original hack so we can just upgrade what we already have? ;)

Oblivion Knight 05-18-2004 11:10 AM

Quote:

Originally Posted by Boofo
Which images are you having a problem with?

I think this was because one of the images I tested with was under a .htaccess protected directory.. The image wouldn't be displayed to the public anyway and would be prompted to enter the name and password.

I've tested several other possibilities and it keeps coming back to this.

ImportPassion 05-18-2004 11:43 PM

Quote:

Originally Posted by Boofo
Can you please tell us which code was changed from the original hack so we can just upgrade what we already have? ;)

it's 30 lines, just paste over it.

Boofo 05-19-2004 02:11 AM

Quote:

Originally Posted by 7thgenCivic.Com
it's 30 lines, just paste over it.

That part wasn't worrying me. The extra queries we need to run is what I want to know about. ;)

ImportPassion 05-19-2004 02:13 AM

figured it out all by myself.

PHP Code:

    INSERT INTO phrase VALUES('''0''setting_sigmaximages_title''Total Number of Images In Signature''5000');
    
INSERT INTO phrase VALUES('''0''setting_sigmaximagest_desc''The total number of images in signatures.''5000');
INSERT INTO phrase VALUES('''0''sig_image_too_many''The total number of images in signatures is limited to $vboptions[sigmaximages].''1000');
INSERT INTO `setting` (varnamevalueoptioncodedisplayordergrouptitledefaultvalueadvancedvolatileVALUES ('sigmaximages''3'''143'user''3'00); 



All times are GMT. The time now is 01:45 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.01157 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)bbcode_php_printable
  • (4)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