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)

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 05:50 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.01239 seconds
  • Memory Usage 1,735KB
  • 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
  • (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