Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2011, 09:33 PM
otectom otectom is offline
 
Join Date: Mar 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Simple (i would think) style change in CMS

All I want to do is modify the size of the images displayed by the cms, but I don't know how.

I am currently using a 1 X 2 layout and would like to do something where the first post image was displayed at a res of 800x400 and all the following images are displayed at 300X100 (sizes approx)

Can anyone help me with this, or at least explain where I should start!?


Site -------> www.teamotec.net
Reply With Quote
  #2  
Old 06-17-2011, 10:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change the preview size you currently have to replect what you want for all images except the first one. Then add this to additional.css to set the size for the first one:
HTML Code:
.fullwidth > div.article_preview .cms_article_preview_image {    max-height: 400px !important;    max-width: 800px !important;}
That works on my 4.1.4 default test site.
Reply With Quote
  #3  
Old 06-17-2011, 11:23 PM
otectom otectom is offline
 
Join Date: Mar 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the quick response, but this is where I have to bite the bullet and feel a little slow.

I cannot find where to change the preview size, or the additional.css file. I have looked, but cannot find them.

Can you please guide me just a little further, it would be greatly appreciated. I have been wanting to make these changes for quite a while now.
Reply With Quote
  #4  
Old 06-17-2011, 11:29 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

preview size is a stylevar - style manager > find style > stylevars > image_thumbnail_max

addiitonal.css is a template - style manager > find style > edit templates > css templates > additional.css
Reply With Quote
  #5  
Old 06-17-2011, 11:36 PM
otectom otectom is offline
 
Join Date: Mar 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, wait. I found additional.css and the improvement is amazing, I think we even got the size correct on the first try!

I still don't know where to change the preview size for the other images, however that is now less important to me.

Also, after seeing it live, I wonder, can we move the preview text below the image?

--------------- Added [DATE]1308357613[/DATE] at [TIME]1308357613[/TIME] ---------------

Lynne, you rock!

The site looks WAY better now, but would like to move preview text below the image on the first post only, if possible.

would like to center image and text on first post only, if possible.
Reply With Quote
  #6  
Old 06-18-2011, 01:32 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to move the text, you'll need to add something like:

HTML Code:
.fullwidth > div.article_preview .cms_article_txt_content {    clear: both;
}
(not tested)
Reply With Quote
  #7  
Old 06-18-2011, 01:41 AM
otectom otectom is offline
 
Join Date: Mar 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you again! The text is now displayed below the image, exactly like i wanted.

I still would like to center image and text on the first post only, if possible.

If that can be done my job will be complete, and I will be very happy!

--------------- Added [DATE]1308414370[/DATE] at [TIME]1308414370[/TIME] ---------------

Lynne, where did you go!? we were so close!!!!
Reply With Quote
  #8  
Old 06-21-2011, 11:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would suggest bookmarking the link in my sig to w3schools. It will help you to do this on your own instead of having to wait for someone else to do it.

In total, you'll need these lines:
HTML Code:
/* first article centered with larger image */
.fullwidth > div.article_preview .cms_article_preview_image {max-width: 300px !important; max-height: 300px !important; float: none;; text-align: center;}
.fullwidth > div.article_preview .cms_article_txt_content {    clear: both; ; text-align: center;}
.fullwidth > div.article_preview, .fullwidth > div.article_preview .cms_article_section_location {text-align: center;}
only tested in firefox.
Reply With Quote
  #9  
Old 06-23-2011, 12:02 AM
otectom otectom is offline
 
Join Date: Mar 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne, thank you very much for the help. Your code worked perfectly.

I have looked into w3schools, but there is so much to learn, and vb is so advanced that sometimes it's easier to ask for help.
Reply With Quote
Reply


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:12 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.12203 seconds
  • Memory Usage 2,237KB
  • 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
  • (3)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete