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
  #52  
Old 06-19-2004, 04:33 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just found a problem with this. If sig limits are on (example 400 characters) and the sig is text only, then the system adheres to the 400 character limit. If there are images in the signature, than it ignores the limit, and allows sigs of any length to be posted, so by adding a single image to the sig, the member can override the character limit function.

Anyone have any ideas on this one?
Reply With Quote
  #53  
Old 08-01-2004, 05:10 AM
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I installed this in 3.03 and it didn't do anything.
Reply With Quote
  #54  
Old 08-24-2004, 12:20 AM
tHe Rk tHe Rk is offline
 
Join Date: Jan 2004
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfect in 3.0.1
Reply With Quote
  #55  
Old 08-24-2004, 07:58 PM
tHe Rk tHe Rk is offline
 
Join Date: Jan 2004
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JumpD
Hmm, I installed this in 3.03 and it didn't do anything.
Did you run the Queries? Because it's not like you replace any code for this, its simply added code, so I would think it should work with every version, which leads me to believe you didn't do the queries. :ermm:

Quote:
Originally Posted by Christine
I just found a problem with this. If sig limits are on (example 400 characters) and the sig is text only, then the system adheres to the 400 character limit. If there are images in the signature, than it ignores the limit, and allows sigs of any length to be posted, so by adding a single image to the sig, the member can override the character limit function.

Anyone have any ideas on this one?
I didn't have that problem. The character limit was still working for me.
Reply With Quote
  #56  
Old 09-29-2004, 01:03 AM
gwhooooey gwhooooey is offline
 
Join Date: Feb 2003
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to make it so the images auto-resize if they're too big?
Reply With Quote
  #57  
Old 10-26-2004, 10:02 PM
Ymeaga1n Ymeaga1n is offline
 
Join Date: Mar 2003
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a question about this hack, say I upload the file 123.jpg and use it as my sig. Your hack approves it becaues it is under the max size. After the image is displayed, I make a larger image and reupload it with same name overwritting 123.jpg. Correct me if I'm wrong but if only the UserCP can check the size again there is no way to limit someone from overwriting the file.
Reply With Quote
  #58  
Old 11-11-2004, 08:07 PM
dfaonxa dfaonxa is offline
 
Join Date: Mar 2004
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, a couple of problems... I uploaded the hack to 3.03, if I try to upload a sig that's too big it gives me the error, but it didn't make any changes to the existing sigs that are too big. Any thoughts on why this is, what I can fix, or what a workaround is so I can get all my users to go change their sigs?

Also, when installing 7thgenCivic.Com's weight limit hack, I was returned the following error when I clicked on Edit Signature:

Quote:
Parse error: parse error, unexpected T_IF in /home/file/public_html/bb/profile.php on line 1339
Which is the line:

Quote:
if (!$image_size[2])
Any suggestions? Thanks!
Reply With Quote
  #59  
Old 11-11-2004, 11:05 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i thinku got some messed up code somewhere. only thing i can suggest as it does work.

btw: only way to make all users comply is to delete everyones sig and make then start over.
Reply With Quote
  #60  
Old 01-24-2005, 03:49 AM
BaconDelight BaconDelight is offline
 
Join Date: Jan 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, quick help with this. I attempted to install this hack (my first hack) on a test board. I ran all the queries, added all the phrases, and added the code into profile.php, making sure to use the corrected and updated code, including the image weight option. The admincp options showed up, however, now signatures do not show up in threads at all. I noticed this while checking to see what affect installing the hack would have on an existing sig image that's too big, so I did not check to see if the hack actually limited the size of new sigs. Once I noticed that sigs were't showing up, the very next thing I did was replace the modified profile.php with the backup I made. But even after doing this, sigs still don't show up. What's going on?

Edit: Hmm, upon further testing, it seems that it might be working correctly afterall. I think it was a matter of one signature having an image that's too large, and anothe ID that didn't have a signature to begin with.

But it seems I'm having the same issue as dfaonxa above. If I install the image weight code, going into "Edit Signature" returns an error.
Reply With Quote
  #61  
Old 01-24-2005, 04:08 AM
BaconDelight BaconDelight is offline
 
Join Date: Jan 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops, where's the :slap forehead: smiley? Misread of the image weight mod, didn't notice that where it says,

Code:
find

				if (!$image_size[2])
				{
					eval('$errors[] = "' . fetch_phrase('attachnotimage', PHRASETYPEID_ERROR) . '";');
					$preview = 'true';
				}
that the "find" isn't code, but an instruction. It's all clear now. Well, just ignore me, unless you're dfaonxa, in which case, hopefully this will help you solve your issue.
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:48 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.04402 seconds
  • Memory Usage 2,308KB
  • 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_code
  • (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