StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have -- and this forum will be removed on July 1st, 2013.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 03-18-2010, 05:00 AM
ATS ATS is offline
Registered User
Pro Plus Member
 
Join Date: Feb 2010
Posts: 55
Default Video and Image Thumbnails On Same Page

Hello,

after searching and reading the forum still didn't find a solution.
I have two kinds of posts - illustrated by images and by embedded videos.
There is no problem with having image thumbnail appear on the home page.
There is an option in Tubular theme to display video thumbnails as well.
Can we have both images and videos thumbs on same page? Is it and how it is possible? (Creating a screenshot of a video as thumbnail is not an option I'm looking for)

Maybe not Agent, but other theme?

Thank you.
  #2  
Old 03-18-2010, 11:54 AM
Jon's Avatar
Jon Jon is offline
Community Moderator
 
Join Date: Oct 2008
Location: New York
Posts: 4,037
Default

You should have something like this on your home.php file:
PHP Code:
<?php if( get_post_meta($post->ID"thumb"true) ): ?>
                <a href="<?php the_permalink() ?>" rel="bookmark"><img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID"thumb"$single true); ?>&amp;h=<?php echo get_theme_mod('featured_top_left_thumb_height'); ?>&amp;w=<?php echo get_theme_mod('featured_top_left_thumb_width'); ?>&amp;zc=1" alt="<?php the_title(); ?>" /></a>    
                <?php else: ?>                <?php endif; ?>
Swap that with this, then use video instead of thumb (use the entire video embed code for the thumbnail)
PHP Code:
<?php if( get_post_meta($post->ID"thumb"true) ): ?>
                <a href="<?php the_permalink() ?>" rel="bookmark"><img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID"thumb"$single true); ?>&amp;h=<?php echo get_theme_mod('featured_top_left_thumb_height'); ?>&amp;w=<?php echo get_theme_mod('featured_top_left_thumb_width'); ?>&amp;zc=1" alt="<?php the_title(); ?>" /></a>    
                <?php else: ?>                <?php endif; ?>                <?php if( get_post_meta($post->ID"video"true) ): ?>
                <a href="<?php the_permalink() ?>"  rel="bookmark"><?php  echo get_post_meta($post->ID"video"$single true);  ?></a>    
                <?php else: ?>                <?php endif;  ?>
Remember, insert the entire <embed> code for the video
__________________
Thanks,
Jon Weisss
Request a quote
Need WordPress Maintenance?
I'm A Recommended Designer
Skype: weiss.jonathan
Please respect my privacy. Do not pm or email me regarding support questions unless otherwise instructed.
  #3  
Old 03-18-2010, 02:21 PM
ATS ATS is offline
Registered User
Pro Plus Member
 
Join Date: Feb 2010
Posts: 55
Default

Thank you. It's a half of road.
The code works, but you need manually resize <embed> code in "video" custom field (otherwise it shows full size of video). Also you need to add styling like float and margins inside the <embed> code.
I tried to add this into *.css file, but didn't work.

.video {
float:left;
margin: 0px 10px 5px 0px !important;
padding: 2px !important;
border: 1px solid #DDDDDD !important;
}


Here is like it looks now:

  #4  
Old 03-19-2010, 08:24 AM
Jon's Avatar
Jon Jon is offline
Community Moderator
 
Join Date: Oct 2008
Location: New York
Posts: 4,037
Default

can you PM me a link to your site?
__________________
Thanks,
Jon Weisss
Request a quote
Need WordPress Maintenance?
I'm A Recommended Designer
Skype: weiss.jonathan
Please respect my privacy. Do not pm or email me regarding support questions unless otherwise instructed.
  #5  
Old 03-19-2010, 09:58 AM
Jon's Avatar
Jon Jon is offline
Community Moderator
 
Join Date: Oct 2008
Location: New York
Posts: 4,037
Default

Try adding this to your CSS:
Code:
#homepagebottom embed,  #homepagebottom object {
height:110px;
margin:0;
padding:0;
width:200px;


}
__________________
Thanks,
Jon Weisss
Request a quote
Need WordPress Maintenance?
I'm A Recommended Designer
Skype: weiss.jonathan
Please respect my privacy. Do not pm or email me regarding support questions unless otherwise instructed.
  #6  
Old 03-19-2010, 10:25 AM
ATS ATS is offline
Registered User
Pro Plus Member
 
Join Date: Feb 2010
Posts: 55
Default

I've slightly changed proposed CSS code and it does work like magic:

Code:
#homepagebottom embed,  #homepagebottom object {
height:110px;
float: left;
margin: 0px 10px 0px 0px;
padding:0;
width:200px;
Jon, thank you very much. It deserves to be put into tutorial.
  #7  
Old 03-22-2010, 01:14 PM
Jon's Avatar
Jon Jon is offline
Community Moderator
 
Join Date: Oct 2008
Location: New York
Posts: 4,037
Default

Glad I could help!
__________________
Thanks,
Jon Weisss
Request a quote
Need WordPress Maintenance?
I'm A Recommended Designer
Skype: weiss.jonathan
Please respect my privacy. Do not pm or email me regarding support questions unless otherwise instructed.
 

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace video on front page with image? megamoze General Discussion 4 09-24-2010 12:26 PM
Video thumbnails in video page Sandal Woods General Discussion 18 02-02-2010 05:36 AM
Is is possible to use BOTH video & image thumbnails on home? Ryen General Discussion 1 11-02-2009 06:51 AM
hpmain on home page thumbnails to video thumbnails? gordonmartin General Discussion 19 11-02-2008 02:26 PM


All times are GMT -5. The time now is 04:53 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.