The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Image Resize using Lytebox ( 3.6.x ) Details »» | |||||||||||||||||||||||||
This's simple hack for resize large images using Lytebox,also integration with vB attachments for vbb 3.6.x.You can find this mod for vbb 3.7.x at HERE.I used it on my forum http://Hoiquantinhoc.com and i didnt see any problem with it.Here you can see online demo
Here we go ! ///////////////////////////////////////////////////////////////////////// HISTORY Ver 1.5
INSTALLATION
PHP Code:
PHP Code:
Show Your Support
|
Comments |
#22
|
||||
|
||||
Using the template mod with:
<a target="_blank" href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&stc=1&d=$attachment[dateline]" rel="lytebox"> <img class="attach" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&stc=1&d=$attachment[dateline]" border="0" alt="" /> </a> that mod RULEZ! Can I have the img in PSD or similar to translate it in italian? Just a lil suggest, can you add a code to resize image that are linked and are more big then a specified size? to see it in full size just click on it to show it in Lytebox |
#23
|
||||
|
||||
Ok i do it!
Follow that instructions to enable the autoresieze of images that are linked directly: follow that instructions ONLY AFTER installed "Image Resize using Lytebox" and edit file includes/class_bbcode.php Edit file clientscript/lytebox.js and ADD at end of file: Code:
/* "RedFoxy Resize Image" based on "Resize Avatars Based on Max Width and Height" for phpBB (c) Christian Fecteau 2005 WebSite: http://www.redfoxy.it http://www.forum.redfoxy.it http://www.softairmania.it Original Credits must be given with my full name (Christian Fecteau) and a link to my portfolio: http://portfolio.christianfecteau.com/ Removal or alteration of this notice is strongly prohibited. */ function rfrs_im(rfrs_obj, rfrs_max_width, rfrs_max_height) { if (!document.getElementsByTagName || !document.createElement) { return; } var rfrs_real_width = rfrs_real_height = rfrs_offset_width = rfrs_offset_height = false; if (rfrs_obj.width && rfrs_obj.height) { rfrs_real_width = rfrs_obj.width; rfrs_real_height = rfrs_obj.height; } if (!rfrs_real_width || isNaN(rfrs_real_width) || (rfrs_real_width <= 0) || !rfrs_real_height || isNaN(rfrs_real_height) || (rfrs_real_height <= 0)) { var rfrs_rand1 = String(rfrs_count++); eval("rfrs_retry" + rfrs_rand1 + " = rfrs_obj;"); eval("rfrs_x" + rfrs_rand1 + " = rfrs_max_width;"); eval("rfrs_y" + rfrs_rand1 + " = rfrs_max_height;"); eval("window.setTimeout('rfrs_img_loaded(rfrs_retry" + rfrs_rand1 + ",rfrs_x" + rfrs_rand1 + ",rfrs_y" + rfrs_rand1 + ")',1000);"); return; } if (rfrs_real_width > rfrs_max_width) { rfrs_offset_width = rfrs_real_width - rfrs_max_width; } if (rfrs_real_height > rfrs_max_height) { rfrs_offset_height = rfrs_real_height - rfrs_max_height; } if (!rfrs_offset_width && !rfrs_offset_height) { return; } if (rfrs_offset_width > rfrs_offset_height) { rfrs_obj.style.width = String(rfrs_max_width) + 'px'; document.all ? rfrs_obj.style.cursor = 'hand' : rfrs_obj.style.cursor = 'pointer'; } else { rfrs_obj.style.height = String(rfrs_max_height) + 'px'; document.all ? rfrs_obj.style.cursor = 'hand' : rfrs_obj.style.cursor = 'pointer'; } } Code:
return '<a target="_blank" href="' . $link . '" rel="lytebox"><img src="' . $link . '" border="0" alt="" /></a>'; Code:
return '<a target="_blank" href="' . $link . '" rel="lytebox"><img onload="rfrs(this, 200, 200)" src="' . $link . '" border="0" alt="" /></a>'; Note: to change max width and max height for resize, just change the value in includes/class_bbcode.php at rfrs(this, 200, 200) |
#24
|
||||
|
||||
sorry... i do an useless work...
BTW i see that if i've an image with a link, the link doesn't goes anymore Like i've: [ url=http://www.domain.com/my/home/page.html][img ]http://www.domain.com/img.jpg[/img][/url] with that plugin that link is replaced with the Lytebox link |
#25
|
|||
|
|||
I have a problem with this modification on a clients website. If I have it on, it alters a gif that I manually placed into his postbit template for an ad after the first post. Any ideas on a way around this?
|
#26
|
|||
|
|||
I noticed, that this isn't working for me with IE6 ? Only in Firefox, Opera and IE7. Also my users have the same problem with the IE6. Can someone confirm that this is not running with IE6 ? Someone knows a solution for this ??
|
#27
|
|||
|
|||
works great, maybe little slow but works! and looks good!
|
#28
|
|||
|
|||
thanks is this very beatiful hacks
|
#29
|
|||
|
|||
No one has Problems with IE6 ? For me it does not resize the images, but adds the link on the image and I also can click on it and it shows again the image in original size.
|
#30
|
|||
|
|||
@Lost Heaven: Demo gì mà die vậy trời? Chơi vbseo bản quyền ko vậy? hehe
This mod quite good. |
#31
|
|||
|
|||
very nice mod. Is there a way to show the fullsize image (not resized by this mod) if the user uses the [ATTACH] tags? Otherwise, this mod is perfect.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|