Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2016 16:08
Show Gist options
  • Save anonymous/258531c7a81517c47de5 to your computer and use it in GitHub Desktop.
Save anonymous/258531c7a81517c47de5 to your computer and use it in GitHub Desktop.
movies.php
<?php get_header(); ?>
<?php $move = get_option('activar-phb'); if ($move == "true") { } else { include_once 'player.php'; } ?>
<div id="single">
<?php if (have_posts()) :
while (have_posts()) : the_post(); if (has_post_thumbnail()) {
$imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'full');
$imgsrc = $imgsrc[0];
} elseif ($postimages = get_children("post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=0")) {
foreach($postimages as $postimage) {
$imgsrc = wp_get_attachment_image_src($postimage->ID, 'full');
$imgsrc = $imgsrc[0];
}
} elseif (preg_match('/<img [^>]*src=["|\']([^"|\']+)/i', get_the_content(), $match) != FALSE) {
$imgsrc = $match[1];
} else {
if($img = get_post_custom_values($imagefix)){
$imgsrc = $img[0];
} else {
$img = get_template_directory_uri().'/images/noimg.png';
$imgsrc = $img;
}
} ?>
<div class="s_left">
<div id="uwee" class="sbox">
<div class="imagen">
<div class="fix">
<?php if($mostrar = $terms = strip_tags( $terms = get_the_term_list( $post->ID, ''.$calidad.'' ))) { ?>
<span class="calidad2"><?php echo $mostrar; ?></span>
<?php } ?>
<img itemprop="image" src="<?php echo $imgsrc; $imgsrc = ''; ?>" alt="<?php the_title(); ?>" />
<a href="<?php the_permalink() ?>?print=true" rel="nofollow"><i class="icon-printer"></i></a>
</div>
<a class="report" rel="nofollow"><b class="icon-exclamation-circle"></b> <?php _e('Report error','mundothemes'); ?></a>
</div>
<div class="data">
<h1><?php the_title(); ?></h1>
<!-- Micro data -->
<div id="post-ratings-<?php the_id(); ?>" class="post-ratings" itemscope itemtype="http://schema.org/Article" data-nonce="<?php the_id(); ?>">
<meta itemprop="name" content="<?php the_title(); ?>" />
<meta itemprop="datePublished" content="<?php the_date('c'); ?>"/>
<h2 style="display:none;" itemprop="headline"><?php the_title(); ?></h2>
<meta itemprop="description" content="<?php cg_content('',TRUE,'',60) ?>" />
<meta itemprop="url" content="<?php the_permalink() ?>" />
<?php if($values = get_post_custom_values("fondo_player")) { ?><meta itemprop="image" content="<?php echo $values[0]; ?>" /><?php } ?>
<div style="display: none;" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="10" />
<?php if($values = get_post_custom_values("imdbRating")) { ?><meta itemprop="ratingValue" content="<?php echo $values[0]; ?>" /><?php } ?>
<?php if($values = get_post_custom_values("imdbVotes")) { ?><meta itemprop="ratingCount" content="<?php echo $values[0]; ?>" /><?php } ?>
</div>
</div>
<!-- end Micro data -->
<span class="titulo_o"><?php if($values = get_post_custom_values("Title")) { ?><?php echo $values[0]; ?>&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?>
<?php if($noners = get_post_custom_values("Released")) { ?><?php echo $noners[0]; ?><?php } ?></span>
<p class="meta">
<?php if($values = get_post_custom_values("Rated")) { ?><span class="<?php echo $values[0]; ?>"><?php echo $values[0]; ?></span><?php } ?>
<?php if($mostrar = $terms = strip_tags( $terms = get_the_term_list( $post->ID, ''.$year_estreno.'' ))) { ?><span>
<?php echo get_the_term_list($post->ID, ''.$year_estreno.'', '', '', ''); ?>
</span><?php } ?>
<?php if($values = get_post_custom_values("Runtime")) { ?><span><b class="icon-time"></b> <?php echo $values[0]; ?></span><?php } ?>
<i class="limpiar"><?php the_category(',&nbsp;',''); ?></i>
</p>
<div class="imdb_r">
<a href="http://www.imdb.com/title/<?php $values = get_post_custom_values("Checkbx2"); echo $values[0]; ?>/" target="_blank">
<div class="a">
<?php if($values = get_post_custom_values("imdbRating")) { ?>
<span><?php echo $values[0]; ?></span>
<?php } ?>
</div>
</a>
<div class="b">
<div class="bar"><span style="width: <?php $values = get_post_custom_values("imdbRating"); echo $values[0]*10; ?>%"></span></div>
<span class="dato"><a href="http://www.imdb.com/title/<?php $values = get_post_custom_values("Checkbx2"); echo $values[0]; ?>/" rel="nofollow" target="_blank">IMDB:</a> <b><?php $values = get_post_custom_values("imdbRating"); echo $values[0]; ?>/10</b> <b><?php $values = get_post_custom_values("imdbVotes"); echo $values[0]; ?> <?php _e('votes', 'mundothemes'); ?></b></span>
</div>
</div>
<p class="meta_dd">
<b class="icon-megaphone"></b>
<?php echo get_the_term_list($post->ID, ''.$director.'', '', ', ', ''); ?>
</p>
<p class="meta_dd limpiar">
<b class="icon-star"></b>
<?php echo get_the_term_list($post->ID, ''.$actor.'', '', ', ', ''); ?>
</p>
<?php if($noners = get_post_custom_values("Awards")) { ?>
<p class="meta_dd">
<b class="icon-trophy"></b>
<?php echo $noners[0]; ?>
</p>
<?php } ?>
<?php if($noners = get_post_custom_values("Country")) { ?>
<p class="meta_dd">
<b class="icon-network"></b>
<?php echo $noners[0]; ?>
</p>
<?php } ?>
<?php if($noners = get_post_custom_values("views")) { ?>
<p class="meta_dd">
<b class="icon-eye"></b>
<?php echo $noners[0]; ?>
</p>
<?php } ?>
</div>
<?php include_once 'report.php'; ?>
<?php get_template_part('includes/single/admin'); ?>
</div>
<div class="itemmenu">
<ul class="idTabs">
<li><a href="#cap1" class="selected"><?php _e('Synopsis','mundothemes'); ?></a></li>
<?php if($values = get_post_custom_values("youtube_id")) { ?><li><a href="#cap2"><?php _e('Trailers','mundothemes'); ?></a></li><?php } ?>
<li><a href="#cap3"><?php _e('Complete cast','mundothemes'); ?></a></li>
</ul>
</div>
<div class="sbox">
<div class="entry-content">
<div id="cap1" style="display:block"><?php the_content(); ?>
</div>
<?php if($values = get_post_custom_values("youtube_id")) { ?><div id="cap2"><?php $trailers = get_post_meta($post->ID, "youtube_id", $single = true); mostrar_trailer($trailers) ?></div><?php } ?>
<div id="cap3">
<?php echo get_the_term_list($post->ID, ''.$director.'', '<div class="metatags"><h3><i class="icon-bullhorn"></i> '. __('Director','mundothemes').'</h3>', ' ', '</div>'); ?>
<?php echo get_the_term_list($post->ID, ''.$actor.'', '<div class="metatags"><h3><i class="icon-star"></i> '. __('Stars','mundothemes').'</h3>', ' ', '</div>'); ?>
<?php echo get_the_term_list($post->ID, ''.$elenco.'', '<div class="metatags"><h3><i class="icon-users"></i> '. __('Cast','mundothemes').'</h3>', ' ', '</div>'); ?>
</div>
</div>
<?php $activar_ads = get_option('activar-anuncio-468-60'); if ($activar_ads == "true") { ?>
<div class="ads_468" style="border-bottom: 0">
<?php $ads = get_option('anuncio-468-60'); if (!empty($ads)) echo stripslashes(get_option('anuncio-468-60')); ?>
</div>
<?php } ?>
</div>
<?php if($values = get_post_custom_values("imagenes")) { ?>
<div id="backdrops" class="galeria">
<?php $img = get_post_meta($post->ID, "imagenes", $single = true); backdrops ($img); ?>
</div>
<?php } ?>
<?php $move = get_option('activar-phb'); if ($move == "true") { ?>
<div class="realse" style="margin-bottom:15px;float: left;">
<?php include_once 'player.php'; ?>
</div>
<?php } ?>
<?php enlaces_descargas(); ?>
<?php enalces_verenlinea(); ?>
<?php if($download = get_post_custom_values("descargas_link")) { ?>
<div class="sbox">
<div class="descargas">
<ul class="pver desx">
<li class="ver">
<span class="opci"><?php _e("Links", "mundothemes"); ?></span>
<span><?php _e("Server", "mundothemes"); ?></span>
<span><?php _e('Language', 'mundothemes') ?></span>
<span><?php _e("Format", "mundothemes"); ?></span>
</li>
<?php echo $download[0]; ?>
</ul>
</div>
</div>
<?php } ?>
<div class="realse">
<?php fbtw(); ?>
</div>
<?php include_once 'comentarios.php'; ?>
</div>
<?php endwhile; endif; ?>
<div class="s_right">
<?php fbtw(); ?>
<?php $active = get_option('widget_single'); if ($active == "true") { dynamic_sidebar( 'Single Movie' ); } else { ?>
<?php $activar_ads = get_option('activar-anuncio-300-250'); if ($activar_ads == "true") ?>
<div class="ads_300">
<?php $ads = get_option('anuncio-300-250'); if (!empty($ads)) echo stripslashes(get_option('anuncio-300-250')); ?>
</div>
</div>
</div>
<?php include_once 'relacionados.php'; ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment