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 03-14-2012, 04:01 PM
fwulfers fwulfers is offline
 
Join Date: Aug 2010
Location: NW Michigan (USA)
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Full image on CMS home page and text below image

The default is showing a thumbnail of 150px and the intro to the article starting to the right of the thumbnail.

I would like to show the first full image of the article (usually 640px on our site) and the text starting below the picture on the CMS home page. Something similar as they have on Autoblog.com.

I know how to adjust the size of the thumbnail to a larger size but how to make the text start below the image?
Reply With Quote
  #2  
Old 03-15-2012, 06:24 AM
Attitude5ire's Avatar
Attitude5ire Attitude5ire is offline
 
Join Date: Feb 2006
Posts: 791
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is an option in CMS to show full images instead of thumbnails.. should be in content management settings
Reply With Quote
  #3  
Old 03-15-2012, 01:23 PM
fwulfers fwulfers is offline
 
Join Date: Aug 2010
Location: NW Michigan (USA)
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the response. I already have it set to No:

Quote:
Set this to yes to switch the article previews to use image thumbnails rather than resizing the full images. Thumbnails must be enabled for this option to have any effect.
But the size of preview images are still controlled by the attachment_image_thumbnail_max settings under Attachments in the stylevar.

Quote:
This stylevar controls the maximum size of inline attached images whose size is set to "Thumbnail" in their Image Settings.
Doesn't make sense..
Reply With Quote
  #4  
Old 03-15-2012, 03:19 PM
chrisngrod's Avatar
chrisngrod chrisngrod is offline
 
Join Date: Oct 2010
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is true...

Code:
.cms_article_preview_image {
	max-height:{vb:stylevar attachment_image_thumbnail_max};
	max-width:{vb:stylevar attachment_image_thumbnail_max} !important;
}
Hard code some numbers in there?

vbcms.css
Reply With Quote
  #5  
Old 03-15-2012, 05:41 PM
fwulfers fwulfers is offline
 
Join Date: Aug 2010
Location: NW Michigan (USA)
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is possible but that's the same as changing the value in the stylevar. And I still need the preview text to start below the image, not to the side.
Reply With Quote
  #6  
Old 03-15-2012, 06:24 PM
chrisngrod's Avatar
chrisngrod chrisngrod is offline
 
Join Date: Oct 2010
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fwulfers View Post
That is possible but that's the same as changing the value in the stylevar. And I still need the preview text to start below the image, not to the side.
Sorry I think I only read the last posts. Went back and looked at OP.

Code:
<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>

to this...


<img src="{vb:raw previewimage}" width="650" 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>
<br />
Even doing something simple like this seems to work. You could tweak the code to your needs.
Reply With Quote
  #7  
Old 03-15-2012, 07:14 PM
fwulfers fwulfers is offline
 
Join Date: Aug 2010
Location: NW Michigan (USA)
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant, that is perfect and looks great. http://saabworld.net/content/

Some articles do have smaller pictures so those are being stretched out to 650px. Is there a way to set it so smaller images than the specified width (650px here) will display their original size?
Reply With Quote
  #8  
Old 03-15-2012, 07:41 PM
chrisngrod's Avatar
chrisngrod chrisngrod is offline
 
Join Date: Oct 2010
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looked at your site...

How big do your images get? You could take the width out, but this could have a negative impact if your users have a high res screen.

Have you ever thought about going fixed width just for the CMS portion? (example is my site)


You could add something like this to vbcms.css or additional.css if you have that plugin...


Code:
.myarticlepreview {
	max-height: 450px;
	max-width: 650px !important;
         display: block;   
         margin-left: auto;   
         margin-right: auto;
         margin-top:15px;     
}
Configure your max settings... When the image isn't larger than that, it won't resize. Change what you did earlier to (vbcms_content_article_preview).

Code:
<img class="myarticlepreview" 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>
<br />
Oh yeah that puts us back to where we started at... Also in vbcms.css... Comment this out like so...

Code:
.cms_article_preview_image,
.showpreviewonly object,
.showpreviewonly iframe {
	border:{vb:stylevar vbcms_article_preview_image_border};
	outline: {vb:stylevar vbcms_article_preview_image_outline};
	/* float:{vb:stylevar left}; */
	margin:{vb:stylevar vbcms_article_preview_image_margin};
}
Guess we have to fix the videos as well...

vbcms_article_preview_object_size (stylevar) - Change to whatever sizes you want.

I tried to center up the video, but unless I used <center></center> it didn't work (that has been depreciated and most people will say don't use it... however I think there is going to be compatibility for a long time). I have a fixed width CMS so it won't affect me as much. Your video will probably show up aligned to the left though.

Good luck.
Reply With Quote
  #9  
Old 01-08-2013, 05:24 PM
Gamelobby's Avatar
Gamelobby Gamelobby is offline
 
Join Date: Jul 2007
Location: Long Beach, CA
Posts: 997
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is all of this still necessary in 4.2 ?
Reply With Quote
  #10  
Old 03-16-2013, 01:27 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gamelobby View Post
Is all of this still necessary in 4.2 ?

I have a mate that swore black and blue you had to hard code to get results, most can be done through the Stylevars for me, just recently'getting' it, when you do it is a piece of cake
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 01:42 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.04138 seconds
  • Memory Usage 2,253KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete