vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Autoresize image (article preview) (https://vborg.vbsupport.ru/showthread.php?t=269203)

Bram H 08-26-2011 09:55 PM

Autoresize image (article preview)
 
Is there a way to force all preview images on the CMS to be in an exact same size so they will fit in a 100x100 container regardless the size they might have in the full article

Lynne 08-26-2011 10:11 PM

You could go:
HTML Code:

.cms_article_preview_image {    height: 100px;    width: 100px;}
You could end up with some strange looking preview images that way though.

Bram H 08-27-2011 08:59 AM

Yes that looks weird. Isnt there a work around to let the CMS "zoom" in to find a fitting square dimension as you can see on any other portal software out there, except for vbulletin?

Mooff 08-27-2011 09:06 AM

You could edit the template and change the <img> tag in the preview part to <div>
And then change the src part to a background. Then it would crop the image and show a 100x100 part of the original image.

But if your image is smaller it will look weird.

In addition you could change the background position around a bit so it doesn't take the upper edge of the image. But again, if your image is to small it still will look weird.

Bram H 08-27-2011 09:21 AM

I decided I can live with it. Thanks for the help Lynn :)


All times are GMT. The time now is 03:11 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.01080 seconds
  • Memory Usage 1,711KB
  • 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_html_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