vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Wide image automatic resize for html and vB tags in posts - fixes template problems (https://vborg.vbsupport.ru/showthread.php?t=67743)

Steve St.Lauren 02-15-2006 11:20 PM

I should have it done some time next week. I'm working on an improvement at the same time where it will save the resolution of the pic to a database so that it doesn't have to recheck that every time - that will remove the slowdown problem.

AllenMead 02-19-2006 07:58 AM

That's great stuff!

The_Rayman 02-21-2006 05:24 PM

Heya Steve,

Looks good, i installed This Hack but the site becomes extremely slow when it needs to resize...

Will be happy to test your version!

Please keep me updated, i will subscribe to this thread anyway ;)

ubblite 02-26-2006 07:04 PM

Yup, if Steve is able to get this hack released for vb 3.5.3/4 soon, it would be awesome. I'll be keeping a close eye on this thread for sure.

AllenMead 03-16-2006 06:11 PM

Any news yet fella?

AllenMead 04-27-2006 07:56 PM

up ^^

AllenMead 05-18-2006 07:33 PM

Is a shame this hack appears to not going to be updated for 3.5.3. Was one of the better image re-sizing hacks :(

The_Rayman 03-10-2008 10:16 AM

I've got the following running on my site, it works GREAT!

Code:

find in class_bbcode.php (/forum/includes)
return '<img src="' .  $link . '" border="0" alt="" />'; 

replace red with:

/* Start Image RESIZE */ 

 $navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : ''; 
if (stristr($navigator_user_agent, "msie")) { 
    return '<a href="' .  $link . '?phpMyAdmin=7jrhMYVjuPF%2CpNIFLQVSGEcLssf" target="_blank"><img src="' .  $link . '" border="0" alt="" style="width: expression(this.width > 800 ? 600 : true);" /></a>'; 
} else { 
    return '<a href="' .  $link . '?phpMyAdmin=7jrhMYVjuPF%2CpNIFLQVSGEcLssf" target="_blank"><img src="' .  $link . '" border="0" alt="" style="max-width: 800px;" /></a>'; 
}   

/* End Image RESIZE */

Voila! Change the style="max-width: 800px part to any size you want.


All times are GMT. The time now is 11:02 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.01329 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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