PDA

View Full Version : Signature Image Size Limiter


Chris M
06-14-2005, 10:00 PM
Installation Instructions

Step 1: Upload the .xml file to the Product Manager
Step 2: Alter the plugin code variables to reflect your signature image limits in height and width
Step 2: Click INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=83146):D

Credits
Zero Tolerance (https://vborg.vbsupport.ru/member.php?u=48782) - For helping with the regex and troubleshooting my annoying problems ;)

Updates
1.0.1 - Nothing major, just removed some code that is not needed

To remove this without re-uploading the plugin, find in your plugin code:
print_r($imginfo);
and remove it - I put this in there for testing purposes and forgot to remove it :rolleyes:

1.0.2 - This is just a bug fix update ;)

Find in the plugin code:
$this->registry->options['allowdynimg']
replace with:
$vbulletin->options['allowdynimg']

As always, no need to upload the new plugin if you apply the fix directly to your plugin code ;)

Chris

M1th
06-15-2005, 03:39 PM
Oh w00t. Me likey!

C.Birch
06-15-2005, 04:43 PM
Error: See image.

Dan
06-15-2005, 04:45 PM
I like this one Chris, good job!
/me clickies install

xxskullxx
06-16-2005, 01:10 AM
Nice one! I'll definately be using this.

ThePimp
06-16-2005, 04:51 AM
Doesn't seem to work for me.
Uploaded Plugin -> Added Error Phrase -> Set Size Limits -> Visited the board and the sigs that are large are still visible, with no error.

Trickyphillips
06-16-2005, 05:17 AM
Doesn't seem to work for me.
Uploaded Plugin -> Added Error Phrase -> Set Size Limits -> Visited the board and the sigs that are large are still visible, with no error.

I believe it will only display the error, when a user is setting their signature. You'll have to use an SQL query to reset everyone's signature, and tell them that they need to change it back themselves. While they're setting it, the restrictions will apply.

Jagged Tooth
06-16-2005, 05:24 AM
Fatal error: Using $this when not in object context in C:\apachefriends\xampp\htdocs\forum\profile.php(11 70) : eval()'d code on line 23

I get that when i try to insert an image (even one small enough)

Chris M
06-16-2005, 07:59 AM
I believe it will only display the error, when a user is setting their signature. You'll have to use an SQL query to reset everyone's signature, and tell them that they need to change it back themselves. While they're setting it, the restrictions will apply.
Indeed - You will need to clear the signature field and ask everyone to re-write their signatures ;)

Satan

Chris M
06-16-2005, 07:59 AM
Error: See image.
Do you have Dynamic Image Urls enabled?

Satan

Robert Basil
06-16-2005, 08:01 AM
Does this plugin limit the images in sigs using the [img] code or something else?

Chris M
06-16-2005, 08:04 AM
Does this plugin limit the images in sigs using the [img] code or something else?
This plugin searches for every instance of an [img] tag and then extracts the url in between the tags...

It then checks the size of the image the user is trying to use, and if the size is bigger than allowed, displays an error message...

Satan

Trickyphillips
06-16-2005, 08:16 AM
This plugin searches for every instance of an [img] tag and then extracts the url in between the tags...

It then checks the size of the image the user is trying to use, and if the size is bigger than allowed, displays an error message...

Satan
Suggestion: Check for multiple images, and calculate the total height and width of the images combined. This would prevent users from using two images next to eachother as a single signature. :)

Zero Tolerance
06-16-2005, 08:26 AM
Notice:

Please note that the image checker code is fully functional, and the code is correct, however bugs within the vBulletin Plugin/Hooks System is causing these errors, as it is removing slashes without adding them first, causing stuff like \ to disappear within our code.

However this bug is not consistant on all forums, so please be aware if you are getting errors, then it is the vB system itself, and not our code.

Thank you for reading,

- Zero Tolerance

Chris M
06-16-2005, 08:32 AM
Update
1.0.2 bug fix released :)

Replace (in the plugin code):
$this->registry->options['allowdynimg']
with:
$vbulletin->options['allowdynimg']

Or you can upload the new plugin attached to the first post ;)

Satan

C.Birch
06-16-2005, 09:14 AM
Do you have Dynamic Image Urls enabled?

Satan


Yes i do.

Zero Tolerance
06-16-2005, 09:19 AM
Yes i do.
Please read: https://vborg.vbsupport.ru/showpost.php?p=667526&postcount=14

:)

- Zero Tolerance

C.Birch
06-16-2005, 09:23 AM
ok, but i was just replying to something i had been asked. but if it was a vb bug would it not also do the same type of stuff with other plug in hacks im testing? or is it a random thing?

its ok, im just installing hacks on a test board to help people find and fix bugs.

Zero Tolerance
06-16-2005, 11:22 AM
Depends what the plugins use, i found if you use the slash then it removes them, therefor in my plugins i do my best to avoid this, for now while the bug is present, hopefully it ill be fixed in beta 2 :)

- Zero Tolerance

MogKnight
06-16-2005, 11:29 AM
does this just restrict size (as in KB) or also dimensions?

Chris M
06-16-2005, 11:39 AM
Just dimensions...

A future release may contain size in KB limits, but since this current vB-related bug is preventing this plugin from functioning properly for some users, I'll leave this as it is until that is overcome :)

Satan

Martin
06-16-2005, 07:41 PM
Awesome. I can't wait for the weighting to be added :)

chiptz
06-16-2005, 09:26 PM
Hi,

Won't this increas server BW consumption, since this will make server to load every image every time a user's sig is shown?

Chris M
06-18-2005, 11:31 AM
This only checks on the image when it is added to your signature - When viewing in threads or in PM's etc, the check is not initiated ;)

Satan

sandrose
06-19-2005, 03:58 PM
This only checks on the image when it is added to your signature - When viewing in threads or in PM's etc, the check is not initiated ;)

Satan
Excellent Work. It is ready on my site: http://www.sandroses.com/abbs/

Chris M
06-19-2005, 09:43 PM
For anyone wondering, it does not need to be updated to work with Beta 2 :)

Satan

Christine
06-25-2005, 08:05 PM
Installed, tested and working flawlessly on Beta2.

:D

Chris M
06-26-2005, 02:36 PM
Glad to hear it :)

Satan

Chris M
06-30-2005, 08:08 PM
Update
Beta 3: Update to confirm that this plugin works with vBulletin 3.5.0 Beta 3;)

Satan

The Keeper
07-06-2005, 10:33 AM
Exactly where do you add an "Error Message" phrase? I've looked in the phrases manager and can't find any category for Error Messages to add the phrase into.

Chris M
07-06-2005, 11:26 AM
Exactly where do you add an "Error Message" phrase? I've looked in the phrases manager and can't find any category for Error Messages to add the phrase into.
There should be a phrasegroup called "Error Messages" beneath or above (I forget) the "Front-end Redirect" phrasegroup...

If you upgraded from 3.0.x you may have it named as "Front-end Error Messages" as the upgrade didn't (not sure about the Beta 3 one :p) update the phrasegroup name ;)

Satan

Alrasam
07-07-2005, 03:52 PM
Thank you:)

BuRNZau
07-08-2005, 10:32 AM
Works great! thanks. :)

Oblivion Knight
07-10-2005, 02:44 PM
Would it be possible to place the error in to vBulletin's $errors[] array in profile.php instead of printing the error in a separate standard_error page? I guess I'm a perfectionist, but I used to have it this way with 3.0.7 and I'm still struggling with the plugin system myself.. :(

Chris M
07-10-2005, 03:51 PM
Would it be possible to place the error in to vBulletin's $errors[] array in profile.php instead of printing the error in a separate standard_error page? I guess I'm a perfectionist, but I used to have it this way with 3.0.7 and I'm still struggling with the plugin system myself.. :(
It's worth a try :p

Try replacing, in the plugin:
eval(standard_error(fetch_error('signaturetoobig') ));
with:
$vbulletin->GPC['preview'] = 'true';
$errors[] = fetch_error('signaturetoobig', $maxsigwidth, $maxsigheight);
Then alter your phrase to something like:
Your signature image size is too large. The maximum dimensions are $maxsigwidth by $maxsigheight.
Dunno if it will work - Should do but I haven't had enough time to check out the fetch_error array or how it functions :p

Satan

Oblivion Knight
07-10-2005, 05:21 PM
Unfortunately it didn't work, and was pretty close to what I'd tried already.. :)

This is the function fetch_error (in includes/functions.php):
// ################################################## ###########################
/**
* Fetches an error phrase from the database and inserts values for its embedded variables
*
* @param string Varname of error phrase
* @param mixed Value of 1st variable
* @param mixed Value of 2nd variable
* @param mixed Value of Nth variable
*
* @return string The parsed phrase text
*/
function fetch_error()
{
$args = func_get_args();

// Allow an array of phrase and variables to be passed in as arg0 (for some internal functions)
if (is_array($args[0]))
{
$args = $args[0];
}

if (!function_exists('fetch_phrase'))
{
require_once(DIR . '/includes/functions_misc.php');
}

$args[0] = fetch_phrase($args[0], PHRASETYPEID_ERROR, '', false);

if (sizeof($args) > 1)
{
return call_user_func_array('construct_phrase', $args);
}
else
{
return $args[0];
}
}
This is the function of the array, $errors (in profile.php):
if (is_array($errors))
{
$errorlist = '';
foreach ($errors AS $key => $errormessage)
{
eval('$errorlist .= "' . fetch_template('newpost_errormessage') . '";');
}
$show['errors'] = true;
}I could easily do it editing the source file, but I'd like to try and get my head around this darned Plugin system with hooks.. Hopefully I'm not the only one struggling with it? :nervous:

Chris M
07-10-2005, 05:40 PM
Unfortunately it didn't work, and was pretty close to what I'd tried already.. :)

This is the function fetch_error (in includes/functions.php):
// ################################################## ###########################
/**
* Fetches an error phrase from the database and inserts values for its embedded variables
*
* @param string Varname of error phrase
* @param mixed Value of 1st variable
* @param mixed Value of 2nd variable
* @param mixed Value of Nth variable
*
* @return string The parsed phrase text
*/
function fetch_error()
{
$args = func_get_args();

// Allow an array of phrase and variables to be passed in as arg0 (for some internal functions)
if (is_array($args[0]))
{
$args = $args[0];
}

if (!function_exists('fetch_phrase'))
{
require_once(DIR . '/includes/functions_misc.php');
}

$args[0] = fetch_phrase($args[0], PHRASETYPEID_ERROR, '', false);

if (sizeof($args) > 1)
{
return call_user_func_array('construct_phrase', $args);
}
else
{
return $args[0];
}
}
This is the function of the array, $errors (in profile.php):
if (is_array($errors))
{
$errorlist = '';
foreach ($errors AS $key => $errormessage)
{
eval('$errorlist .= "' . fetch_template('newpost_errormessage') . '";');
}
$show['errors'] = true;
}I could easily do it editing the source file, but I'd like to try and get my head around this darned Plugin system with hooks.. Hopefully I'm not the only one struggling with it? :nervous:
Yes with the source code it should be easy to modify, and in theory it should work with the plugin :ermm:

Satan

jesus likes pie
07-10-2005, 09:00 PM
this is an ownage hack defianed


* jesus likes pie clicks installed


......hey....the /me hack works and we're runnign beta 3! ERWIN HOW DO I GET /ME FOR MY BETA?! :(

Chris M
07-10-2005, 10:40 PM
vBulletin.org is running on of the 3.0.x releases, not a 3.5.0 Alpha, Beta, Gamma, RC or Gold release :)

Satan

yinyang
07-12-2005, 01:27 AM
* installs * great work ... hmmm, have you met your nemesis, heavengod?

prawn
07-12-2005, 08:09 AM
Thanks for that great hack!

Chris M
07-13-2005, 02:36 AM
Update
Beta 4: Update to confirm that this plugin works with vBulletin 3.5.0 Beta 4;)

Satan

Brinnie
07-20-2005, 08:01 AM
can users un-ignore them, if they choose too?

Chris M
07-20-2005, 03:59 PM
can users un-ignore them, if they choose too?
:confused: Um? Pardon?

Satan

prawn
07-26-2005, 06:45 PM
seems to work with RC1 flawlessly :)

Chris M
07-26-2005, 11:22 PM
Update
RC1: Update to confirm that this plugin works with vBulletin 3.5.0 RC 1:)

Satan

Aerith_Freak
07-27-2005, 06:14 PM
Is there anyway to modify this so I can have it for images posted within a post? If the image is over a set width a hyperlink will be displayed instead to stop stretching of the postbit?

Forgive me if this has already been asked or a 3.5.0 hack is already available to do this, was in a rush when posting this.

Chris M
07-27-2005, 07:37 PM
There is a way to modify it, yes, but it will mean that your thread loading time may be increased, as the function will have to load the image and then determine if it is over a certain size...

Satan

Aerith_Freak
07-27-2005, 07:54 PM
There is a way to modify it, yes, but it will mean that your thread loading time may be increased, as the function will have to load the image and then determine if it is over a certain size...

Satan

Yeah I figured it might do that. I guess another soloution would to be when the message is posted it checks the image, and either places it in the img tag or if it is too big it places it in url tags, but I guess that would, in the long run on big forums cause massive load?

Chris M
07-27-2005, 08:27 PM
Yeah I figured it might do that. I guess another soloution would to be when the message is posted it checks the image, and either places it in the img tag or if it is too big it places it in url tags, but I guess that would, in the long run on big forums cause massive load?

Whichever way you do it, it will cause longer loading times - Of course, like with the signature image checker here, nothing is stopping the user using a smaller image to bypass the check, then renaming a larger image to the same filename and extension as the one they used to bypass the check...

The only way to ensure it is to either have them upload them as attachments, or check it on every page-load :ermm:

Satan

FleaBag
07-28-2005, 01:57 AM
Thanks Satan, always needed one of these!

Aerith_Freak
07-28-2005, 08:36 AM
Whichever way you do it, it will cause longer loading times - Of course, like with the signature image checker here, nothing is stopping the user using a smaller image to bypass the check, then renaming a larger image to the same filename and extension as the one they used to bypass the check...

The only way to ensure it is to either have them upload them as attachments, or check it on every page-load :ermm:

Satan

Well if it is done during the posting process, say when the new post information is added to the database, if it checks it then - placing [url]path[*/url] if the image is too large and [img]path[*/img] if it is within the limits - even if they changed the file on the remote server, the post would still have the url tags in it. Then you could just repeat the same process for edit post should they try and get past it that way.

:ermm:

Brinnie
08-05-2005, 03:54 AM
:confused: Um? Pardon?

Satan

Yet, once again, I was responding to the wrong thread. :rolleyes:

Anyways, thanks for the update. I'm sure the whole world could use this.

Brinnie
08-05-2005, 04:25 AM
Yeah I figured it might do that. I guess another soloution would to be when the message is posted it checks the image, and either places it in the img tag or if it is too big it places it in url tags, but I guess that would, in the long run on big forums cause massive load?



Now here's the real sollutions... To everything:

1. You configure it to only allow images from a specific directory on your server, like:
A) Your vBadvanced gallery.
B) Or someone makes the long anticipated user upload signature pic hack.
C) FTP

I don't know how reasonable this is, but one way or another, the idea is to stop the user from updating his signature on the server end. Am I right? Because after his sig is set, he can go to photobucket and replace his mymugshot.jpg with a bigger mymugshot.jpg

2. Limit the # of images.
(1) is safe number. Anything else and you're asking for it.

that is all. :)

dbembibre
08-05-2005, 09:45 PM
Installed work ok, only one thing, i find the phrases group in "frontend error messages"

Snake
08-06-2005, 08:50 AM
Great hack! Installs. ;)

Chris M
08-06-2005, 11:17 AM
Installed work ok, only one thing, i find the phrases group in "frontend error messages"

If you have upgraded from vB 3.0.x it appears that the Name of the Error Messages is not reset from "Front-end Error Messages" that was used in vB3.0.x to "Error Messages" that is used in 3.5 :)

They are both the same thing though :)

Satan

Oblivion Knight
08-11-2005, 06:56 PM
Much love to KirbyDE for helping me out with my request.. :D

This is the resulting plugin:
if ($vbulletin->options['allowsignatures'])
{
$maxsigwidth = 400;
$maxsigheight = 150;

function check_sig_size($sig)
{
global $maxsigwidth, $maxsigheight, $errors, $vbulletin;
$sig = str_replace(array(' ', '\\"'), array('', '"'), $sig);

// check valid signature image size
if ($imginfo = getimagesize($sig))
{
if ($imginfo[0] > $maxsigwidth or $imginfo[1] > $maxsigheight)
{
$vbulletin->GPC['preview'] = 'true';
$errors[] = fetch_error('signaturetoobig', $maxsigwidth, $maxsigheight);
}
}
}

$url = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vbulletin->options['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "check_sig_size('\\1')", $signature);
}
The phrase then becomes something similar to:
Your signature can not have images larger than {1}w x {2}h in pixels.

Boofo
08-11-2005, 07:21 PM
Much love to KirbyDE for helping me out with my request.. :D

This is the resulting plugin:
if ($vbulletin->options['allowsignatures'])
{
$maxsigwidth = 400;
$maxsigheight = 150;

function check_sig_size($sig)
{
global $maxsigwidth, $maxsigheight, $errors, $vbulletin;
$sig = str_replace(array(' ', '\\"'), array('', '"'), $sig);

// check valid signature image size
if ($imginfo = getimagesize($sig))
{
if ($imginfo[0] > $maxsigwidth or $imginfo[1] > $maxsigheight)
{
$vbulletin->GPC['preview'] = 'true';
$errors[] = fetch_error('signaturetoobig', $maxsigwidth, $maxsigheight);
}
}
}

$url = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vbulletin->options['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "check_sig_size('\\1')", $signature);
}
The phrase then becomes something similar to:

Is that the entire hack in this xml then?

Oblivion Knight
08-12-2005, 09:05 AM
Is that the entire hack in this xml then?Yes, you can install the plugin via hellsatan's .xml file and then replace the code with the above.

Boofo
08-12-2005, 09:32 AM
Oblivion, here's a product file for this that installs the code and the phrase for you. ;)

Snake
08-12-2005, 11:35 AM
Uhh why make a new xml file for this hack? Its already a plugin so I don't get it.

Boofo
08-12-2005, 11:51 AM
Uhh why make a new xml file for this hack? Its already a plugin so I don't get it.

The product installs the phrase, too, whereas the plug-in installs only the code and you have to manually install the phrase. Just easier to do it all at once and not have to do anything else, don't you think? ;)

Oblivion Knight
08-16-2005, 07:53 AM
Oblivion, here's a product file for this that installs the code and the phrase for you. ;)Thanks Bob, useful for quickly installing this on to my live forums as I completely forgot about it! ;)

Aeolian
09-28-2005, 11:50 PM
this ia a great addon.. :)

is it compatible with vb 3.5 gold..

thanx~

Snake
09-29-2005, 04:51 PM
Yea I wonder too.

LockeAG
09-29-2005, 08:08 PM
No , I think it is not compatible...

Keyser S?ze
09-30-2005, 12:27 AM
ok maybe im retarded but i see no error message in the list of phrase types

what am i missing? i select add new phrase but under phrase types i dont see error message

Snake
09-30-2005, 10:13 AM
You must be running on 3.5 Gold. Note that the hack is not compatiable (sp?) with 3.5 Gold.

Keyser S?ze
09-30-2005, 11:37 AM
im running 3.5 gold, installed last night, but i dont see a feild for error messages in the phrases

-edit-

ok i just spotted it, must hav been tired last night, but its accually "front-end error messages"

thanks

Aeolian
10-03-2005, 04:45 AM
hello...
a release for vb 3.5 gold would be appreciated!

Keyser S?ze
10-03-2005, 03:09 PM
hello...
a release for vb 3.5 gold would be appreciated!

this and i guess all of them, work in 3.5 gold, but yea i wish they wold update the thread titles to say whats the latest version confirmed it works on, i mean i remember back in the day ppl had hacks out for 3.0 RC1

and ud have so damn many posts with like "does this work on 3.0.6.5.8.7?

so i mean, ud think the author would update the title release

Chris M
10-03-2005, 03:14 PM
I have been away for the last two weeks, before 3.5 Gold was released to the public ;)

Please give us time to test things for ourselves, and also allow us time for personal breaks :p

Once I myself test this works on 3.5 Gold (which I will do when I get the time), I will update the title as such :)

Chris

Snake
10-03-2005, 03:17 PM
I'm glad to hear that man. :)

illusions
10-03-2005, 09:10 PM
sorry for sounding like a noob but how do you create new phrases ?

Keyser S?ze
10-04-2005, 03:45 AM
in the admincp

look at the second selection of buttons, ull see phrases and languages> click manage phrases

scroll down and hit the button add new phrase

TitanJeff
10-24-2005, 02:55 PM
I had a friend update my forum to 3.5 and added this handy-dandy plug-in. However, now I am not getting any sig images including text ones. I've checked the admin and it has them allowed. I also have turned off this plug-in and it doesn't appear to be impacting anything either. I'm puzzled but thought I might try here for an answer. Thanks.

Chris M
10-24-2005, 04:32 PM
You might want to check any numerous other plugins relating to posting functions, forum permissions, usergroup permissions or user permissions you have installed - You may want to check that your postbit template contains the correct code for a signature too :)

Chris

TitanJeff
10-24-2005, 04:42 PM
All the above looks to be in order except for the postbit template which I checked out and could not tell. Both the postbit and postbit_legacy shows red but I'm not sure what settings need to be adjusted.

TitanJeff
10-24-2005, 05:01 PM
Scratch the above. It was another plug-in called vBSEO: Conditional Signatures. I'm checking now as to what it's doing to cause this. Thanks.

DannyMilner
10-25-2005, 09:47 PM
Nice plugin there... *Clicks install*

68 Z-28
10-26-2005, 07:40 AM
This looks like it'll be installed on a board i admin, but need to wait unil it's possible to limit size(in kb). :) >bookmarks thread<

admiralapril
10-28-2005, 01:05 AM
Indeed - You will need to clear the signature field and ask everyone to re-write their signatures ;)

Satan

I can really use this hack on my forum, but I have a question before I install. Will everyone have to redo their signatures if I install this, or will it only work on people updating their signatures? I'm guessing the latter, but not sure and I don't want to frell up anyone's current signature unknowingly. Thanks. :)

Chris M
10-28-2005, 10:44 AM
I can really use this hack on my forum, but I have a question before I install. Will everyone have to redo their signatures if I install this, or will it only work on people updating their signatures? I'm guessing the latter, but not sure and I don't want to frell up anyone's current signature unknowingly. Thanks. :)

It will only work on updating signatures :)

Chris

maroceve
10-28-2005, 12:07 PM
where do i edit the file size limits ? sorry if it was mentioned...i didn t see it.

maroceve
10-28-2005, 12:12 PM
im guessin i have to edit to xml itself .

Chris M
10-28-2005, 01:36 PM
Yes you will need to edit the two variables in the plugin :)

Chris

admiralapril
10-29-2005, 02:16 AM
It works great.. thank you so much. This is something that I needed! *hits install* :)

Tru2Chevy
11-10-2005, 03:34 PM
This works great, I just installed it on my new 3.5.0 forum....

Thanks! *installed*

- Justin

FROGGYJ
11-10-2005, 06:31 PM
ok VB 3.5.1 I edited the XML with the variable I wanted...uploaded it as a product. When I check out my phrases there is nothing called "Error Message"...but looking at the XML I thought it created it for you automatically. Do I have to manually make this now?

telc
12-05-2005, 01:07 PM
Very nice plugin, would it be possible to limit the signature to X number of images and also have a vBulletin cron, that can run every couple days, and it will look through all the users signatures and recheck the image sizes. Users get sneaky and they will upload a small signature, then just upload a larger signature with the same name to their host.

Chris M
12-05-2005, 03:22 PM
ok VB 3.5.1 I edited the XML with the variable I wanted...uploaded it as a product. When I check out my phrases there is nothing called "Error Message"...but looking at the XML I thought it created it for you automatically. Do I have to manually make this now?

You will need to manually add it to the "Front-end Error Messages" phrasegroup, because you have apparently upgraded from 3.0.x to 3.5 :)

@telc - I shall look into expanding this to perform other tasks, yes, and I'll probably create a cron script to check through people's signatures :)

Chris

Antivirus
12-17-2005, 10:11 PM
Nice Job Chris, thanks!

lionslair
12-19-2005, 06:08 AM
Does this work with 3.5.2

dbembibre
12-19-2005, 07:00 AM
Does this work with 3.5.2

Yes work ok for me in 3.5.2

lionslair
12-19-2005, 07:32 AM
Ok installed thank you.

Flow Fusion
12-19-2005, 08:02 AM
So this will work on anyone tying to update his/her sig?

Chris M
12-19-2005, 02:41 PM
Yes - It will check image sizes for everyone...

I can expand it to usergroup permissions if you'd like? But that would require uploading an .xml file to the /includes/xml folder :)

Chris

cinemablend
12-30-2005, 07:32 PM
I installed this... but it doesn't seem to do anything. No effect.

paulmjno
12-30-2005, 11:27 PM
Very nice plugin, would it be possible to limit the signature to X number of images and also have a vBulletin cron, that can run every couple days, and it will look through all the users signatures and recheck the image sizes. Users get sneaky and they will upload a small signature, then just upload a larger signature with the same name to their host.

That's a real good idea.

Snake
12-31-2005, 01:21 PM
Indeed, it is.

Puntoboy
01-03-2006, 01:14 PM
brilliant, thanks again!

theo
01-13-2006, 08:41 PM
just uploaded this to 3.5.2 but seems to have no effect as i just uploaded a massive sized pic as my sig to test - any ideas

NexDog
01-14-2006, 12:48 AM
Just what we needed.

* NexDog installs. :D

Guest210212002
01-19-2006, 05:08 PM
Hmm, small problem.

It gives me:


Your signature can not have images larger than 400 width x 100 height in pixels


When I try adding it to my signature (I'm the admin), however I'm the ONLY one effected by it. :D

What am I missing?

ausnrl
01-20-2006, 04:43 AM
Is there a way of setting a special limit for different groups?

LJR
01-21-2006, 01:25 PM
Nice hack. Thanks!

Guest210212002
01-25-2006, 04:06 PM
Hmm, small problem.

When I try adding it to my signature (I'm the admin), I'm the ONLY one effected by it. :D

What am I missing?

/poke ;)

mrcrx
01-30-2006, 05:51 PM
I installed this on 3.5 and its not doing anything. reading over the thread it says i need to add a phrase. Can someone give me a step by step on this. Im new at this.

ForeverForums
01-30-2006, 10:48 PM
how do i edit the image sizes...there are no instructions with this what so ever how to use it....

gizmo4321
01-31-2006, 04:01 PM
Cool plugin! Saved me from having to write this same thing myself, which is always a plus! :D

We want to limit sigs based on user group membership; specifically we want subscribers to be able to have larger sig graphics than non-subscribers. This presents a problem for your plugin, however, because it only checks at the time the user edits their sig. I understand the reasons why this is done, and agree with them. My question is, have you got any idea what vBulletin hook I could use to check the user's sig when their subscription lapses? What I'd like to do is simply remove the graphic if they are no longer authorized to use it.

Benedict
02-03-2006, 08:26 AM
Hi, I have installed this plugin but I cant find where the admin settings are. Can someone help me please? :o


===> it's ok I found what to do i.e. edit the xml from the plugin manager

eva01_
02-05-2006, 09:51 PM
Ok call me stupid but can anyone post the SQL query for clearing everyone's signature?

amadergaan
02-06-2006, 01:14 AM
when is the 3.53 version coming out?

Puntoboy
02-06-2006, 03:55 PM
when is the 3.53 version coming out?

it works with 3.5.2.

amadergaan
02-06-2006, 10:56 PM
installed it in 3.53..works like a charm....this is a great plugin for big communities!

wanderer-zero
02-13-2006, 06:56 PM
I have installed it and it seems to not do anything. Every user is still able to add signitures that go far beyond the limits I have set. I am running vB 3.53, anyone what to do? Thanks for any help.

WichitaRacing
02-17-2006, 02:37 AM
Dumb question: Where do I "alter the plugin code variables to reflect your signature image limits in height and width"?

BeaLzeBuB
03-05-2006, 12:06 AM
grate it's working

thx

installed

thc34
03-05-2006, 07:00 PM
thanks !

Kihon Kata
03-06-2006, 08:38 PM
Does this work on 3.5.4?

Kihon Kata
03-13-2006, 01:26 PM
hello? Bueller?

Lynch
03-14-2006, 01:35 AM
forgive me for asking probably a really stupid question, but once this is installed, how/where do you set the limits?

Or do you do it within the actual xml file and THEN you upload it?

EDIT: I figured it out. Thank you TONS for this. We have issues on one of our boards with people being complete dumbasses with their sig sizes. This is righteous!

Nathan2006
03-22-2006, 01:10 AM
Thanks Chris :)

Install

phantium
03-30-2006, 10:27 AM
Can't do without it, installed. Thanks a lot!

Kalakov
05-12-2006, 01:03 AM
This option should be standard in vBulletin.

Goodjob on the hack ! =)

Lyte
07-18-2006, 01:23 AM
This plugin searches for every instance of an [img] tag and then extracts the url in between the tags... It then checks the size of the image the user is trying to use, and if the size is bigger than allowed, displays an error message... Satan

Oh... so this mod doesn't restrict the size of images just in the signature area? It will restrict all images throught the site??

I just want be clear before I install it! :)

Thanks!

Lyte

Fointy
07-18-2006, 09:52 PM
Ditto ^

PLus will it work it work in 3.54? And will this work if we have dynamic img urls enabled?

If so this is exactly what I'm looking for and I love you.

P.S. The option of adding up the heights allowing people to have several small sig imgs would be a great addition.

Mudvayne
08-02-2006, 03:28 PM
This option should be standard in vBulletin.
I second it.. Anyway.. Chris M would you please make it work for vB 3.6 ? I need that hack..

forzablues
08-10-2006, 07:00 PM
Well it isnt working :S i cant seem to edit the parameters of it. It hasnt appeared in vbulletin options either and noone seems to be replying the the questions on here anymore. Why bother

klausmx
08-19-2006, 01:31 PM
=(

i need it for 3.6

ConqSoft
08-19-2006, 02:18 PM
3.6 has extensive signature limits already built in.

klausmx
08-19-2006, 04:41 PM
yes, but i dont want to use the upload feature (bandwidth), i want user use the [img] code

nVaux
08-25-2006, 05:09 PM
for vb 3.6

Replace everything in the plugin PHP code with:


$maxsigwidth = 200;
$maxsigheight = 200;

function check_sig_size($sig)
{
global $maxsigwidth, $maxsigheight, $errors, $vbulletin;
$sig = str_replace(array(' ', '\\"'), array('', '"'), $sig);

// check valid signature image size
if ($imginfo = getimagesize($sig))
{
if ($imginfo[0] > $maxsigwidth or $imginfo[1] > $maxsigheight)
{
$vbulletin->GPC['preview'] = 'true';
$errors[] = fetch_error('signaturetoobig', $maxsigwidth, $maxsigheight);
}
}
}

$url = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vbulletin->options['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "check_sig_size('\\1')", $signature);

KJA4U
08-26-2006, 05:50 PM
Does it work with 3.5.5?

Mudvayne
08-27-2006, 01:04 AM
W00t nVaux.. Thanx a lot.. Working fine for me!

vbreal
09-13-2006, 08:08 PM
will this work for 3.6

madmaca
09-26-2006, 11:46 AM
will this work for 3.6

Doesn't seem to :(

Anyone have any ideas how I can limit the size of external [img] linked images in signatures?

This hack used to do it perfectly - but can't find one that works with 3.6.x :(

bigmonay2k
10-06-2006, 10:04 PM
will this work on 3.6.1??

libabom
10-09-2006, 11:42 AM
3.6.1 ????

lifesourcerec
10-12-2006, 03:17 AM
How do you set the limits?

lifesourcerec
10-12-2006, 03:37 AM
Ok, got it. But now how you clear out signatures so everyone starts over?

LisaD1
10-14-2006, 04:47 AM
Ok, got it. But now how you clear out signatures so everyone starts over?

Clear your signature cashe in acp > maintenance > repair / optimize tables.

ximcix
10-26-2006, 06:35 PM
Any 3.6.x updates?

tmod
10-28-2006, 05:32 PM
Any news on a version for 3.6.2?

Tmod

serhat_kk
03-04-2007, 05:36 PM
Same hack for 3.6
https://vborg.vbsupport.ru/showthread.php?t=137167

xTerMn8R
01-11-2008, 09:40 PM
Dont know if anyone even supports this any more but here's the error that we get on our board after installing the plugin. We do have Dynamic URL image thing set to "yes" in the messaging options


Warning: getimagesize(http://www.isrl-simracing.org/Tom Martin sig1.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 406 Not Acceptable in /profile.php(1222) : eval()'d code on line 12

We will be upgrading the board to vb 3.6.8 shortly but having some issues with another hack(announcements) thats not behaving well in that, so we're trying to hang on with 3.5.4 till we get the other hack working correctly. In the mean time this could be helpful for us as there's been a bit of... Well, Shall we say poor judgement on signature size pics from a small # of users, and it just a real pain in the butt to have to waste time babysitting Users for Signature pictures when there's so much more to do...LOL

thanks for any help that might still be available...

Tom ;)