The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#72
|
|||
|
|||
ok mine is exactly like that, so i need to change both to 600 or just the 640 ? 480?
|
#73
|
||||
|
||||
Both is OK.
Than it will resize if the picture is bigger than 600 and will resize it to 600. But now I realize that the original hack by ggiegsdorf will always put a link on a picture. My version in post #52 doesn't do that, but it's performance is less quick in threads with a lot of pics. |
#74
|
|||
|
|||
so if i use your code i won't have a problem?
Code:
/* Start hack Image RESIZE */ // Check to see if image exists $link = str_replace(" " , "%20", $link); $link = str_replace("&" , "%26", $link); // Get host url name for fsockopen to see if server is reachable $img_host=str_replace('http://','',$link); $img_host=substr($img_host,0,strpos($img_host,'/')); // Check is server is reachable and timeout in 5 seconds if not if (@fclose(@fsockopen($img_host, 80, $fsockerr1, $fsockerr2, 5))) { // Check if image is on server if (@fclose(@fopen("$link", "rb"))) { // Check image size and if oversize, change bbtag $img_width = getimagesize($link); if ($img_width[0] > 600) { $navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : ''; if (stristr($navigator_user_agent, "msie")) { return '<a href="' . $link . '" target="_blank"><img src="' . $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="width: expression(this.width > 600 ? 600 : true);" /></a>'; } else { return '<a href="' . $link . '" target="_blank"><img src="' . $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="max-width: 600px;" /></a>'; } } else { return '<img src="' . $link . '" border="0" alt="" />'; } } else { // Image not found return '<table border="1" cellpadding="2" id="image_found"><tr><td><FONT color="#FF0000">' . $vbphrase['image_link_broken'] . '</font></td></tr></table>'; } } else { // Server is down return '<table border="1" cellpadding="2" id="image_found"><tr><td><FONT color="#FF0000">' . $vbphrase['image_server_down'] . '</font></td></tr></table>'; } /* End hack Image RESIZE */ |
#75
|
||||
|
||||
Thanks, installed
|
#76
|
||||
|
||||
@Puntoboy, yes technicaly it works. It may slow down some pages with many pictures on it, but it doesn't touch images smaller than the width variable you use in the code.
Try it, and if you don't like it, than just get rid of it |
#77
|
||||
|
||||
Quote:
after that I pm to the main coder... i got a reply that,,hes bizi with another hack.... i gez..he should have informed about this,,,taht lots of us are facing this problem.. we want it will re-size (thumbnail) every image hosted on imageshack or photobucket ...but it should ignore sigs image.. i think u can imform him abut ur probs.... Thankx Friendz |
#78
|
||||
|
||||
Well, this isn't or ever was supported.
It's just a piece of code he has shared with us I guess that if you don't like it, you just uninstall. The code in post #52 doesn't touch the sigs, but it has a performance problem. Because I don't know how to fix that I won't release it as a hack either Just take the original code or my version if you like it. If not, don't use it. Maybe someone will come along that can sort the problems out and will release it as a working hack that doesn't get replies like "BOO". |
#79
|
|||
|
|||
I have been reading this thread and working on a few things myself here. I have finally gotten the code to work 99.9% of the time in IE and Firefox I dont have nor want Opera so I have not tested this new code on it. The image are clickable but I'm working on one last thing which should make everyone here pretty happy.
(anyone who know the exact location of where signatures are displayed in the code of vbulletin please PM me I have a hack for hopefully fixing this issue also) Hopefully once I work out this issue it will be ready to upload to you.. Code and Hack required. |
#80
|
||||
|
||||
Quote:
any one know it ? really a lots people will be benifited with this.. |
#81
|
||||
|
||||
Quote:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|