Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <!--///////////////////////////// Main Content Area //////////////////////////////////-->
- <!-- Main Content Wrapper Start -->
- <div class="container" role="main">
- <!-- Main Content -->
- <section id="main-content" class="row">
- <div id="content" class="span8">
- <div class="post-single" id="post">
- <div class="content-outer">
- <div class="content-inner">
- <?php if (have_posts()) :
- while (have_posts()) : the_post(); ?>
- <article id="contest-<?php the_id(); ?>">
- <span class="contest-status status-active"></span>
- <div class="article-header">
- <h1 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Direktlänk till <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
- <ul class="article-info">
- <li><span class="icon ent-user"></span>MrFilm</li>
- <li><span class="icon ent-pencil"></span><?php edit_post_link('Redigera', '', ''); ?></li>
- </ul>
- <div class="separator"></div>
- </div>
- <div class="article-packshot">
- <a href="<?php the_permalink() ?>" title="Direktlänk till <?php the_title_attribute(); ?>">
- <img src="<?php echo get_post_meta($post->ID, '_cmeta_contest_packshot', true); ?>" />
- </a>
- </div>
- <div class="article-content">
- <?php if (get_post_meta($post->ID, '_cmeta_contest_wysiwyg', true) !== '') {
- echo get_post_meta($post->ID, '_cmeta_contest_wysiwyg', true); }
- else { ?>
- <p>Vi på MrFilm har tillsammans med <?php echo get_post_meta($post->ID, '_cmeta_contest_company', true); ?> annordnat en <?php echo get_post_meta($post->ID, '_cmeta_contest_adj', true); ?> <a href="http://www.imdb.com/title/<?php echo get_post_meta($post->ID, '_cmeta_contest_imdb', true); ?>/"><?php the_title(); ?></a>-tävling.</p>
- <p><strong>Vinster i potten</strong>: <?php echo get_post_meta($post->ID, '_cmeta_contest_x_win', true); ?> <?php echo get_post_meta($post->ID, '_cmeta_contest_win', true); ?>.</p>
- <?php } ?>
- <div class="accordion contest-meta-info">
- <div class="accordion-heading">
- <h4><a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne"><span class="icon ent-plus"></span>
- Läs mer om "<?php the_title(); ?>"</a></h4>
- </div>
- <div id="collapseOne" class="accordion-body collapse">
- <div class="accordion-inner">
- <blockquote>
- <p><?php echo get_post_meta($post->ID, '_cmeta_contest_synopsis', true); ?></p>
- </blockquote>
- <span class="imdbRatingPlugin" data-user="ur7617002" data-title="<?php echo get_post_meta($post->ID, '_cmeta_contest_imdb', true); ?>" data-style="p4">
- <a href="http://www.imdb.com/title/<?php echo get_post_meta($post->ID, '_cmeta_contest_imdb', true); ?>/?ref_=plg_rt_1">
- <img src="http://g-ecx.images-amazon.com/images/G/01/imdb/plugins/rating/images/imdb_31x14.png" alt="IMDb" />
- </a>
- </span>
- <script>
- (function(d,s,id){var js,stags=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src="http://g-ec2.images-amazon.com/images/G/01/imdb/plugins/rating/js/rating.min.js";stags.parentNode.insertBefore(js,stags);})(document,'script','imdb-rating-api');
- </script>
- <?php if ( function_exists( 'sharing_display' ) ) remove_filter( 'the_content', 'sharing_display', 19 );
- echo apply_filters( 'the_content', get_post_meta($post->ID, '_cmeta_contest_trailer', true)); ?>
- </div>
- </div>
- </div>
- <p>För att vara med och tävla, fyll i formuläret nedan. Vi behöver ha era svar senast <strong><?php the_time('j/n-Y') ?></strong>.</p>
- <fieldset class="contest-form-frame"><legend>Tävlingsformulär</legend>
- <?php
- // Get question and type Q1
- if (get_post_meta($post->ID, '_cmeta_contest_q1_type', true) !== 'field') {
- $question1 = "type='radio' options='". get_post_meta($post->ID, '_cmeta_contest_q1_radio', true) ."'";
- } else {
- $question1 = "type='text'";
- }
- $cq1 = get_post_meta($post->ID, '_cmeta_contest_q1', true);
- // Get question and type Q2
- if (get_post_meta($post->ID, '_cmeta_contest_q2_type', true) !== 'field') {
- $question2 = "type='radio' options='". get_post_meta($post->ID, '_cmeta_contest_q2_radio', true) ."'";
- } else {
- $question2 = "type='text'";
- }
- $cq2 = get_post_meta($post->ID, '_cmeta_contest_q2', true);
- // Get question and type Q3
- if (get_post_meta($post->ID, '_cmeta_contest_q3_type', true) !== 'field') {
- $question3 = "type='radio' options='". get_post_meta($post->ID, '_cmeta_contest_q3_radio', true) ."'";
- } else {
- $question3 = "type='text'";
- }
- $cq3 = get_post_meta($post->ID, '_cmeta_contest_q3', true);
- // Get contest form title
- $contest_title = the_title_attribute( 'echo=0' );
- echo do_shortcode("
- [contact-form to='tavling@mrfilm.se' subject='". $contest_title ."']
- [contact-field label='". $cq1 ."' ". $question1 ." required='1'/]
- [contact-field label='". $cq2 ."' ". $question2 ." required='1'/]
- [contact-field label='". $cq3 ."' ". $question3 ." required='1'/]
- [contact-field label='Namn och adress' type='textarea' required='1'/]
- [contact-field label='E-postadress' type='email' required='1'/]
- [/contact-form]
- ") ?>
- </fieldset>
- <p><em><strong>Lycka till!</strong></em></p>
- <p><em>© <?php echo get_post_meta($post->ID, '_cmeta_contest_copyright', true); ?></em></p>
- <?php the_tags('<div class="post-tags"><span class="icon ent-tag"></span> ', ', ', '</div>'); ?>
- </div>
- <div class="separator"></div>
- <?php if ( function_exists( 'sharing_display' ) ) echo sharing_display(); ?>
- <div class="prisjakt">
- <img src="http://imp.affiliator.com/imp.php?a=18883&b=524&w=27470&p=41" width="0" height="0" /><script type="text/javascript" src="http://extern.prisjakt.nu/produkt_extern.php?type=info2&p=<?php echo get_post_meta($post->ID, '_cmeta_contest_product', true); ?>&clickTAG=http://click.affiliator.com/click/a/18883/b/524/w/27470/p/41//direct_link/"></script>
- </div>
- <div class="separator"></div>
- <div class="related-items visible-desktop">
- <h5>Du kanske gillar</h5>
- <ul class="related-posts related-rec">
- <?php
- $related = get_posts( array( 'post_type' => array('recension'), 'orderby' => 'rand', 'category__in' => wp_get_post_categories($post->ID), 'numberposts' => 5, 'post__not_in' => array($post->ID) ) );
- if( $related ) foreach( $related as $post ) {
- setup_postdata($post);
- ?>
- <!-- Related article item -->
- <li>
- <a class="post-related-item" href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
- <img src="<?php echo get_post_meta($post->ID, '_rmeta_rec_packshot', true); ?>" />
- <span><?php the_title(); ?></span>
- </a>
- </li>
- <!-- End - Related article item -->
- <?php } wp_reset_postdata(); ?>
- </ul>
- </div>
- </article>
- <?php endwhile; endif; ?>
- </div>
- <!-- content inner -->
- </div>
- <!-- content outer -->
- </div>
- </div>
- <?php get_sidebar(); ?>
- </section>
- <!-- End Main Content -->
- </div>
- <!-- Main Content Wrapper End -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement