function nrelate_flyout_anim_styles_do_page() { ?> <?php nrelate_flyout_settings_header(); ?> <script type="text/javascript"> //<![CDATA[ var nr_fo_anim_plugin_settings_url = '<?php echo NRELATE_FLYOUT_SETTINGS_URL; ?> '; var nr_plugin_domain = '<?php echo NRELATE_BLOG_ROOT; ?> '; var nr_fo_anim_plugin_version = '<?php echo NRELATE_FLYOUT_PLUGIN_VERSION; ?> '; //]]> </script> <form name="settings" action="options.php" method="post" enctype="multipart/form-action"> <?php $options = get_option('nrelate_flyout_anim_options'); $style_options = get_option('nrelate_flyout_anim_options_styles'); if (isset($_GET['mode']) && in_array($_GET['mode'], array('Fly', 'Fade'))) { $options['flyout_anim_fly'] = $_GET['mode']; } ?> <div class="nrelate-hidden"> <input type="hidden" id="flyout_anim_number_of_posts" value="<?php echo isset($options['flyout_anim_number_of_posts']) ? $options['flyout_anim_number_of_posts'] : ''; ?> " /> <input type="hidden" id="flyout_anim_title" value="<?php echo isset($options['flyout_anim_title']) ? $options['flyout_anim_title'] : ''; ?> " /> <input type="checkbox" id="flyout_anim_show_post_title" <?php echo empty($options['flyout_anim_show_post_title']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_anim_max_chars_per_line" value="<?php echo isset($options['flyout_anim_max_chars_per_line']) ? $options['flyout_anim_max_chars_per_line'] : ''; ?> " /> <input type="checkbox" id="flyout_anim_show_post_excerpt" <?php echo empty($options['flyout_anim_show_post_excerpt']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_anim_max_chars_post_excerpt" value="<?php echo isset($options['flyout_anim_max_chars_post_excerpt']) ? $options['flyout_anim_max_chars_post_excerpt'] : ''; ?> " /> <input type="checkbox" id="show_ad" <?php echo empty($options['flyout_anim_display_ad']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_anim_number_of_ads" value="<?php echo isset($options['flyout_anim_number_of_ads']) ? $options['flyout_anim_number_of_ads'] : ''; ?> " /> <input type="hidden" id="flyout_anim_ad_placement" value="<?php echo isset($options['flyout_anim_ad_placement']) ? $options['flyout_anim_ad_placement'] : ''; ?> " /> <input type="checkbox" id="show_logo" <?php echo empty($options['flyout_anim_display_logo']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_anim_fly" value="<?php echo isset($options['flyout_anim_fly']) ? $options['flyout_anim_fly'] : ''; ?> " /> <input type="hidden" id="flyout_anim_fade_style" value="<?php echo empty($style_options['flyout_anim_fade_style']) ? 'nyt' : $style_options['flyout_anim_fade_style']; ?> " /> <input type="hidden" id="flyout_anim_slideout_style" value="<?php echo empty($style_options['flyout_anim_slideout_style']) ? 'nyt' : $style_options['flyout_anim_slideout_style']; ?> " /> <input type="hidden" id="flyout_anim_default_image" value="<?php echo isset($options['flyout_anim_default_image']) ? $options['flyout_anim_default_image'] : ''; ?> " /> <input type="hidden" id="flyout_anim_max_age_num" value="<?php echo isset($options['flyout_anim_max_age_num']) ? $options['flyout_anim_max_age_num'] : ''; ?> " /> <input type="hidden" id="flyout_anim_max_age_frame" value="<?php echo isset($options['flyout_anim_max_age_frame']) ? $options['flyout_anim_max_age_frame'] : ''; ?> " /> <input type="checkbox" class="nrelate-thumb-size" value="<?php echo isset($options['flyout_anim_fly_size']) ? $options['flyout_anim_fly_size'] : ''; ?> " checked="checked" /> <input type="checkbox" id="ad_animation" value="on" <?php echo empty($options['flyout_anim_ad_animation']) ? '' : ' checked="checked" '; ?> /> </div> <?php settings_fields('nrelate_flyout_anim_options_styles'); ?> <?php do_settings_sections(__FILE__); ?> <!-- <br> <button type="button" class="nrelate_fo_preview_button button-primary" onClick="return nrelate_flyout_anim_popup_preview('<?php echo NRELATE_FLYOUT_SETTINGS_URL; ?> ','<?php echo NRELATE_BLOG_ROOT; ?> ','<?php echo NRELATE_FLYOUT_PLUGIN_VERSION; ?> ');"> <?php _e('Preview', 'nrelate'); ?> </button> --> <p class="submit"> <input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes', 'nrelate'); ?> " /> </p> </form> </div> <?php }
function nrelate_flyout_do_page() { // nflyout option loaded from wp db $options = get_option('nrelate_flyout_options'); $ad_options = get_option('nrelate_flyout_options_ads'); $style_options = get_option('nrelate_flyout_options_styles'); ?> <?php nrelate_flyout_settings_header(); ?> <script type="text/javascript"> //<![CDATA[ var nr_fo_plugin_settings_url = '<?php echo NRELATE_FLYOUT_SETTINGS_URL; ?> '; var nr_plugin_domain = '<?php echo NRELATE_BLOG_ROOT; ?> '; var nr_fo_plugin_version = '<?php echo NRELATE_FLYOUT_PLUGIN_VERSION; ?> '; //]]> </script> <form name="settings" action="options.php" method="post" enctype="multipart/form-action"> <div class="nrelate-hidden"> <input type="checkbox" id="show_ad" <?php echo empty($ad_options['flyout_display_ad']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_number_of_ads" value="<?php echo isset($ad_options['flyout_number_of_ads']) ? $ad_options['flyout_number_of_ads'] : ''; ?> " /> <input type="hidden" id="flyout_ad_placement" value="<?php echo isset($ad_options['flyout_ad_placement']) ? $ad_options['flyout_ad_placement'] : ''; ?> " /> <input type="hidden" id="flyout_ad_title" value="<?php echo isset($ad_options['flyout_ad_title']) ? $ad_options['flyout_ad_title'] : ''; ?> " /> <input type="checkbox" id="ad_animation" value="on" <?php echo empty($ad_options['flyout_ad_animation']) ? '' : ' checked="checked" '; ?> /> <input type="hidden" id="flyout_imagestyle" value="<?php echo $style_options['flyout_thumbnails_style']; ?> " /> <input type="hidden" id="flyout_textstyle" value="<?php echo $style_options['flyout_text_style']; ?> " /> <input type="hidden" id="flyout_blogoption" value="<?php echo isset($options['flyout_blogoption']) && is_array($options['flyout_blogoption']) && count($options['flyout_blogoption']) > 0 ? 1 : 0; ?> " /> </div> <?php settings_fields('nrelate_flyout_options'); ?> <?php do_settings_sections(__FILE__); ?> </form> <script type="text/javascript"> //<![CDATA[ jQuery(document).ready(function($){ $('.nrelate_preview_button').click(function(event){ event.preventDefault(); $(this).parents('form:first').find('.nrelate_disabled_preview span').hide(); if ($('#flyout_thumbnail').val()=='Thumbnails') { if ($('#flyout_imagestyle').val()=='none') { $(this).parents('td:first').find('.thumbnails_message:first').show(); return; } } else { if ($('#flyout_textstyle').val()=='none') { $(this).parents('td:first').find('.text_message:first').show(); return; } } if ($('#flyout_thumbnail').val()=='Text') { if (!$('#flyout_show_post_title').is(':checked') && !$('#flyout_show_post_excerpt').is(':checked')) { $(this).parents('td:first').find('.text-warning-message:first').show(); setTimeout('tb_remove()', 50); return; } } }); $('#flyout_thumbnail').change(function(){ $(this).parents('form:first').find('.nrelate_disabled_preview span').hide(); }); $('input.button-primary[name="Submit"]').click(function(event){ $(this).parents('form:first').find('.nrelate_disabled_preview span').hide(); if ($('#flyout_thumbnail').val()=='Thumbnails') return; if ($('#flyout_show_post_title').is(':checked')) return; if ($('#flyout_show_post_excerpt').is(':checked')) return; event.preventDefault(); event.stopPropagation(); $(this).parents('td:first').find('.text-warning-message:first').show(); }); }); //]]> </script> </div> <?php update_nrelate_data_fo(); }
function nrelate_flyout_styles_do_page() { ?> <?php nrelate_flyout_settings_header(); ?> <script type="text/javascript"> //<![CDATA[ var nr_fo_plugin_settings_url = '<?php echo NRELATE_FLYOUT_SETTINGS_URL; ?> '; var nr_plugin_domain = '<?php echo NRELATE_BLOG_ROOT; ?> '; var nr_fo_plugin_version = '<?php echo NRELATE_FLYOUT_PLUGIN_VERSION; ?> '; //]]> </script> <form name="settings" action="options.php" method="post" enctype="multipart/form-action"> <?php $options = get_option('nrelate_flyout_options'); $style_options = get_option('nrelate_flyout_options_styles'); if (isset($_GET['mode']) && in_array($_GET['mode'], array('Thumbnails', 'Text'))) { $options['flyout_thumbnail'] = $_GET['mode']; } ?> <div class="nrelate-hidden"> <input type="hidden" id="flyout_number_of_posts" value="<?php echo isset($options['flyout_number_of_posts']) ? $options['flyout_number_of_posts'] : ''; ?> " /> <input type="hidden" id="flyout_title" value="<?php echo isset($options['flyout_title']) ? $options['flyout_title'] : ''; ?> " /> <input type="checkbox" id="flyout_show_post_title" <?php echo empty($options['flyout_show_post_title']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_max_chars_per_line" value="<?php echo isset($options['flyout_max_chars_per_line']) ? $options['flyout_max_chars_per_line'] : ''; ?> " /> <input type="checkbox" id="flyout_show_post_excerpt" <?php echo empty($options['flyout_show_post_excerpt']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_max_chars_post_excerpt" value="<?php echo isset($options['flyout_max_chars_post_excerpt']) ? $options['flyout_max_chars_post_excerpt'] : ''; ?> " /> <input type="checkbox" id="show_ad" <?php echo empty($options['flyout_display_ad']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_number_of_ads" value="<?php echo isset($options['flyout_number_of_ads']) ? $options['flyout_number_of_ads'] : ''; ?> " /> <input type="hidden" id="flyout_ad_placement" value="<?php echo isset($options['flyout_ad_placement']) ? $options['flyout_ad_placement'] : ''; ?> " /> <input type="checkbox" id="show_logo" <?php echo empty($options['flyout_display_logo']) ? '' : 'checked="checked"'; ?> value="on" /> <input type="hidden" id="flyout_thumbnail" value="<?php echo isset($options['flyout_thumbnail']) ? $options['flyout_thumbnail'] : ''; ?> " /> <input type="hidden" id="flyout_textstyle" value="<?php echo empty($style_options['flyout_text_style']) ? 'default' : $style_options['flyout_text_style']; ?> " /> <input type="hidden" id="flyout_imagestyle" value="<?php echo empty($style_options['flyout_thumbnails_style']) ? 'default' : $style_options['flyout_thumbnails_style']; ?> " /> <input type="hidden" id="flyout_default_image" value="<?php echo isset($options['flyout_default_image']) ? $options['flyout_default_image'] : ''; ?> " /> <input type="hidden" id="flyout_max_age_num" value="<?php echo isset($options['flyout_max_age_num']) ? $options['flyout_max_age_num'] : ''; ?> " /> <input type="hidden" id="flyout_max_age_frame" value="<?php echo isset($options['flyout_max_age_frame']) ? $options['flyout_max_age_frame'] : ''; ?> " /> <input type="hidden" id="flyout_thumbnail_size" value="<?php echo isset($options['flyout_thumbnail_size']) ? $options['flyout_thumbnail_size'] : ''; ?> " /> <input type="checkbox" id="ad_animation" value="on" <?php echo empty($options['flyout_ad_animation']) ? '' : ' checked="checked" '; ?> /> </div> <?php settings_fields('nrelate_flyout_options_styles'); ?> <?php do_settings_sections(__FILE__); ?> <?php nrelate_save(); ?> </form> </div> <?php }