function adinj_adverts_box($ops) { adinj_postbox_start(__("Adverts", 'adinj'), 'adverts'); ?> <h3><a name="topadcode"></a>Top ad (below post title - this is not a 'header' ad) [<a href="#topadplacement">placement</a>] <!--[<a href='?page=ad-injection&tab=adrotation#multiple_top'>pool</a>]--></h3> <table border="0" class="adinjtable" width="98%"> <tr><td> <textarea name="ad_code_top_1" rows="10" cols="<?php adinj_table_width('ad'); ?> "><?php echo adinj_process_text($ops['ad_code_top_1']); ?> </textarea> <br /> <p><span style="font-size:10px;"><b>Docs:</b> Try a <a href="#468x15">468x15</a> or <a href="#336x280">336x280</a> advert.</span></p> </td><td> <?php adinj_add_alignment_options('top_'); echo "<br /><b><a href='?page=ad-injection&tab=adrotation#multiple_top'>Rotation:<br />" . adinj_percentage_split('ad_code_top_', 1, $ops) . "</a></b>"; ?> </td></tr> </table> <p><span style="font-size:10px;">Be especially careful if you decide to use the 'float' layout options. Make sure that you don't have adverts floated over the top of other page elements, or vice-versa.</span></p> <h3><a name="randomadcode"></a>Random ad (inserted randomly between paragraphs) [<a href="#randomadplacement">placement</a>] <!--[<a href='?page=ad-injection&tab=adrotation#multiple_random'>pool</a>]--></h3> <table border="0" class="adinjtable" width="98%"> <tr><td> <textarea name="ad_code_random_1" rows="10" cols="<?php adinj_table_width('ad'); ?> "><?php echo adinj_process_text($ops['ad_code_random_1']); ?> </textarea> <br /> <p><span style="font-size:10px;"><b>Docs:</b> Try a <a href="#468x60">468x60</a> or <a href="#728x90">728x90</a> banner.</span></p> </td><td> <?php adinj_add_alignment_options('rnd_'); echo "<br /><b><a href='?page=ad-injection&tab=adrotation#multiple_random'>Rotation:<br />" . adinj_percentage_split('ad_code_random_', 1, $ops) . "</a></b>"; ?> </td></tr> </table> <h3><a name="bottomadcode"></a>Bottom ad (below the post content) [<a href="#bottomadplacement">placement</a>] <!--[<a href='?page=ad-injection&tab=adrotation#multiple_bottom'>pool</a>]--></h3> <table border="0" class="adinjtable" width="98%"> <tr><td> <textarea name="ad_code_bottom_1" rows="10" cols="<?php adinj_table_width('ad'); ?> "><?php echo adinj_process_text($ops['ad_code_bottom_1']); ?> </textarea> <br /> <p><span style="font-size:10px;"><b>Docs:</b> Try a <a href="#336x280">336x280</a> advert.</span></p> </td><td> <?php adinj_add_alignment_options('bottom_'); echo "<br /><b><a href='?page=ad-injection&tab=adrotation#multiple_bottom'>Rotation:<br />" . adinj_percentage_split('ad_code_bottom_', 1, $ops) . "</a></b>"; ?> </td></tr> </table> <h3><a name="footeradcode"></a>Footer ad (put into 'the_footer' hook - not supported by all themes) [<a href="#footeradplacement">placement</a>] <!--[<a href='?page=ad-injection&tab=adrotation#multiple_footer'>pool</a>]--></h3> <table border="0" class="adinjtable" width="98%"> <tr><td> <textarea name="ad_code_footer_1" rows="10" cols="<?php adinj_table_width('ad'); ?> "><?php echo adinj_process_text($ops['ad_code_footer_1']); ?> </textarea> <br /> Docs: footer ad information and troubleshooting <?php adinj_add_show_hide_section('footer_docs_' . uniqid(''), 'ui_footer_docs_show', 'ui_footer_docs_show', $ops); ?> <blockquote> <p><span style="font-size:10px;">Try a <a href="#468x60">468x60</a> or <a href="#728x90">728x90</a> banner.</span></p> <p><span style="font-size:10px;">The footer ad will only work if your theme supports it.</span></p> <p><span style="font-size:10px;">Your theme must include 'the_footer' hook in the correct part of the page. If the footer ad is appearing in the wrong place, you could try manually editing your theme to move 'the_footer' hook.</span></p> </blockquote> </div> </td><td> <?php adinj_add_alignment_options('footer_'); echo "<br /><b><a href='?page=ad-injection&tab=adrotation#multiple_footer'>Rotation:<br />" . adinj_percentage_split('ad_code_footer_', 1, $ops) . "</a></b>"; ?> </td></tr> </table> <?php adinj_postbox_end(); }
function adinj_condition_tables($prefix, $show_setting) { $ops = adinj_options(); if (strlen($ops[$prefix . 'category_condition_entries']) > 0 || strlen($ops[$prefix . 'tag_condition_entries']) > 0 || strlen($ops[$prefix . 'author_condition_entries']) > 0 || strlen($ops[$prefix . 'id_condition_entries']) > 0) { $msg = "configured"; } else { $msg = "empty"; } echo "Category tag, author, and post id conditions [<b>" . $msg . "</b>]"; adinj_add_show_hide_section('ad_conditions_' . uniqid(''), $show_setting, $show_setting, $ops); adinj_condition_table($prefix . 'category', 'category slugs. e.g: cat1, cat2, cat3', 'category', $ops); adinj_condition_table($prefix . 'tag', 'tag slugs. e.g: tag1, tag2, tag3', 'tag', $ops); adinj_condition_table($prefix . 'author', 'author nicknames. e.g: john, paul', 'author', $ops); adinj_condition_table($prefix . 'id', 'post or page ids. e.g: 7, 38, 243', 'id', $ops); echo '</div>'; }
function add_show_hide_section($anchor, $show_op, $ops) { $show_field_name = $this->get_field_name($show_op); adinj_add_show_hide_section($anchor, $show_op, $show_field_name, $ops); }