The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#32
|
|||
|
|||
Quote:
|
#33
|
|||
|
|||
Ok... can someone post a query that deletes all sig files so I don't have to go in and manually delete each one?
|
#34
|
|||
|
|||
One thing you might try, turn off:
Allow vB IMG code in signatures in the admin cp, submit, then go back and turn it back on. |
#35
|
|||
|
|||
Quote:
|
#36
|
|||
|
|||
Code:
update user set signature=""; and yes, it is possible to do it with Swf files, but I haven't written the code for that yet. |
#37
|
||||
|
||||
Herman, has there been any updates on the swf code for this hack?
|
#38
|
|||
|
|||
Ok for SWF! Here it is.. I haven't completely put a lot of thought into this code b/c I was busy today, but it will do the job.
I designed this addition to be completely independant of the IMG sig control hack.. This hack addition will only affect swf's, so if you don't care about IMG and want swfs controled, only install this, however, you can install them both, and it wll control both. find: Code:
// check max images if ($maximages!=0) { Code:
$signature = preg_replace("/(\[)(swf)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/swf\])/seiU", "\swf_size_check('\\5','\\7')", $signature); Code:
?> Code:
function swf_size_check($image, $h_w) { global $maxsigheight, $maxsigwidth; //parse_all img tags $image_xy=@getimagesize($image); if ($image_xy==NULL) { return "Image not found"; } else { //ok, here we need to see if the user specified a size(i believe the swf will //default to default size if no height width is specified, so lets get the //dimensions of the swf.. $im_width=$image_xy[0]; $im_height=$image_xy[1]; //ok, did the user specify a height? lets see... unset($params); $params=explode(" ", $h_w); foreach($params AS $param) { if (preg_match("/(height)(=)(['\"]?)([^\"']*)(\\3)/siU", $param)) { $im_height=preg_replace("/(height)(=)(['\"]?)([^\"']*)(\\3)/seiU", "\intval('\\4')", $param); } if (preg_match("/(width)(=)(['\"]?)([^\"']*)(\\3)/siU", $param)) { $im_width=preg_replace("/(width)(=)(['\"]?)([^\"']*)(\\3)/seiU", "\intval('\\4')", $param); } } if ($im_width > $maxsigwidth) { return "Sorry, swf size exceeds maximum width of ".$maxsigwidth."."; } if ($im_height > $maxsigheight) { return "Sorry, swf size exceeds maximum height of ".$maxsigheight."."; } } return "[swf=".$image."]" . $h_w . "[/swf]"; } Keep in mind, that this is NOT fully tested, but I wrote it b/c of requests. |
#39
|
|||
|
|||
BTW, why does it parse the BBCODE in the [code] statements? This is very annoying.. In my above post, where the words appear italicized, there should be [i ] and [/i ] ending tags, for those interested.
|
#40
|
||||
|
||||
i could really use this
|
#41
|
|||
|
|||
|
#42
|
||||
|
||||
thx man i installed it
|
#43
|
|||
|
|||
Excellent! I really needed this. Thanks!
|
#44
|
|||
|
|||
I thought I had this working well, installed it and tested it. I have the max images per post/signature set to 20, I set the max image height to 200 and width to 500 and saved the changes in the options screen. I tested it with a 640x480 image and sure enough, it said I exceeded the width.
I just had a new user register today, and put in a signature of 224x464. The height exceeds my limit in the option yet his signature still show up. So for some reason, it's not checking the height but it checks the width. Can someone verify that if you upload a picture that only exceeds the height limit, that this hack will work? Thanks. Oh yeah, I just double checked the code from the installation of this hack and everything matches up properly. |
#45
|
|||
|
|||
Does it work with VB2.0.3 ?
thanks ! |
#46
|
|||
|
|||
rstark, your problem may be that the HTML code is enabled, that will make him able to get a larger signature than usual, so, disable that and it ends.... And it should work with any version of vB.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|