vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Miscellaneous Hacks - Resize Images in vBadvanced News Module (https://vborg.vbsupport.ru/showthread.php?t=247437)

asabet 07-27-2010 09:00 PM

Resize Images in vBadvanced News Module
 
1 Attachment(s)
This mod will automatically resize images in the vBadvanced News Module to a given maximum width.

Step 1:

Go to adv_portal_newsbits template (under vbAdvanced CMPS templates) and search for:
PHP Code:

$news[message


If you can't find that, then search for:
PHP Code:

<blockquote class="postcontent restore">{vb:raw news.message}</blockquote


Immediately before whichever of those you find in your template, add:
PHP Code:

<div class="news IMG"


Save

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

Step 2:

Add the following under Additional CSS Definitions (replace "512" with whatever max width you want):
PHP Code:

.news IMG  
{
         
max-width512px;
         
heightauto;



or for better (but still not perfect) support in Internet Explorer, use this instead:

PHP Code:

.news IMG  
{
         
max-width:512px;
  
widthexpression(this.width 512 512true);
         
heightauto;



Save


That's it. Worked for me. This mod is unsupported, as I have almost no knowledge about these things. I was able to get it working based on what I found here: http://www.vbadvanced.com/forum/showthread.php?t=40139.

The vB4 version of this mod is here: https://vborg.vbsupport.ru/showthread.php?t=247434

Winter Sonata 08-29-2010 08:18 PM

works like a charm

SilabGarza 10-25-2010 08:06 PM

can you integrate it with the nCode image resizer add-on please?

TriAxis 03-07-2011 07:53 AM

Was looking for this exact thing tonight. Works like a champ!

Joehawary 09-13-2016 07:54 PM

If you want it to work the same as your theme, just use <div class="content"> so you don't need any further CSS


All times are GMT. The time now is 08:04 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.01466 seconds
  • Memory Usage 1,724KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete