The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Big Picture messing up your design? Install this Details »» | |||||||||||||||||||||||||||
Big Picture messing up your design? Install this
Developer Last Online: Oct 2004
What does this hack do?
This hack will check if an image that a member of your forums has inserted in the post is below the allowable width. If not, the image will be replaced with a small button that basicly says "Image too big, click here to view". When clicked, the image will appear right in the post but without messing up your forum design one bit. Example? Working example can be found here: http://www.designworldwide.com/forum/t35-s.html (note: This is on VB2 but should have the same effect. If you installed it on Vb3, send me a link so I can post it here) VB2 thread if anyone wants it: https://vborg.vbsupport.ru/showthread.php?t=63429 Please post any bugs/comments/questions here. While making this hack I had some trouble with reg. expressions and had to go around them a little (php developers can see this). Ive been coding for years now but never had the need to learn those Image: https://vborg.vbsupport.ru/showthrea...725#post495725 (Image now included in ZIP) Anyways, Enjoy! Dimitry Show Your Support
|
Comments |
#32
|
|||
|
|||
Thanks, i think it works!
|
#33
|
|||
|
|||
Can anyone tell me why this doesnt work on my board? The install is quite simple, I double checked everything and it is installed correctly on my VB3
I am not getting any java error, no board error, it's as if I never modified anything. Any ideas? :ermm: |
#34
|
||||
|
||||
Quote:
which would give errors: "Unable to add cookies, header already sent..." and "Warning: getimagesize(): stream does not support seeking ..." how should I check if the link IS image (based on image extension?), before checking if it exist? should I use $ext = strrchr($image, "."); or use exif_imagetype("$image") or something else? |
#35
|
|||
|
|||
Hello
Quote:
What about these errors? Code:
Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023 Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023 Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023 Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023 alkahf |
#36
|
|||
|
|||
Installed this and got errors galore. I'm guessing it has to do with my server, though.
What is required? (I'd post the errors but there were so many that I had to fix it immediately. I'll post them later if you're interested) |
#37
|
|||
|
|||
It would be nice to have a feature like this for signatures. I want to allow the use of the image tag in sigs., but would also like to control the size of the displayed image. Thanks.
|
#38
|
||||
|
||||
Quote:
|
#39
|
||||
|
||||
It shows the image correct but text under the image is underlined a behaves as a link. (??)
|
#40
|
||||
|
||||
<a href="http://justget.org/showpost.php?p=102313&postcount=18" target="_blank">http://justget.org/showpost.php?p=102313&postcount=18</a>
|
#41
|
|||
|
|||
Quote:
YES.....BUT READ THIS: If the image is not found on the remote host wether it be that the image was deleted or the host no longer responds, 2 things happen: 1. The thread takes forever to load. 2. It errors out and it does not display the thread. I tried to get the correct error in here but while trying to get the error to display I lost my patience and put my mouse through my monitor. I just got back from CompUSA (sale on 19inch monitors by the way...good deals)....and I was not going to risk losing it again. P.S. the mouse survived. |
#42
|
|||
|
|||
Clicking uninstall... This thing works to a degree, but too many bugs and it really slows down the thread loading for some reason.
Thanks anyway. |
#43
|
|||
|
|||
works great for me thanks
however the drop down box seem to appear over the image after its been expanded - weird ? |
#44
|
|||
|
|||
Yeah, bit too buggy. I'm clicking uninstall. But it's a great idea...
|
#45
|
|||
|
|||
Another way to check if the file linked exists ins another function (i think you can use it in other linking, too)
Code:
//this function checks a link at 404 error function is_404($url) { $a = parse_url($url); $sock = fsockopen($a['host'], empty($a['port']) ? 80 : $a['port']); if(!$sock) { return true; } else { preg_match("'\w+://[^/]+(.*)'", $url, $matches); fputs($sock, 'HEAD ' . $matches[1] . " HTTP/1.0\r\nHost: " . $a['host'] . "\r\n\r\n"); preg_match("'(\w+)/([^ ]+) (\d+) (.*)'", $data = fread($sock, 4096), $matches); fclose($sock); if($matches[3] == '404') { return true; } else { return false; } } } Code:
// this is only called by handle_bbcode_img function handle_bbcode_img_match($link) { // IMPORTANT - REPLACE THE FOLLOWING 2 VARIALBS WITH YOUR INFORMATION $img_replacement = "images/misc/button_imagebig.gif"; // This is the button/image that will be displayed instead of the big image. $img_max_width = 600; // This is the maximum width that an image is allowed to be viewed safely. $link = strip_smilies(str_replace('\\"', '"', $link)); // remove double spaces -- fixes issues with wordwrap $link = str_replace(' ', '', $link); if('!is_404') { $img_width = @getimagesize($link); if ($img_width[0] > $img_max_width) { srand((double)microtime()*1000000); $number = rand(10,100); $inp_string = "<a href=\"javascript:toggle_imgview('bigimg".$number."')\"><img src=\"".$img_replacement."\" alt=\"\" border=\"0\" /></a><br />\n"; $inp_string .= "<div style=\"position:absolute;display:none;z-index:1;\" id=\"bigimg".$number."\"><img src=\"".$link."\" border=\"0\" alt=\"\" /></div>"; return $inp_string; } else { return '<img src="' . $link . '" border="0" alt="" />'; } } else { return '<img src="/cg/images/misc/404.gif" width="150" height="50" border="0" alt="Bitte editieren Sie diesen Link" />'; } } I will attach the GERMAN images at this post. Just put the to you /forum/images/misc/ folder (or whatever place you specified) |
#46
|
||||
|
||||
Kinda a lame hack IMO. It should check the users resolution before deciding to shrink the image or not. Basically this hack doesnt make sense for anybody that has a liquid layout and the width of your forum depends solely on the users resolution.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|