vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Show Thread Enhancements - Auto Resize large images in an IMG tag (https://vborg.vbsupport.ru/showthread.php?t=169889)

mr.gamesbay 02-06-2008 10:00 PM

Auto Resize large images in an IMG tag
 
Sorry about my bad english :rolleyes:

With this small hack, all large images in an IMG Tag will be resized after the site has loaded. With a click on the resized imge, it will open in an new window with the original size. Works in Firefox, Opera, IE and i think in all other browser.
Here is a Demo: Link

Work with vB 3.7.x

INSTALLATION:

--------------------------------

- Copy the file resizevbimg.js in the dir clientscript.

--------------------------------

Open the file includes/class_bbcode.php
Search the line(~line 1932 ):

Code:

return '<img src="' .  $link . '" border="0" alt="" />';
and replace with:
Code:

return '<img src="' .  $link . '" border="0" alt="" id="vBCodeIMG" />';
Save and upload.

--------------------------------

Styles & Templates > Search the SHOWTHREAD Template
Seach:
Code:

<body onload="$onload">
Replace with:
Code:

<body onload="$onload;vbImageResize()">
Save the template.

--------------------------------

Styles & Templates > Search the newreply Template
Search:
Code:

<body$onload>
Replace with:
Code:

<body onload="$onload;vbImageResize()">
Save the template.

--------------------------------

- Styles & Templates > Style Manager > Common Templates > headinclude
Search:
Code:

<!-- / CSS Stylesheet -->
After, add:
Code:

<script type="text/javascript" src="clientscript/resizevbimg.js"></script>
Save the template.

--------------------------------

Styles & Templates > Style Manager > Main CSS > Additional CSS Definitions

After, add:
Code:

.vbimgcodelimit {
        cursor: pointer;
        border: dotted 1px black;
}

Save.
--------------------------------

Done :)

Magnumutz 02-07-2008 02:17 PM

Nice, it's almost as spleasure's resize mod.

Is there any way you can choose the minimum size that the mod resizes?

KURTZ 02-07-2008 02:20 PM

i think THIS is better :)

Magnumutz 02-07-2008 02:27 PM

That's for 3.6 this one is specially made for 3.7...
Don't be an ass.

mr.gamesbay 02-07-2008 02:27 PM

Quote:

Originally Posted by KURTZ (Post 1438225)
i think THIS is better :)

Then use it! ;)
I don't need and want for img resizes DB queries. ^^

KURTZ 02-07-2008 02:31 PM

Quote:

Originally Posted by Magnumutz (Post 1438234)
That's for 3.6 this one is specially made for 3.7...
Don't be an ass.

yeah, but runs perfectly also on 3.7.x ... ;)

Quote:

Originally Posted by mr.gamesbay (Post 1438235)
Then use it! ;)
I don't need and want for img resizes DB queries. ^^

absolutely, it's only a different way ... :)

mr.gamesbay 02-07-2008 02:52 PM

Quote:

Originally Posted by Magnumutz (Post 1438222)
Is there any way you can choose the minimum size that the mod resizes?

Yes you can.

Open the resizevbimg.js with an text editor and change the two values (500 is default size) to your new minimum size.

cosy 02-07-2008 02:55 PM

is there any way install whit out all that edits ?

Jase2 02-07-2008 03:08 PM

No there isn't. The instructions are very easy to follow.

Nice add on.

Regards Jason :)

skrazydogz 02-07-2008 03:41 PM

is it compatible with vb 3.6.8 ?


All times are GMT. The time now is 06:03 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.01100 seconds
  • Memory Usage 1,738KB
  • 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
  • (9)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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