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)
-   -   Show Thread Enhancements - Dynamic Picture Resize for [IMG] tag (https://vborg.vbsupport.ru/showthread.php?t=157228)

TECK 09-07-2007 10:55 PM

Yes, the hack is dedicated to you and to Lizard King... also. :)
We will talk here. It will be a good learning experience for users, since we will talk about code.

OK, I took 2 screenshots, in FF... it is working perfectly. Tell me if I missed something.

NeutralizeR 09-07-2007 11:02 PM

TECK, you may think i'm crazy but it was not working a few hours ago. Both me and Lizard King tested it on IE, Firefox, Opera and Safari.

Somehow... it's also working on Firefox now.. really weird... (of course i updated my browser cache)

Anyway... my final request is being able to see the resized images in a new browser window (or tab) when i click on it.

Lizard King 09-07-2007 11:13 PM

Floren try on here http://www.ayyas.com/blog.php?b=787 we both have the same file edits and css however this is not working.

TECK 09-08-2007 12:53 AM

I see what you guys mean. Mert, when I click on Mina's picture, it should open so you can see the full size picture, right? It does not, currently.

Post what you guys did with the code, you broke it nice. :)
You have to add the class in the JavaScript code. Let see how you did it...

Lizard King 09-08-2007 01:02 AM

class_bbcode edit :

Code:

        return '<img src="' .  $link . '" border="0" alt="" class="imageresize" onload="resize_image(this, \'' .  $link . '\', 540);" />';
vbulletin_global.js edit

Code:

* @param        string        Image object
* @param        string        Image link
* @param        integer        Image max width
*/
function resize_image(obj, link, maxwidth)
{
        if (obj.width > maxwidth)
        {
                obj.style.cursor = 'pointer';
                obj.style.width = maxwidth + 'px';
                obj.style.height = parseInt(obj.height * maxwidth / obj.width) + 'px';
                obj.onclick = function()
                {
                        window.location.href = link;
                        return false;
                };
        }
}

and the css

HTML Code:

.imageresize      {
        text-decoration: none;
        padding : 4px;
        border : 4px solid #eeeeee;
        max-width: 540px; width: expression(this.width > 540 ? 540: true);
}


TECK 09-08-2007 07:08 AM

Version 1.0.1 released. Code improved related to initial image resize.
http://67.68.90.251/forum/showthread.php?t=3

Do a CRTL + F5 to see what I mean. :)
Ya, you can do it in Firefox also.

TECK 09-08-2007 07:12 AM

Quote:

Originally Posted by NeutralizeR (Post 1334555)
My final request is being able to see the resized images in a new browser window (or tab) when i click on it.

Read the thread, please.
https://vborg.vbsupport.ru/showpost....53&postcount=6

xandizitxu 09-08-2007 08:55 AM

Didn't work for me, im not sure where Should I insert the css if a screenshot is avaible please ^^

NeutralizeR 09-08-2007 11:12 AM

You are my hero :)

Works great now!

TECK 09-08-2007 12:59 PM

Quote:

Originally Posted by xandizitxu (Post 1334725)
Didn't work for me, im not sure where Should I insert the css if a screenshot is avaible please ^^

Read the readme from A to Z. :)

Guys, anyone with IE6 can test the link and see if it's working as it should?
http://67.68.90.251/forum/showthread.php?t=3

And I need demos from other sites, I will not keep up in public mode my server.
I need to play with code and there are chances it will break from time to time. :)


All times are GMT. The time now is 08:06 AM.

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.01179 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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