コード例 #1
0
ファイル: tinypass-form.php プロジェクト: voodoologic/reboot
/**
 * Show the metered content section
 */
function __tinypass_counter_display(TPPaySettings $ps)
{
    ?>

	<div class="tp-section">
		<div class="info">
			<div class="heading"><?php 
    _e('Add a preview counter');
    ?>
</div>
			<div class="slider">
				<?php 
    echo tinypass_slider('tinypass[ct_en]', array('Off' => '0', 'On' => '1'), $ps->getCounterEnabled());
    ?>
				<div class="clear"></div>
				<br>
			</div>
			<div class="desc">
				Show a small counter on the edge of the screen so users know how many free views they have left.
			</div>
			<div class="image">
				<img src="<?php 
    echo TINYPASS_IMAGE_DIR;
    ?>
/support-counter.png">
			</div>
		</div>
		<div class="body">

			<div class="postbox">
				<!--
			<h3><?php 
    _e('Where should clicking on the counter bring users?');
    ?>
 </h3>
			<div class="inside">
				<div class="label">
					<input type="radio" name="tinypass[ct_onclick]" value="<?php 
    echo TPPaySettings::CT_ONCLICK_NOTHING;
    ?>
" <?php 
    checked($ps->isCounterOnClick(TPPaySettings::CT_ONCLICK_NOTHING));
    ?>
>
					Counter is not clickable
				</div>
				<div class="label">
					<input type="radio" name="tinypass[ct_onclick]" value="<?php 
    echo TPPaySettings::CT_ONCLICK_PAGE;
    ?>
" <?php 
    checked($ps->isCounterOnClick(TPPaySettings::CT_ONCLICK_PAGE));
    ?>
>
					Open the dedicated information page on your site in a new tab ( defined below )
				</div>
				<div class="label">
					<input type="radio" name="tinypass[ct_onclick]" value="<?php 
    echo TPPaySettings::CT_ONCLICK_APPEAL;
    ?>
" <?php 
    checked($ps->isCounterOnClick(TPPaySettings::CT_ONCLICK_APPEAL));
    ?>
 >
					Open the pop-up appeal over the current page (appeal must be enabled first) 
				</div>
				<br>
			</div>
				-->
				<h3><?php 
    _e('Customize it');
    ?>
 </h3>
				<div class="inside">
					<div class="label">Where should the counter appear?
						<?php 
    echo __tinypass_dropdown("tinypass[ct_pos]", array('1' => 'Top right', '2' => 'Top left', '3' => 'Bottom left', '4' => 'Bottom right'), $ps->getCounterPosition());
    ?>
					</div>
					<div class="label">Only show the counter to user after
						<input type="text" name="tinypass[ct_delay]" size="2" value="<?php 
    echo $ps->getCounterDelay(0);
    ?>
">
						views
					</div>
				</div>
				<br> <br>
				<!--	
				<h3><?php 
    _e('Create a custom preview counter');
    ?>
 </h3>
				<div class="inside"> 
					<div class="">
						Override the default appeal design by creating a custom template file
						<br> <br>
				<?php 
    echo get_template_directory();
    ?>
/<b>tinypass_counter_display.php</b>
					</div>
				</div>
				-->
			</div>
		</div>
		<div class="clear"></div>
	</div>

<?php 
}