Created
January 3, 2016 14:55
-
-
Save atultiwari/d37f1855169c59e48ce5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This file is responsible for displaying question page | |
* This file can be overridden by creating a anspress directory in active theme folder. | |
* | |
* @package AnsPress | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
* @author Rahul Aryan <support@anspress.io> | |
*/ | |
?> | |
<div id="ap-single" class="ap-q clearfix" itemtype="http://schema.org/Question" itemscope=""> | |
<?php | |
/** | |
* Check if user is allowed to view the question | |
*/ | |
$at_show_question = 0; | |
$at_exam_id = get_post_meta( ap_question_get_the_ID(), '_at_exam_id', true ); | |
if($at_exam_id == 38) { | |
if(at_is_pro_user()){ | |
$at_show_question = 1; | |
} else { | |
$at_show_question = 0; | |
} | |
} else { | |
$at_show_question = 1; | |
} | |
?> | |
<?php | |
if($at_show_question == 0) { | |
?> | |
<div class="ap-question-lr row"> | |
<div class="ap-q-left <?php echo (is_active_sidebar( 'ap-qsidebar' ) || ap_opt('show_question_sidebar')) ? 'col-md-9' : 'col-md-12'; ?>"> | |
<div id="question" role="main" class="ap-content question" data-id="<?php ap_question_the_ID(); ?>"> | |
<div class="ap-q-cells clearfix"> | |
<!-- Start ap-content-inner --> | |
<div class="ap-q-inner"> | |
<div class="question-content ap-q-content" itemprop="text"> | |
<?php | |
echo "<div class='border-box' style='font-size:large;'><strong><u>Note</u> :- AIIMS November 2015 MCQs are accessible only to the paid users. <a href='http://medicoshive.com/mcq-quiz/' target='_blank'>Click Here</a> to know more about <a href='http://medicoshive.com/mcq-quiz/' target='_blank'>Subscription Plans</a>.</strong> Rest of the questions can be accessed for free.</div>"; | |
?> | |
</div> | |
</div> | |
<!-- End ap-content-inner --> | |
</div> | |
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Sidebar Ad --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4742908774901035" data-ad-slot="2662333503" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> | |
</div> | |
<br/> | |
<br/> | |
<div class="border-box"><a href="http://play.google.com/store/apps/details?id=in.atultiwari.clinicalsigns"><img src="/screenshots/clinical_signs_banner.png" target="_blank" alt="Clinical Signs" style="padding:3px"></a><a href="http://play.google.com/store/apps/details?id=in.atultiwari.radiologysigns"><img src="/screenshots/radiology_signs_banner.png" target="_blank" alt="Radiology Signs" style="padding:3px"></a></div> | |
</div> | |
<?php if ( is_active_sidebar( 'ap-qsidebar' ) || ap_opt('show_question_sidebar')){ ?> | |
<div class="ap-question-right col-md-3"> | |
<?php if(ap_opt('show_question_sidebar')): ?> | |
<?php the_widget( 'AnsPress_Subscribe_Widget' ); ?> | |
<h3 class="ap-widget-title"><?php _e('Question stats', 'ap'); ?></h3> | |
<?php the_widget('AnsPress_Stats_Widget'); ?> | |
<?php endif; ?> | |
<div class="ap-question-info"> | |
<?php dynamic_sidebar( 'ap-qsidebar' ); ?> | |
</div> | |
</div> | |
<?php } ?> | |
</div> | |
<?php | |
} else { | |
?> | |
<header class="anspress-header"> | |
<h1 class="page-title"><?php the_title(); ?></h1> | |
<div class="ap-question-meta clearfix"> | |
<?php echo ap_display_question_metas() ?> | |
</div> | |
</header><!-- .anspress-header --> | |
<div class="ap-question-lr row"> | |
<div class="ap-q-left <?php echo (is_active_sidebar( 'ap-qsidebar' ) || ap_opt('show_question_sidebar')) ? 'col-md-9' : 'col-md-12'; ?>"> | |
<div id="question" role="main" class="ap-content question" data-id="<?php ap_question_the_ID(); ?>"> | |
<div class="ap-single-vote"><?php ap_question_the_vote_button(); ?></div> | |
<?php | |
/** | |
* ACTION: ap_before_question_title | |
* @since 2.0 | |
*/ | |
do_action('ap_before_question_content'); | |
?> | |
<div class="ap-avatar"> | |
<a href="<?php ap_question_the_author_link(); ?>"<?php ap_hover_card_attributes(ap_question_get_author_id()); ?>> | |
<?php ap_question_the_author_avatar( ap_opt('avatar_size_qquestion') ); ?> | |
</a> | |
</div> | |
<div class="ap-q-cells clearfix"> | |
<div class="ap-q-metas"> | |
<?php ap_user_display_meta(true, false, true); ?> | |
<span><?php ap_question_the_time(); ?></span> | |
</div> | |
<!-- Start ap-content-inner --> | |
<div class="ap-q-inner"> | |
<div class="question-content ap-q-content" itemprop="text"> | |
<?php the_content(); ?> | |
</div> | |
<?php | |
/** | |
* ACTION: ap_after_question_content | |
* @since 2.0 | |
*/ | |
do_action('ap_after_question_content'); | |
?> | |
<?php | |
/** | |
* ACTION: ap_after_question_content | |
* @since 2.0.0-alpha2 | |
*/ | |
do_action('ap_after_question_content'); | |
?> | |
<?php ap_question_the_active_time(); ?> | |
<?php ap_post_status_description(ap_question_get_the_ID()); ?> | |
<?php ap_post_actions_buttons() ?> | |
<?php | |
/** | |
* ACTION: ap_after_question_actions | |
* @since 2.0 | |
*/ | |
do_action('ap_after_question_actions'); | |
?> | |
</div> | |
<!-- End ap-content-inner --> | |
<?php ap_question_the_comments(); ?> | |
</div> | |
</div> | |
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Sidebar Ad --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4742908774901035" data-ad-slot="2662333503" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> | |
<?php | |
/** | |
* Output list of answers | |
*/ | |
ap_question_the_answers(); | |
?> | |
<?php ap_question_the_answer_form(); ?> | |
<br/> | |
<br/> | |
<div class="border-box"><a href="http://play.google.com/store/apps/details?id=in.atultiwari.clinicalsigns"><img src="/screenshots/clinical_signs_banner.png" target="_blank" alt="Clinical Signs" style="padding:3px"></a><a href="http://play.google.com/store/apps/details?id=in.atultiwari.radiologysigns"><img src="/screenshots/radiology_signs_banner.png" target="_blank" alt="Radiology Signs" style="padding:3px"></a></div> | |
</div> | |
<?php if ( is_active_sidebar( 'ap-qsidebar' ) || ap_opt('show_question_sidebar')){ ?> | |
<div class="ap-question-right col-md-3"> | |
<?php if(ap_opt('show_question_sidebar')): ?> | |
<?php the_widget( 'AnsPress_Subscribe_Widget' ); ?> | |
<h3 class="ap-widget-title"><?php _e('Question stats', 'ap'); ?></h3> | |
<?php the_widget('AnsPress_Stats_Widget'); ?> | |
<?php endif; ?> | |
<div class="ap-question-info"> | |
<?php dynamic_sidebar( 'ap-qsidebar' ); ?> | |
</div> | |
</div> | |
<?php } ?> | |
</div> | |
<?php } ?> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment