Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Quick Sig Image Size Limiter Details »»
Quick Sig Image Size Limiter
Version: 1.00, by phlogiston phlogiston is offline
Developer Last Online: Dec 2009 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-16-2004 Last Update: Never Installs: 34
Is in Beta Stage  
No support by the author.

A fairly quick and easy to install hack that attempts to check the pixel size of any images users place in their signatures. If the image is above admin set dimensions an error is given to the user explaining the valid dimensions.

I've not found a simple version of this for v3 - apologies if it's already out there somewhere!

- This is purely a BETA release as the getimagesize() function used seems to fail for certain images on one test install, unknown reason at present. This will not make the hack fail, simply some images on some servers will be allowed even if over the set size. To prevent this uncomment the five lines in the added code to give an invalid image message instead.


The options to set the size limits for signature images will be found in the admincp vBulletin Options --> User Profile Options


*****PLEASE NOTE*****
I am unable to provide any support at all for this hack - sometimes it works, sometimes it doesn't.
My knowledge dosn't reach far enough for me to understand or fix the reasons behind it failing on some installs, sorry.
If it works for you, I'm glad, if it doesn't then just revert everything and try looking at the other sig option hacks, sorry - best I can do

Show Your Support

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

Comments
  #32  
Old 04-17-2004, 08:37 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Any idea why this is the case?
Reply With Quote
  #33  
Old 05-05-2004, 12:41 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which images are you having a problem with?
Reply With Quote
  #34  
Old 05-15-2004, 03:33 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working great on 3.0.0 without any problems!

Any plans to take this out of Beta?
Reply With Quote
  #35  
Old 05-16-2004, 10:46 PM
hogarth hogarth is offline
 
Join Date: Dec 2002
Location: USA
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #36  
Old 05-18-2004, 10:54 AM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

D
Reply With Quote
  #37  
Old 05-18-2004, 11:00 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #38  
Old 05-18-2004, 11:10 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #39  
Old 05-18-2004, 11:43 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #40  
Old 05-19-2004, 02:11 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #41  
Old 05-19-2004, 02:13 AM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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); 
Reply With Quote
Reply


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 04:50 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.09292 seconds
  • Memory Usage 2,320KB
  • 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
  • (1)bbcode_php
  • (4)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