Version: 1.00, by Herman
Developer Last Online: Oct 2008
Version: 2.2.x
Rating:
Released: 06-23-2002
Last Update: Never
Installs: 54
No support by the author.
I wrote this hack so i could obviously do what the title says.
When installed it you get an option in vb option of max height and width.
If a user's sig is too big, then when you look at their sig it'll say sorry this image is too large. And if the link doesn't work, then it'll say sorry that image doesn't exist. Thnx.. Don't forget to back up the databases!
[edit]This new one gets rid of the queries.. but, you have to submit your vbulletin options after installing the hack in order for it to work.[/edit]
[edit]Update again, this fixes smooties prob's with it images being set to unlimited[/edit]
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
There seem to be a lot of signature limitation hacks
I'll install this on my test board. I want something simple, and not bloated with options, hopefully this does the job
Thanks
Originally posted by Smoothie Followed instructions, set the limit in the vb options for sig width, height, added a test sig, bigger than the allowable limit, it still shows.
The hack doesn't work retroactively as far as I see.
Ok, the one setting that needs to be changed for this to work is:
Under Posting Code allowances (vB code / HTML / etc):
Maximum images per post/signature: (This needs to be set to anything but zero.)
Ok, the one setting that needs to be changed for this to work is:
Under Posting Code allowances (vB code / HTML / etc):
Maximum images per post/signature: (This needs to be set to 1.)
Works just fine for me.. I have images set to 10 per post/sig, and It only kills the images that are too big.. For instance, if I have it set to 100x500, (default), and I add two images in my sig, one that is 320x240, and one that is 64x64, the 64x64 one stays, but the 320x240 one gets the message that its too big...
2. Before the BBCODE processor, a special function catches all img tags.
3. The function, called size_check, checks to see if the file exists, if it does, it gets the max size and width out of the configuration of your board, and checks to see if the image width is bigger first in width, then in height:
PHP Code:
if ($im_width > $max_sig_width)
{
return "[i]Sorry, image size exceeds maximum width of ".$max_sig_width.".[/i]";
}
if ($im_height > $max_sig_height)
{
return "[i]Sorry, image size exceeds maximum height of ".$max_sig_height.".[/i]";
}
4. It returns the image in BBCODE notation if it is ok, otherwise, it returns the message shown above.
5. The bbcode processes it like normal!
I wasn't sure about your question about setting it to 0.. I wasn't sure what that was refering to...
$max_height = $DB_site->query_first("SELECT value FROM setting where varname=\"maxsigheight\"");
$max_width = $DB_site->query_first("SELECT value FROM setting where varname=\"maxsigwidth\"");
You can just use $maxsigwidth and $maxsigheight (globalize them in the function). BUT, you MUST Submit the vBulletin Options page in the Admin CP for this to work.
Anyway, I'll probably install this here later, looks good.
Yea... I was trying to figure that out.. but every single time I tried to global those variables, it wouldn't work. They would return NULL. I didn't know you had to submit the vbulletin options again...lol. I'll edit the post and submit a revision.