vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - HS - External Signature Image Size Limiter (https://vborg.vbsupport.ru/showthread.php?t=137167)

jags2ooo 04-25-2007 07:11 PM

Empty Signature Cache did not work i set the limit to 500x150 this guy here has a 584 px width sig >< any suggestions ? http://forum.lineage2exile.com/showt...=3965#post3965

another guy has OMG the width of a website
http://forum.lineage2exile.com/showt...=3978#post3978

da420 04-26-2007 09:21 PM

Quote:

Originally Posted by jags2ooo (Post 1235401)
Empty Signature Cache did not work i set the limit to 500x150 this guy here has a 584 px width sig >< any suggestions ? http://forum.lineage2exile.com/showt...=3965#post3965

another guy has OMG the width of a website
http://forum.lineage2exile.com/showt...=3978#post3978

I could be wrong as I don't have this installed, but from what I understand this does not resize, but a limits. So rebuilding the cache would have nothing to do with it. Next time they try and change their sigs it will inform them if it's too big or not. You will have to force them to update their sigs manually, by either informing them, or deleting the image yourself.

BSLFE 04-28-2007 02:56 PM

sorry but it doesn't work for me either :(

vB 3.6.5

schanulleke 05-01-2007 11:03 AM

I tried, but for me it doesn't work as well. :(

gg_luna128 05-01-2007 03:01 PM

Does this work with Safe Mode On and Allow Fopen Off?

StrifeX 05-01-2007 03:05 PM

It should work flawlessly the way I've claimed it does, I've never guarenteed that once they have a signature you could get rid of it, someone simply told me that.

Quote:

Originally Posted by da420 (Post 1236096)
I could be wrong as I don't have this installed, but from what I understand this does not resize, but a limits. So rebuilding the cache would have nothing to do with it. Next time they try and change their sigs it will inform them if it's too big or not. You will have to force them to update their sigs manually, by either informing them, or deleting the image yourself.

Thanks for clearing that up.

gg_luna128 05-02-2007 05:07 AM

It works with Safe Mode On! But, there's a way to add a limit to size in KB?
They might put a .bmp image in the signature =\

jw00dy 05-04-2007 03:29 AM

Awesome work. It didn't fix the ones already there, but it won't let a new one be added which works for me. I bet when they save their sig it will probably give them the error and they will have to remove it or cancel then.

schanulleke 05-04-2007 07:30 PM

After I installed this plugin, it gives an error when you save a signature. Even if the image is within the limits. If the image is too large, you get the same error and the image will still be shown.

Does anybody understand this message :

Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /profile.php(1189) : eval()'d code on line 10

Warning: getimagesize(http://img423.imageshack.us/img423/443/ilseai7.gif) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /profile.php(1189) : eval()'d code on line 10


I would really like the plugin to work.

phiber 05-10-2007 01:04 AM

Nice hack, It is possible to limit text also? Thanks in advance!

Mrdby 05-18-2007 08:08 PM

installed

Dannyloski 06-30-2007 06:30 PM

w00t lovely hack, installed! ... Now all I need is an External Signature Image FileSize Limiter Hack, lol ... Hmmmm, can you do it?

oicyu8chu 06-30-2007 07:18 PM

Thanks, works lovely.

Choo

JesterP 07-04-2007 02:28 PM

I've installed and followed the instructions to the letter but it still allows users to post any size they wish.

Can anyone tell me this will work in 3.6.7? I'm starting to feel dumb. :/

Thanks!

J

Dannyloski 07-04-2007 04:22 PM

^ What other Hacks do you have installed?

Have you gone into the Plugin Manager and set up the width and height accordingly?

AdminCP > Plugins & Products > Plugin Manager > Scroll down to Product : HS - External Signature Image Size Limiter > [Edit] > Change the top 2 Options under "// Set max image width and height"

StrifeX 07-09-2007 06:40 AM

Hack updated, some of you may like it more. :)

Dannyloski 07-09-2007 04:29 PM

Great job! I like the fact that the upgrade now supports the fact that you can edit the Width & Height via the AdminCP, rather then having to change the info manually in the Plugins section.

Any thoughts of creating a FileSize Hack for External Images?

In addition, I have tried using the Admin CP > Update Counters > Empty Signature Cache Setting, but it's still not making this hack apply to users who already have signatures over the limit ... Any suggestions?

- Danny

BaconDelight 07-09-2007 07:07 PM

Is there a change history between the versions somewhere? It's not in the read me and I'd like to see if the changes made in this version warrant an upgrade. Thanks.

oicyu8chu 07-09-2007 07:15 PM

Thanks for the update. The filesize option would be great for a future release. I hate it when people add gifs that are over 1MB in size. :(

Choo

StrifeX 07-09-2007 07:22 PM

Quote:

Originally Posted by Dannyloski (Post 1286826)
Great job! I like the fact that the upgrade now supports the fact that you can edit the Width & Height via the AdminCP, rather then having to change the info manually in the Plugins section.

Any thoughts of creating a FileSize Hack for External Images?

In addition, I have tried using the Admin CP > Update Counters > Empty Signature Cache Setting, but it's still not making this hack apply to users who already have signatures over the limit ... Any suggestions?

- Danny

The filesize option is planned for a future upgrade.

All that does is clear out current signatures so they'll have to re-enter their signature. In short, it's a more complex way of doing it than it sounds. Then again, it's the only way.

Quote:

Originally Posted by BaconDelight (Post 1286931)
Is there a change history between the versions somewhere? It's not in the read me and I'd like to see if the changes made in this version warrant an upgrade. Thanks.

Check out the first post on the first page. :)

Quote:

Originally Posted by oicyu8chu (Post 1286938)
Thanks for the update. The filesize option would be great for a future release. I hate it when people add gifs that are over 1MB in size. :(

Choo

You're welcome, and as I said above, the filesize option is planned for a future upgrade.

Dannyloski 07-09-2007 08:51 PM

Ohhh so that's what that options does? Hmmmm it still isnt doing anything ... Anyways, glad to hear bout the FileSize Limiter in the near future ...

JesterP 07-09-2007 10:13 PM

Quote:

Originally Posted by schanulleke (Post 1241535)
After I installed this plugin, it gives an error when you save a signature. Even if the image is within the limits. If the image is too large, you get the same error and the image will still be shown.

Does anybody understand this message :

Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /profile.php(1189) : eval()'d code on line 10

Warning: getimagesize(http://img423.imageshack.us/img423/443/ilseai7.gif) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /profile.php(1189) : eval()'d code on line 10


I would really like the plugin to work.

Check your php.ini file for this setting:

allow_url_fopen = on

Make sure yours says 'on', mine was 'off', and I got your exact error, I changed it to 'on' and it worked like a charm.

Hope that helps

J

StrifeX 07-09-2007 10:18 PM

Quote:

Originally Posted by Dannyloski (Post 1287032)
Ohhh so that's what that options does? Hmmmm it still isnt doing anything ... Anyways, glad to hear bout the FileSize Limiter in the near future ...

Your misinterpreting the purpose of the Update Counters function, it does exactly what I said it does.
Quote:

Originally Posted by JesterP (Post 1287090)
Check your php.ini file for this setting:

allow_url_fopen = on

Make sure yours says 'on', mine was 'off', and I got your exact error, I changed it to 'on' and it worked like a charm.

Hope that helps

J

Good job clearing that up, think I should include that in the main post?

JesterP 07-09-2007 10:37 PM

Quote:

Originally Posted by StrifeX (Post 1287093)
Good job clearing that up, think I should include that in the main post?

I'm thinking there will be others with that issue, so it might be a good idea to add it as a "tip". :)

Even if it's so you don't have to repeat yourself over and over and over again.

J

PS Thanks for this hack, I couldn't believe vb didn't have this built in.

Dannyloski 07-09-2007 10:47 PM

Quote:

Originally Posted by StrifeX
Your misinterpreting the purpose of the Update Counters function, it does exactly what I said it does.

I understand what the purpose of the function and what it does ... I just said that its not doing anything on my Forums - why? I have no idea. I clicked on it and I got the confirmation message that it had done it, but all the signatures still show ... Anyways, it's no biggie ...

Dannyloski 07-10-2007 04:49 PM

StrifeX,
I am getting the following error when trying to Save or Preview a Signature ...

Quote:

Fatal error: Cannot redeclare check_sig_size() (previously declared in /home/*******/public_html/profile.php(1210) : eval()'d code:5) in /home/*******/public_html/profile.php(1210) : eval()'d code on line 35

Dannyloski 07-10-2007 05:23 PM

StrifeX,
I fixed my problem above all is working fine now .. It seems that when I installed the new version, it did not overwrite the plugin in hook "profile_updatesignature_start" instead it created a new one ... So I went to Plugin Manager and saw that I had two "HS - External Signature Image Size Limiter" in that hook, I hit EDIT on both of them to see which one of them was the old one from the previous version and just deleted it ... Now all is fixed and no errors appear when Saving or Previewing a Signature. Users who upgraded from your previous version might experience this problem since the new installation does not overwrite the old plugin in that hook, just creates a new one and having the two of them causes the error ...

StrifeX 07-12-2007 03:59 AM

Quote:

Originally Posted by Dannyloski (Post 1287741)
StrifeX,
I fixed my problem above all is working fine now .. It seems that when I installed the new version, it did not overwrite the plugin in hook "profile_updatesignature_start" instead it created a new one ... So I went to Plugin Manager and saw that I had two "HS - External Signature Image Size Limiter" in that hook, I hit EDIT on both of them to see which one of them was the old one from the previous version and just deleted it ... Now all is fixed and no errors appear when Saving or Previewing a Signature. Users who upgraded from your previous version might experience this problem since the new installation does not overwrite the old plugin in that hook, just creates a new one and having the two of them causes the error ...

Thanks, and I'll be sure to tell them to delete and re-upload in the main post. :)

I'm glad you got it working, do you like it?

Dannyloski 07-12-2007 11:46 AM

^ No problem ... Do I like it? Man, I love this hack! I just cant wait for the upcoming releases that will have the option to Limit FileSizes :D that will be awesome!

Mupetz 07-17-2007 03:14 PM

I'm glad you share the information Dannyloski ; I had the same problem.
Thanks ;)

Dannyloski 07-17-2007 07:07 PM

Mupetz, no problem ... I kinda figured others would encounter it, so that's why I posted it ...

StrifeX, any news or thoughts on when the External FileSize Limiter for Sigs will be released?

Majest 08-02-2007 06:22 AM

Very nice. Installed. :)

StrifeX 08-02-2007 08:28 PM

Quote:

Originally Posted by Dannyloski (Post 1293906)
Mupetz, no problem ... I kinda figured others would encounter it, so that's why I posted it ...

StrifeX, any news or thoughts on when the External FileSize Limiter for Sigs will be released?

Sorry, but no I don't really plan on releasing that soon. I'm a bit busy atm, I should be able to get to another update in a month or two.

Abe Babe 08-27-2007 06:30 AM

Not sure why, but I was getting an error similar to the one that is fixed by changing the php.ini settings, even though I had that setting to on.

Then I realized that I had an old version, as I'd downloaded this a while back and kind of forgot about it. So I installed the latest version and it's working great now!

Combined with sinaluna's CSS Sig size limiter, this will hopefully solve 99.9% of sig issues now. As your hack will restrict the size of individual images, and the CSS one limits the total area that a signature takes up [imgs + text].

Abe Babe...

Riccardo83 09-13-2007 09:15 AM

does this mod work with 3.6.8 ?

peterpigman 09-15-2007 08:00 PM

Is there no way to do this without the php.ini file? i had to remove it to get vbseo to work and when i put it back it kills the site.

Dannyloski 09-22-2007 02:11 PM

Works perfectly on vB 3.6.8 ... Any news on the FileSize Limiter StrifeX?

scarex80 09-25-2007 05:50 AM

Code:

$maxsigweight=40000;
;
function check_sig_size($sig)
{
    global $maxsigwidth, $maxsigheight, $maxsigweight, $errors, $vbulletin;
    $sig = str_replace(array('  ', '\\"'), array('', '"'), $sig);
    $ary_header = get_headers($sig, 1);                 
    $imgdimension = $ary_header['Content-Length'];

   
    if ($imginfo = getimagesize($sig))
    {
        if ($imginfo[0] > $maxsigwidth or $imginfo[1] > $maxsigheight or $imgdimension>$maxsigweight)
        {
            $vbulletin->GPC['preview'] = 'true';
            $errors[] = fetch_error('signaturetoobig', $maxsigwidth, $maxsigheight,$maxsigweight);
        }
    }
}

With the addings in red, I'm now able to check even the size in bytes of the images :) It works on 3.6.8

Dannyloski 09-25-2007 08:09 PM

^ I tried that, but I get this error when I hit "Save Signature" or "Preview Signature" on the Signature Page ... I added it to the Plugin ...

Quote:

Fatal error: Call to undefined function: get_headers() in /home/talkjdm/public_html/profile.php(1210) : eval()'d code on line 20

9a-nofear 10-06-2007 01:45 PM

i wonder where is php.ini ??


All times are GMT. The time now is 10:18 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.01479 seconds
  • Memory Usage 1,831KB
  • 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_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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