function get_item_relate_video($thumb, $show_title, $show_exceprt, $show_rate, $show_dur, $show_view, $show_com, $show_like, $show_aut, $show_date, $themes_pur) { $format = get_post_format(get_the_ID()); $html = ''; $html .= ' <div class="video-item"> <div class="item-thumbnail"> <a href="' . get_permalink() . '" title="' . esc_attr(get_the_title()) . '">'; if (has_post_thumbnail()) { $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), $thumb, true); } else { $thumbnail[0] = function_exists('tm_get_default_image') ? tm_get_default_image() : ''; $thumbnail[1] = 520; $thumbnail[2] = 293; } $html .= '<img src="' . $thumbnail[0] . '" width="' . $thumbnail[1] . '" height="' . $thumbnail[2] . '" alt="' . get_the_title('echo=0') . '" title="' . the_title_attribute('echo=0') . '">'; if ($themes_pur != '0') { if ($format == '' || $format == 'standard' || $format == 'gallery') { $html .= '<div class="link-overlay fa fa-search"></div>'; } else { $html .= '<div class="link-overlay fa fa-play "></div>'; } } $html .= '</a>'; if ($show_rate != '0') { $html .= tm_post_rating(get_the_ID()); } if ($show_dur != '0') { if (get_post_meta(get_the_id(), 'time_video', true) != '00:00' && get_post_meta(get_the_id(), 'time_video', true) != '00' && get_post_meta(get_the_id(), 'time_video', true) != '') { $html .= ' <span class="rating-bar bgcolor2 time_dur">' . get_post_meta(get_the_id(), 'time_video', true) . '</span>'; } } $html .= ' </div> <div class="item-head">'; if ($show_title != '0') { $html .= ' <h3><a href="' . get_permalink(get_the_ID()) . '">' . strip_tags(get_the_title(get_the_ID())) . '</a></h3>'; } $html .= ' <div class="item-info">'; if ($show_aut != '0') { $author = get_author_posts_url(get_the_author_meta('ID')); $html .= '<span class="item-author"><a href="' . $author . '" title="' . get_the_author() . '">' . get_the_author() . '</a></span>'; } if ($show_date != '0') { $html .= '<span class="item-date">' . get_the_time(get_option('date_format')) . '</span>'; } $html .= '<div class="item-meta no-bg">'; if ($show_view != '0') { $html .= tm_html_video_meta('view', false, false); } if ($show_com != '0') { $html .= tm_html_video_meta('comment', false, false); } if ($show_like != '0') { $html .= tm_html_video_meta('like', false, false); } $html .= '</div> </div>'; $html .= ' </div>'; if ($show_exceprt != '0') { $html .= ' <div class="item-content">' . get_the_excerpt() . '</div>'; } $html .= ' </div> '; return $html; }
?> </span> <?php } if (ot_get_option('blog_show_meta_date', 1)) { ?> <span class="item-date"><?php echo date_i18n(get_option('date_format'), strtotime(get_the_date())); ?> </span> <?php } ?> <div class="item-meta"> <?php echo tm_html_video_meta(false, false, false, true); ?> </div> </div> </div> <div class="blog-excerpt"> <?php the_excerpt(); ?> </div> </div><!--/col6--> </div><!--/row--> </div> <div class="clearfix"></div> </div> <?php
function tm_playlist_template() { $current_bb_user = get_userdata(bp_displayed_user_id()); $favorite_post_ids = wpfp_get_users_favorites($current_bb_user->user_login); _e('<h3>My playlist</h3>', 'cactusthemes'); echo "<div class='playlist user-" . bp_displayed_user_id() . "'>"; if ($favorite_post_ids) { $favorite_post_ids = array_reverse($favorite_post_ids); $qry = array('post__in' => $favorite_post_ids, 'posts_per_page' => -1, 'orderby' => 'post__in', 'paged' => $page, 'ignore_sticky_posts' => true); // custom post type support can easily be added with a line of code like below. // $qry['post_type'] = array('post','page'); query_posts($qry); while (have_posts()) { the_post(); ?> <div id="post-<?php the_ID(); ?> " <?php post_class('video-item' . (has_post_thumbnail() ? '' : ' no-thumbnail')); ?> > <div class="item-thumbnail"> <?php if (has_post_thumbnail()) { $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumb_139x89', true); ?> <a href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?> "> <img src="<?php echo $thumbnail[0]; ?> " alt="<?php the_title_attribute(); ?> " title="<?php the_title_attribute(); ?> "> <div class="link-overlay fa fa-play"></div> </a> <?php } ?> </div> <div class="item-head"> <h3><a href="<?php the_permalink(); ?> " rel="<?php the_ID(); ?> " title="<?php the_title_attribute(); ?> "><?php the_title(); ?> </a></h3> <div class="item-meta"> <?php echo tm_html_video_meta(false, false, false, true); ?> </div> </div> <?php if (bp_displayed_user_id() == get_current_user_id()) { wpfp_remove_favorite_link(get_the_ID()); } ?> <div class="clearfix"></div> </div> <?php } wp_reset_query(); } else { $wpfp_options = wpfp_get_options(); echo "<li>"; echo $wpfp_options['favorites_empty']; echo "</li>"; } echo "</div>"; if (bp_displayed_user_id() == get_current_user_id()) { echo wpfp_clear_list_link(); } }