The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#62
|
|||
|
|||
Should I be worried that talking to myself is solving all my problems?
So anyway, I got it installed, everything seemed to be working, except the weight limit function didn't seem to be catching things correctly. I left it set at the 35840 bytes that the query given in the mod has. I then attempted to load a sig pic that is about 218kB....and it let me. That seemed odd. So after a bunch of experimenting, I discovered that the remote_file_size function is returning value that's off by a factor of exactly 10. So it thinks my image (which is 223,554 bytes) is only 22,355 bytes (so the actual size, divided by 10). In another test, an image of size 134,154 was only blocked once the limit was set to 13,415 or below. Combing through the function, nothing is jumping out to my untrained eye, but something is definitely wrong. For now, I'm just going to use the work around of changing if (remote_file_size($checkimage) > $vboptions['sigmaxweight']) to if (remote_file_size($checkimage)*10 > $vboptions['sigmaxweight']). I've tested this, and it works. But if anyone would like to debug the function and see where it's losing this factor of 10, be my guest. |
#63
|
|||
|
|||
Quote:
The only problem is it ALWAYS makes the signature area that big. Even if its just a couple of words. Probably impossible but any way to do some sort of if statement to check if the signature contains an image? |
#64
|
|||
|
|||
I've figured out a solution
disable [img] tags in signatures create a new bb code called sig Title: Signature Image Tag: sig Replacement: <div style="width:500px;height:140px;overflow:hidden;"> <img src="{param}"></div> (change this as you see fit) Example: [sig]http://www.yoursite.net/samplesig.gif[/sig] Description:This is similar to the [img] tag but is used for signatures only. This way only images take up the full space. If someone has a smiley or a short piece of text it wont make the signature area bigger than it needs to be. |
#65
|
|||
|
|||
I've modified the hack so that smilies do not count against the limit of number of images in the signature. The way I did it was quick and dirty, I'm sure there's a more elegant solution, but this works and entails just adding one line and modifying one other. I'm still a php novice, so I went with what works. If someone wants to clean it up, be my guest. My solution has 2 steps:
1) In the Quick Sig Image Size Limiter code, find the conditional: Code:
if( count($sigimages[2]) > $vboptions['sigmaximages'] ) Code:
if( (count($sigimages[2])- fetch_character_count($parsedsig, '<img src="http://[your domain]/[your board's root directory]/images/smilies/"'))> $vboptions['sigmaximages'] ) 2) Directly above the line you just modified, add: Code:
require_once('./includes/functions_misc.php'); |
#66
|
||||
|
||||
Quote:
|
#67
|
|||
|
|||
Code:
vBulletin Message An error occurred while attempting to execute your query. The following information was returned. error number: 1064 error desc: You have an error in your SQL syntax near '; INSERT INTO `setting` (varname, value, optioncode, displayorder, grouptitle,' at line 1 Code:
INSERT INTO `setting` (varname, value, optioncode, displayorder, grouptitle, defaultvalue, advanced, volatile) VALUES ('sigmaxheight', '150', '', 141, 'user', '480', 0, 0); INSERT INTO `setting` (varname, value, optioncode, displayorder, grouptitle, defaultvalue, advanced, volatile) VALUES ('sigmaxwidth', '400', '', 142, 'user', '640', 0, 0); |
#68
|
|||
|
|||
Okay i must be doing something wrong... because i followed the instruction to the T ...and its still not working.. meaning it allows me to add limitation to the size height n width..but does not validate it..when members go beyond the size of 500 X 125 ?? why?.. i must be doing something wrong...its still allowing members to have large images in their signitures... :ermm:
|
#69
|
|||
|
|||
thanks, I really needed this.
|
#70
|
|||
|
|||
Alright, I'm trying to re-implement this hack on 3.0.7, and when I try to run the first query
Quote:
Quote:
|
#71
|
|||
|
|||
IF you have installed it on a previous version of vB, you will probably only have to redo the file edits. You are now trying to insert a value into the database that already exit.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|