Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 04-23-2012, 06:29 PM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again Lynne, can you give me an example? I'm quite new to this.
Reply With Quote
  #12  
Old 04-23-2012, 08:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a page from my favorite CSS site - http://www.w3schools.com/css/css_dimension.asp

So, something *like*:
div.showpreviewonly img {max-width: 350px; max-height: 200px;}
Reply With Quote
  #13  
Old 04-24-2012, 01:21 AM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again Lynne, I really do appreciate your help. I've been working on this for about three days now and am getting a bit frustrated, as its obviously over my head. I have been able to change the order of the preview images, title, author etc for the previews, but I still can't get the preview image sizes to change. With the code you've written above: div.showpreviewonly img {max-width: 350px; max-height: 200px;} where would I place this in the code below to get the changes I'm after:

<div class="fullwidth article_preview_contents<vb:if condition="$showpreviewonly"> showpreviewonly</vb:if> restore">
<vb:if condition="$showpreviewonly">
<vb:if condition="$previewvideo">
{vb:raw previewvideo}
<vb:elseif condition="$previewimage" />
<a href="{vb:raw page_url}">
<img class="cms_article_preview_image" src="{vb:raw previewimage}" alt="<vb:if condition="$attachment_settings['alt']">{vb:raw attachment_settings['alt']}<vb:else />{vb:rawphrase article_preview}</vb:if>" <vb:if condition="$attachment_settings['title']">title="{vb:raw attachment_settings['title']}"</vb:if> /></a>
</vb:if>
</vb:if>
<div>
Reply With Quote
  #14  
Old 04-24-2012, 01:59 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

CSS goes in a .css template. Try putting it in the additional.css template (and, as I said, it was an example, I don't know if it will work). If you still can't get it to work, you should post a link so we can view the problem.
Reply With Quote
  #15  
Old 04-24-2012, 06:15 AM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again Lynne, unfortunately still no changes with preview image sizes. Here is my site: www.theroaringseason.com
Reply With Quote
  #16  
Old 04-24-2012, 05:26 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have this:
HTML Code:
.vbcms_content img {
  max-width:100%;
}
so, use those properties for your CSS.
Reply With Quote
  #17  
Old 04-24-2012, 06:50 PM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where did you find that Lynne? I changed the code in my additional.css file from what you'd placed in post #12, to:

.vbcms_content img {max-width: 350px; max-height: 200px;}

But that only changed the size of the latest CMS Article at the top, whereas the previews are still the same size. Is the key to getting this in the wording:

.vbcms_content img

I did try:

.vbcms_showpreviewonly img

But this didn't work.
Reply With Quote
  #18  
Old 04-24-2012, 09:35 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm finding it while using firebug to view your CSS (there is an article on this).

You are using thumbnails for the other images (vboptions > Content Management > Use Thumbnails in Preview), so those are already resized. If you want your CSS to resize those, you need to set that to No unless you are resizing them to smaller than the thumbnail size (which I don't think you are).

And I am not seeing this in your CSS:
.vbcms_content img {max-width: 350px; max-height: 200px;}
Reply With Quote
  #19  
Old 04-24-2012, 11:23 PM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again Lynne. I had changed the css back again after it resized the main CMS image, thats why it didn't show up.

OK, so now I've set Content Management > Use Thumbnail In Preview to "No". In additional.css I've set the code to:

.vbcms_showpreviewonly img {max-width: 350px; max-height: 200px;}

But still preview images won't change. Surely it must have something to do with the way I've worded the ".vbcms_showpreviewonly" text? When I set it to ".vbcms_content img" it works on the main image size, so if I can get the preview image text correct then surely it must resize these?
Reply With Quote
  #20  
Old 04-25-2012, 03:06 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't say to add .vbcms_showpreviewonly img, I said to add .vbcms_content img. As far as I can see on your page, .vbcms_showpreviewonly is not a valid class at all.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:43 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.04266 seconds
  • Memory Usage 2,247KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete