vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Image Resize using Lytebox ( 3.6.x ) (https://vborg.vbsupport.ru/showthread.php?t=172069)

RedFoxy 03-20-2008 03:43 PM

Using the template mod with:

<a target="_blank" href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;d=$attachment[dateline]" rel="lytebox">
<img class="attach" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;d=$attachment[dateline]" border="0" alt="" />&nbsp;</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

RedFoxy 03-20-2008 04:42 PM

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';
        }
}

Edit file includes/class_bbcode.php and find:
Code:

return '<a target="_blank" href="' . $link . '" rel="lytebox"><img src="' . $link . '" border="0" alt="" /></a>';
Replace with:
Code:

return '<a target="_blank" href="' . $link . '" rel="lytebox"><img onload="rfrs(this, 200, 200)" src="' . $link . '" border="0" alt="" /></a>';
Save all

Note: to change max width and max height for resize, just change the value in includes/class_bbcode.php at rfrs(this, 200, 200)

RedFoxy 03-20-2008 05:00 PM

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

Michael Biddle 03-28-2008 09:41 PM

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?

jiggle 04-03-2008 04:23 PM

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 ??

Walter Ronny 04-05-2008 12:21 AM

works great, maybe little slow but works! and looks good!

scatro 04-06-2008 02:03 PM

thanks is this very beatiful hacks :)

jiggle 04-08-2008 05:42 PM

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.

ovnnet 04-09-2008 06:59 AM

@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.

ericmaslowski 04-20-2008 03:41 AM

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.


All times are GMT. The time now is 03:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01013 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete