Advertisement
Guest User

Content Slider Update

a guest
Aug 6th, 2010
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 45.46 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: Easing Slider
  4. Plugin URI: http://easingslider.matthewruddy.com
  5. Description: Easing Slider is an image slider which uses the jQuery Easing Plugin. It comes with many different transition and styling settings so you'll never have to edit any of the CSS files directly. Images are got from custom fields or Easing Slider's own 'custom images' panel where you can specify particular images via their URL.
  6. Version: 1.0
  7. Author: Matthew Ruddy
  8. Author URI: http://matthewruddy.com
  9. License: This plugin is dual-licensed under the GNU General Public License and the MIT License.
  10. */
  11.  
  12. function my_admin_scripts() {
  13. wp_enqueue_script('media-upload');
  14. wp_enqueue_script('thickbox');
  15. wp_register_script('uploadimagebutton', WP_PLUGIN_URL.'/easing-slider/js/uploadimagebutton.js', array('jquery','media-upload','thickbox'));
  16. wp_enqueue_script('uploadimagebutton');
  17. }
  18.  
  19. function my_admin_styles() {
  20. wp_enqueue_style('thickbox');
  21. }
  22.  
  23. if (isset($_GET['page']) && $_GET['page'] == 'easing-slider/easingslider.php') {
  24. add_action('admin_print_scripts', 'my_admin_scripts');
  25. add_action('admin_print_styles', 'my_admin_styles');
  26. }
  27.  
  28. function easing_head() {
  29.   $width = get_option('width');
  30.     $interval = get_option('interval');
  31.     $transition = get_option('transition');
  32.     $transpeed = get_option('transpeed');
  33.     $start = get_option('start');
  34.     $pageposition = get_option('pageposition');
  35.     $pageside = get_option('pageside');
  36.     $paginationon = get_option('paginationon');
  37.     $paginationoff = get_option('paginationoff');
  38. ?>
  39.  
  40. <!-- Start of Easing Slider -->
  41. <style type="text/css">ul.lof-navigator li{background: url(<?php if($paginationoff=='') echo WP_PLUGIN_URL.'/easing-slider/images/pagination.png'; if($paginationoff!='') echo $paginationoff; ?>) 0 0 no-repeat;} ul.lof-navigator li.active{background: url(<?php if($paginationon=='') echo WP_PLUGIN_URL.'/easing-slider/images/pagination_current.png'; if($paginationon!='') echo $paginationon; ?>) 0 0 no-repeat;}</style>
  42.  
  43. <script type="text/javascript">
  44. jQuery(document).ready(function($) {
  45. var buttons = { previous:$('#lofslidecontent45 .lof-previous') ,
  46. next:$('#lofslidecontent45 .lof-next') };
  47. $obj = $('#lofslidecontent45')
  48. .lofJSidernews( { interval : <?php echo $interval; ?>,
  49. <?php if($transition=='slide') echo "easing : 'easeInOutExpo'";
  50. if($transition=='smooth') echo "easing : 'easeInOutQuad'";
  51. if($transition=='fade') echo "direction : 'opacity'";
  52. if($transition=='swipe') echo "easing : 'easeOutBack'";
  53. if($transition=='bounce') echo "easing : 'easeOutBounce'"; ?>,
  54. duration : <?php echo $transpeed; ?>,
  55. auto : true,
  56. maxItemDisplay : 10,
  57. startItem:<?php if($start=='1') echo '0';
  58. if($start=='2') echo '1';
  59. if($start=='3') echo '2';
  60. if($start=='4') echo '3';
  61. if($start=='5') echo '4';
  62. if($start=='6') echo '5';
  63. if($start=='7') echo '6';
  64. if($start=='8') echo '7';
  65. if($start=='9') echo '8';
  66. if($start=='10') echo '9'; ?>,
  67. navPosition     : 'horizontal', // horizontal
  68. navigatorHeight : 15,
  69. navigatorWidth  : 25,
  70. buttons : buttons,
  71. mainWidth:<?php echo $width; ?>} );
  72. });</script>
  73. <!-- End of Easing Slider -->
  74. <?php }
  75.  
  76. function add_scripts() {
  77. $scripturl = WP_PLUGIN_URL .'/easing-slider/js/';
  78.  
  79. if ( !is_admin() ) {
  80.  
  81. wp_enqueue_script('jquery', $scripturl.'jquery.js');
  82.  
  83.  
  84. }
  85.  
  86. wp_enqueue_script('easing', $scripturl.'jquery.easing.js', '', '1.3');
  87. wp_enqueue_script('script', $scripturl.'script.js', '', '1.0');
  88.  
  89.  
  90. }
  91.  
  92. function add_styles() {
  93. $sliderstyle = WP_PLUGIN_URL .'/easing-slider/css/slider.css';
  94.  
  95. wp_register_style('slider', $sliderstyle, '', '1.0');
  96. wp_enqueue_style('slider');
  97.  
  98. }
  99.  
  100. add_action('wp_print_styles','add_styles');
  101. add_action('wp_print_scripts','add_scripts');
  102.  
  103. function admin_files() {
  104.     ?><link rel="stylesheet" href="<?php echo WP_PLUGIN_URL .'/easing-slider/css/tabs.css'; ?>" />
  105.     <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
  106.     <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/element/element-beta-min.js"></script>
  107.     <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/connection/connection-min.js"></script>
  108.     <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/tabview/tabview-min.js"></script>
  109. <?php }
  110.  
  111. add_action('admin_head', 'admin_files');
  112. add_action('wp_head', 'easing_head');
  113.  
  114. function easing_slider() {
  115.     $sImg1 = get_option('sImg1');
  116.     $sImg2 = get_option('sImg2');
  117.     $sImg3 = get_option('sImg3');
  118.     $sImg4 = get_option('sImg4');
  119.     $sImg5 = get_option('sImg5');
  120.     $sImg6 = get_option('sImg6');
  121.     $sImg7 = get_option('sImg7');
  122.     $sImg8 = get_option('sImg8');
  123.     $sImg9 = get_option('sImg9');
  124.     $sImg10 = get_option('sImg10');
  125.     $sPagination = get_option('sPagination');
  126.     $activation = get_option('activation');
  127.     $width = get_option('width');
  128.     $height = get_option('height');
  129.     $shadow = get_option('shadow');
  130.     $interval = get_option('interval');
  131.     $transition = get_option('transition');
  132.     $bgcolour = get_option('bgcolour');
  133.     $transpeed = get_option('transpeed');
  134.     $bwidth = get_option('bwidth');
  135.     $bcolour = get_option('bcolour');
  136.     $preload = get_option('preload');
  137.     $start = get_option('start');
  138.     $buttons = get_option('buttons');
  139.     $source = get_option('source');
  140.     $featcat = get_option('featcat');
  141.     $featpost = get_option('featpost');
  142.     $padbottom = get_option('padbottom');
  143.     $padleft = get_option('padleft');
  144.     $shadowstyle = get_option('shadowstyle');
  145.     $paginationon = get_option('paginationon');
  146.     $paginationoff = get_option('paginationoff');
  147.     $next = get_option('next');
  148.     $prev = get_option('prev');
  149.     $pageposition = get_option('pageposition');
  150.     $pageside = get_option('pageside');
  151.  
  152.     $padtop = $bwidth*2;
  153.  
  154.     if ($activation == 'enable') {
  155.  
  156.     $padding = '';
  157.  
  158.     if ($shadow == '') {
  159.     $padding = $padbottom; }
  160.     else {
  161.     $imgpadding = $padbottom; } ?>
  162.   <!-- Easing Slider -->
  163.     <div class="lof-container" style="height:<?php echo $height; ?>px;padding-left:<?php echo $padleft;?>px;padding-bottom:<?php echo $imgpadding;?>px;">
  164.       <div class="lof-slidecontent" id="lofslidecontent45" style="border:<?php echo $bwidth;?>px solid #<?php echo $bcolour; ?>;width:<?php echo $width; ?>px;height:<?php echo $height; ?>px;">
  165.         <div class="preload" style="background:#<?php if($bgcolour=='') echo 'fff'; else echo $bgcolour; ?>;">
  166.            <div style="background:transparent url(<?php echo WP_PLUGIN_URL; ?>/easing-slider/images/<?php if($preload=='indicator') echo 'indicator'; if($preload=='none') echo ''; if($preload=='arrows') echo 'arrows';  if($preload=='bar') echo 'bar'; if($preload=='bigflower') echo 'bigflower'; if($preload=='bounceball') echo 'bounceball'; if($preload=='indicatorlight') echo 'indicatorlight'; if($preload=='pik') echo 'pik'; if($preload=='snake') echo 'snake'; ?>.gif) no-repeat scroll 50% 50%;">
  167.           </div>
  168.         </div>
  169.             <div class="lof-main-outer" style="background: #<?php echo $bgcolour; ?>;width:<?php echo $width; ?>px;height:<?php echo $height; ?>px;">
  170.               <ul class="lof-main-wapper">
  171.               <?php
  172.    
  173.     if(get_option('source') == 'featured') { ?>
  174.       <?php $recent = new WP_Query('cat='.$featcat.'&showposts='.$featpost.'');
  175.         while($recent->have_posts()) : $recent->the_post(); global $post;
  176.           $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
  177.                   <li><img src="<?php echo $image; ?>" width="<?php echo $width; ?>" alt="<?php echo $images; ?>" /></li>
  178.                  
  179.         <?php }endwhile; ?>
  180.        
  181.     <?php } else if(get_option('source') == 'all') { ?>
  182.       <?php $recent = new WP_Query('showposts='.$featpost.'');
  183.         while($recent->have_posts()) : $recent->the_post(); global $post;
  184.           $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
  185.                    <li><img src="<?php echo $image; ?>" width="<?php echo $width; ?>" alt="<?php echo $images; ?>"/></li>
  186.                    
  187.         <?php }endwhile; ?>
  188.        
  189.   <?php } else if(get_option('source') == 'custom') {
  190.  
  191.     if ($sImg1) {
  192.         echo '<li><img src="'.$sImg1.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  193.  
  194.     if ($sImg2) {
  195.         echo '<li><img src="'.$sImg2.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  196.        
  197.     if ($sImg3) {
  198.         echo '<li><img src="'.$sImg3.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  199.        
  200.     if ($sImg4) {
  201.         echo '<li><img src="'.$sImg4.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  202.        
  203.     if ($sImg5) {
  204.         echo '<li><img src="'.$sImg5.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  205.        
  206.     if ($sImg6) {
  207.         echo '<li><img src="'.$sImg6.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  208.        
  209.     if ($sImg7) {
  210.         echo '<li><img src="'.$sImg7.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  211.        
  212.     if ($sImg8) {
  213.         echo '<li><img src="'.$sImg8.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  214.        
  215.     if ($sImg9) {
  216.         echo '<li><img src="'.$sImg9.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  217.        
  218.     if ($sImg10) {
  219.         echo '<li><img src="'.$sImg10.'" style="width:'. $width .'px;" alt="'. $images .'" /></li>'; }
  220.        
  221.         }
  222.        
  223.     ?></ul><?php
  224.  
  225.  
  226.     if ($buttons=='');
  227.     else { ?>
  228.               <div onclick="return false" class="lof-previous" style="
  229.     background:url(<?php if($prev=='') echo WP_PLUGIN_URL.'/easing-slider/images/b_prev.png'; if($prev!='') echo $prev; ?>) no-repeat left center;"></div>
  230.               <div onclick="return false" class="lof-next" style="
  231.     background:url(<?php if($next=='') echo WP_PLUGIN_URL.'/easing-slider/images/b_next.png'; if($next!='') echo $next; ?>) no-repeat right center;"></div> <?php }
  232.  
  233.     ?></div><?php
  234.  
  235.  
  236.     $sPagination = get_option('sPagination');
  237.  
  238.     if ($sPagination=='yes') { ?>
  239.                 <div class="lof-navigator-wapper" style="bottom:<?php if($pageposition=='outside') echo '-35'; if($pageposition=='inside') echo '5'; ?>px;<?php if($pageside=='left') echo 'left: 0'; if($pageside=='right') echo 'right:-10px'; ?>;padding:5px <?php if($pageposition=='outside') echo '5'; if($pageposition=='inside') echo '15'; ?>px;">
  240.                   <div class="lof-navigator-outer">
  241.                     <ul class="lof-navigator">
  242.                       <?php
  243.    
  244.     if(get_option('source') == 'featured') { ?>
  245.       <?php $recent = new WP_Query('cat='.$featcat.'&showposts='.$featpost.'');
  246.         while($recent->have_posts()) : $recent->the_post(); global $post;
  247.           $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
  248.             <li><span>.</span></li>
  249.         <?php }endwhile; ?>
  250.        
  251.       <?php } else if(get_option('source') == 'all') { ?>
  252.       <?php $recent = new WP_Query('showposts='.$featpost.'');
  253.         while($recent->have_posts()) : $recent->the_post(); global $post;
  254.           $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
  255.             <li><span>.</span></li>
  256.         <?php }endwhile; ?>
  257.        
  258. <?php } else if(get_option('source') == 'custom') {
  259.  
  260.     if ($sImg1) {
  261.         echo '<li><span>.</span></li>'; }
  262.     if ($sImg2) {
  263.         echo '<li><span>.</span></li>'; }
  264.     if ($sImg3) {
  265.         echo '<li><span>.</span></li>'; }
  266.     if ($sImg4) {
  267.         echo '<li><span>.</span></li>'; }
  268.     if ($sImg5) {
  269.         echo '<li><span>.</span></li>'; }
  270.     if ($sImg6) {
  271.         echo '<li><span>.</span></li>'; }
  272.     if ($sImg7) {
  273.         echo '<li><span>.</span></li>'; }
  274.     if ($sImg8) {
  275.         echo '<li><span>.</span></li>'; }
  276.     if ($sImg9) {
  277.         echo '<li><span>.</span></li>'; }
  278.     if ($sImg10) {
  279.         echo '<li><span>.</span></li>'; }
  280. }
  281.  
  282.     ?>             </ul>
  283.                 </div>
  284.               </div><?php  }
  285.    
  286.     elseif ($sPagination=='no') {
  287.     echo ''; } ?>
  288.             </div>
  289.           </div><?php
  290.  
  291.     if ($shadow=='')  
  292.     echo '<img src="'.WP_PLUGIN_URL.'/easing-slider/images/shadow_'.$shadowstyle.'.png" style="width:'.$width.'px; padding-left:'.$padleft.'px;padding-bottom:'.$padding.'px;padding-top:'.$padtop.'px;margin-left:'.$bwidth.'px;" alt="" />'; ?><!-- End of Easing Slider --><?php
  293.  
  294. }
  295. }
  296.  
  297. add_shortcode('easingslider', 'easing_slider');
  298.  
  299. function set_easing_options() {
  300.   add_option('sImg1','','');
  301.     add_option('sImg2','','');
  302.     add_option('sImg3','','');
  303.     add_option('sImg4','','');
  304.     add_option('sImg5','','');
  305.     add_option('sImg6','','');
  306.     add_option('sImg7','','');
  307.     add_option('sImg8','','');
  308.     add_option('sImg9','','');
  309.     add_option('sImg10','','');
  310.     add_option('sPagination','yes','');
  311.     add_option('activation','enable','');
  312.     add_option('width','480','');
  313.     add_option('height','185','');
  314.     add_option('shadow','','');
  315.     add_option('interval','4000','');
  316.     add_option('transition','slide','');
  317.     add_option('bgcolour','fff','');
  318.     add_option('transpeed','1200','');
  319.     add_option('bwidth','5','');
  320.     add_option('bcolour','ccc','');
  321.     add_option('preload','indicator','');
  322.     add_option('start','1','');
  323.     add_option('buttons','','');
  324.     add_option('source','featured','');
  325.     add_option('featcat','','');
  326.     add_option('featpost','5','');
  327.     add_option('padbottom','0','');
  328.     add_option('padleft','0','');
  329.     add_option('shadowstyle','arc','');
  330.     add_option('paginationon','','');
  331.     add_option('paginationoff','','');
  332.     add_option('next','','');
  333.     add_option('prev','','');
  334.     add_option('pageposition','outside','');
  335.     add_option('pageside','left','');
  336. }
  337.  
  338. function unset_easing_options() {
  339.     delete_option('sImg1');
  340.     delete_option('sImg2');
  341.     delete_option('sImg3');
  342.     delete_option('sImg4');
  343.     delete_option('sImg5');
  344.     delete_option('sImg6');
  345.     delete_option('sImg7');
  346.     delete_option('sImg8');
  347.     delete_option('sImg9');
  348.     delete_option('sImg10');
  349.     delete_option('sPagination');
  350.     delete_option('activation');
  351.     delete_option('width');
  352.     delete_option('height');
  353.     delete_option('shadow');
  354.     delete_option('interval');
  355.     delete_option('transition');
  356.     delete_option('bgcolour');
  357.     delete_option('transpeed');
  358.     delete_option('bwidth');
  359.     delete_option('bcolour');
  360.     delete_option('preload');
  361.     delete_option('start');
  362.     delete_option('buttons');
  363.     delete_option('source');
  364.     delete_option('featcat');
  365.     delete_option('featpost');
  366.     delete_option('padbottom');
  367.     delete_option('padleft');
  368.     delete_option('shadowstyle');
  369.     delete_option('paginationon');
  370.     delete_option('paginationoff');
  371.     delete_option('next');
  372.     delete_option('prev');
  373.     delete_option('pageposition');
  374.     delete_option('pageside');
  375. }
  376.  
  377. register_activation_hook(__FILE__,'set_easing_options');
  378. register_deactivation_hook(__FILE__,'unset_easing_options');
  379.  
  380. function admin_easing() {
  381.  
  382.     $sImg1 = get_option('sImg1');
  383.     $sImg2 = get_option('sImg2');
  384.     $sImg3 = get_option('sImg3');
  385.     $sImg4 = get_option('sImg4');
  386.     $sImg5 = get_option('sImg5');
  387.     $sImg6 = get_option('sImg6');
  388.     $sImg7 = get_option('sImg7');
  389.     $sImg8 = get_option('sImg8');
  390.     $sImg9 = get_option('sImg9');
  391.     $sImg10 = get_option('sImg10');
  392.     $sPagination = get_option('sPagination');
  393.     $activation = get_option('activation');
  394.     $width = get_option('width');
  395.     $height = get_option('height');
  396.     $shadow = get_option('shadow');
  397.     $interval = get_option('interval');
  398.     $transition = get_option('transition');
  399.     $bgcolour = get_option('bgcolour');
  400.     $transpeed = get_option('transpeed');
  401.     $bwidth = get_option('bwidth');
  402.     $bcolour = get_option('bcolour');
  403.     $preload = get_option('preload');
  404.     $start = get_option('start');
  405.     $buttons = get_option('buttons');
  406.     $source = get_option('source');
  407.     $featcat = get_option('featcat');
  408.     $featpost = get_option('featpost');
  409.     $padbottom = get_option('padbottom');
  410.     $padleft = get_option('padleft');
  411.     $shadowstyle = get_option('shadowstyle');
  412.     $paginationon = get_option('paginationon');
  413.     $paginationoff = get_option('paginationoff');
  414.     $next = get_option('next');
  415.     $prev = get_option('prev');
  416.     $pageposition = get_option('pageposition');
  417.     $pageside = get_option('pageside');
  418.  
  419. if ('process' == $_POST['options']) {
  420.     update_option('sImg1',$_REQUEST['sImg1']);
  421.     update_option('sImg2',$_REQUEST['sImg2']);
  422.     update_option('sImg3',$_REQUEST['sImg3']);
  423.     update_option('sImg4',$_REQUEST['sImg4']);
  424.     update_option('sImg5',$_REQUEST['sImg5']);
  425.     update_option('sImg6',$_REQUEST['sImg6']);
  426.     update_option('sImg7',$_REQUEST['sImg7']);
  427.     update_option('sImg8',$_REQUEST['sImg8']);
  428.     update_option('sImg9',$_REQUEST['sImg9']);
  429.     update_option('sImg10',$_REQUEST['sImg10']);
  430.     update_option('sPagination',$_REQUEST['sPagination']);
  431.     update_option('activation',$_REQUEST['activation']);
  432.     update_option('width',$_REQUEST['width']);
  433.     update_option('height',$_REQUEST['height']);
  434.     update_option('shadow',$_REQUEST['shadow']);
  435.     update_option('interval',$_REQUEST['interval']);
  436.     update_option('transition',$_REQUEST['transition']);
  437.     update_option('bgcolour',$_REQUEST['bgcolour']);
  438.     update_option('transpeed',$_REQUEST['transpeed']);
  439.     update_option('bwidth',$_REQUEST['bwidth']);
  440.     update_option('bcolour',$_REQUEST['bcolour']);
  441.     update_option('preload',$_REQUEST['preload']);
  442.     update_option('start',$_REQUEST['start']);
  443.     update_option('buttons',$_REQUEST['buttons']);
  444.     update_option('source',$_REQUEST['source']);
  445.     update_option('featcat',$_REQUEST['featcat']);
  446.     update_option('featpost',$_REQUEST['featpost']);
  447.     update_option('padbottom',$_REQUEST['padbottom']);
  448.     update_option('padleft',$_REQUEST['padleft']);
  449.     update_option('shadowstyle',$_REQUEST['shadowstyle']);
  450.     update_option('paginationon',$_REQUEST['paginationon']);
  451.     update_option('paginationoff',$_REQUEST['paginationoff']);
  452.     update_option('next',$_REQUEST['next']);
  453.     update_option('prev',$_REQUEST['prev']);
  454.     update_option('pageposition',$_REQUEST['pageposition']);
  455.     update_option('pageside',$_REQUEST['pageside']);
  456.     $sImg1 = get_option('sImg1');
  457.     $sImg2 = get_option('sImg2');
  458.     $sImg3 = get_option('sImg3');
  459.     $sImg4 = get_option('sImg4');
  460.     $sImg5 = get_option('sImg5');
  461.     $sImg6 = get_option('sImg6');
  462.     $sImg7 = get_option('sImg7');
  463.     $sImg8 = get_option('sImg8');
  464.     $sImg9 = get_option('sImg9');
  465.     $sImg10 = get_option('sImg10');
  466.     $sPagination = get_option('sPagination');
  467.     $activation = get_option('activation');
  468.     $width = get_option('width');
  469.     $height = get_option('height');
  470.     $shadow = get_option('shadow');
  471.     $interval = get_option('interval');
  472.     $transition = get_option('transition');
  473.     $bgcolour = get_option('bgcolour');
  474.     $transpeed = get_option('transpeed');
  475.     $bwidth = get_option('bwidth');
  476.     $bcolour = get_option('bcolour');
  477.     $preload = get_option('preload');
  478.     $start = get_option('start');
  479.     $buttons = get_option('buttons');
  480.     $source = get_option('source');
  481.     $featcat = get_option('featcat');
  482.     $featpost = get_option('featpost');
  483.     $padbottom = get_option('padbottom');
  484.     $padleft = get_option('padleft');
  485.     $shadowstyle = get_option('shadowstyle');
  486.     $paginationon = get_option('paginationon');
  487.     $paginationoff = get_option('paginationoff');
  488.     $next = get_option('next');
  489.     $prev = get_option('prev');
  490.     $pageposition = get_option('pageposition');
  491.     $pageside = get_option('pageside');
  492. }
  493.  
  494.  
  495.     ?><div class="wrap"><h2>Easing Slider</h2>
  496.  
  497.     <?php if ( $_REQUEST['submit'] ) echo '<div id="message" class="updated" style="width:750px;"><p><strong>Slider Options Updated.</strong></p></div>'; ?>
  498.  
  499.  
  500.     <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>&updated=true">
  501.         <input type="hidden" name="options" value="process" />
  502.  
  503. <?php
  504.  
  505.     print_easing_form();
  506.  
  507.     ?></div><?php
  508. }
  509.  
  510.  
  511. function modify_menu() {
  512.     add_menu_page(
  513.     'Easing Slider',
  514.     'Easing Slider',
  515.     'administrator',
  516.     'easing-slider/easingslider.php',
  517.     'admin_easing'
  518.     );
  519.    
  520. }
  521.  
  522. add_action('admin_menu','modify_menu');
  523.  
  524. function print_easing_form() {
  525.     $sImg1 = get_option('sImg1');
  526.     $sImg2 = get_option('sImg2');
  527.     $sImg3 = get_option('sImg3');
  528.     $sImg4 = get_option('sImg4');
  529.     $sImg5 = get_option('sImg5');
  530.     $sImg6 = get_option('sImg6');
  531.     $sImg7 = get_option('sImg7');
  532.     $sImg8 = get_option('sImg8');
  533.     $sImg9 = get_option('sImg9');
  534.     $sImg10 = get_option('sImg10');
  535.     $sPagination = get_option('sPagination');
  536.     $activation = get_option('activation');
  537.     $width = get_option('width');
  538.     $height = get_option('height');
  539.     $shadow = get_option('shadow');
  540.     $interval = get_option('interval');
  541.     $transition = get_option('transition');
  542.     $bgcolour = get_option('bgcolour');
  543.     $transpeed = get_option('transpeed');
  544.     $bwidth = get_option('bwidth');
  545.     $bcolour = get_option('bcolour');
  546.     $preload = get_option('preload');
  547.     $start = get_option('start');
  548.     $buttons = get_option('buttons');
  549.     $source = get_option('source');
  550.     $featcat = get_option('featcat');
  551.     $featpost = get_option('featpost');
  552.     $padbottom = get_option('padbottom');
  553.     $padleft = get_option('padleft');
  554.     $shadowstyle = get_option('shadowstyle');
  555.     $paginationon = get_option('paginationon');
  556.     $paginationoff = get_option('paginationoff');
  557.     $next = get_option('next');
  558.     $prev = get_option('prev');
  559.     $pageposition = get_option('pageposition');
  560.     $pageside = get_option('pageside');
  561.    
  562.    
  563.     ?>
  564.     <div id="content-explorer">
  565.     <ul class="yui-nav">
  566.         <li class="selected"><a href="#">Custom Images</a></li>
  567.         <li><a href="#">Slider Settings</a></li>
  568.         <li><a href="#">Plugin Settings</a></li>
  569.     </ul>
  570.    
  571.     <div class="metabox-holder" style="width:810px;">
  572.   <input id="upload_image_button" type="button" value="Upload Image" />
  573.     <input type="submit" class="button-primary" name="submit" value="Save Changes" style="" />
  574.     <div style="display:inline;font-style:italic;font-size:11px;padding-left:10px;"><b>Important:</b> Click 'save changes' after every image you 'insert into post'. </div>
  575.     </div>
  576.        
  577. <div class="yui-content">
  578.  
  579.   <div><!-- first div for content tabs -->
  580.   <?php if($source!='custom') echo '<div id="message" style="padding:10px;margin:10px 0;border:1px solid #e6db55;background:#ffffe0;width:790px;"><strong>Custom Images are currently not enabled. To use them, change "Get Images From?" to "Custom Images" under the "Plugin Settings" tab.</strong></div>'; ?>
  581.     <div class="metabox-holder" style="width:402px;float:left;"><div class="postbox"><h3><span>Image #1 link:</span></h3>
  582.     <?php if($sImg1) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg1.'" style="margin:0 10px;width:380px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(empty($sImg1)) echo 'id="upload_image"'; ?> name="sImg1" value="<?php echo stripslashes($sImg1); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/></div>
  583.    
  584.         <div class="postbox"><h3><span>Image #2 link:</span></h3>
  585.         <?php if($sImg2) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg2.'" style="width:380px;margin:0 10px;"  />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&empty($sImg2)) echo 'id="upload_image"'; ?> name="sImg2" value="<?php echo stripslashes($sImg2); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div>
  586.    
  587.         <div class="postbox"><h3><span>Image #3 link:</span></h3>
  588.         <?php if($sImg3) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg3.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&empty($sImg3)) echo 'id="upload_image"'; ?> id="sImg3" name="sImg3" value="<?php echo stripslashes($sImg3); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div>
  589.    
  590.         <div class="postbox"><h3><span>Image #4 link:</span></h3>
  591.         <?php if($sImg4) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg4.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&empty($sImg4)) echo 'id="upload_image"'; ?> name="sImg4" value="<?php echo stripslashes($sImg4); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div>
  592.  
  593.         <div class="postbox"><h3><span>Image #5 link:</span></h3>
  594.         <?php if($sImg5) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg5.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&empty($sImg5)) echo 'id="upload_image"'; ?> name="sImg5" value="<?php echo stripslashes($sImg5); ?>" style="width: 380px;margin:10px;margin-top:0px;" /></div></div>
  595.  
  596.         <div class="metabox-holder" style="width:402px;float:left;margin-left:10px;"><div class="postbox"><h3><span>Image #6 link:</span></h3>
  597.         <?php if($sImg6) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg6.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&empty($sImg6)) echo 'id="upload_image"'; ?> name="sImg6" value="<?php echo stripslashes($sImg6); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div>
  598.  
  599.         <div class="postbox"><h3><span>Image #7 link:</span></h3>
  600.         <?php if($sImg7) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg7.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&empty($sImg7)) echo 'id="upload_image"'; ?> name="sImg7" value="<?php echo stripslashes($sImg7); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div>
  601.  
  602.         <div class="postbox"><h3><span>Image #8 link:</span></h3>
  603.         <?php if($sImg8) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg8.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&isset($sImg7)&empty($sImg8)) echo 'id="upload_image"'; ?> name="sImg8" value="<?php echo stripslashes($sImg8); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div>
  604.  
  605.         <div class="postbox"><h3><span>Image #9 link:</span></h3>
  606.         <?php if($sImg9) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg9.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&isset($sImg7)&isset($sImg8)&empty($sImg9)) echo 'id="upload_image"'; ?> name="sImg9" value="<?php echo stripslashes($sImg9); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div>
  607.    
  608.         <div class="postbox"><h3><span>Image #10 link:</span></h3>
  609.         <?php if($sImg10) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg10.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&isset($sImg7)&isset($sImg8)&isset($sImg9)&empty($sImg10)) echo 'id="upload_image"'; ?> name="sImg10" value="<?php echo stripslashes($sImg10); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" /></div></div>
  610.        
  611.     </div>
  612.     <div><!-- second div for content tabs -->
  613.        
  614.     <div class="metabox-holder" style="width: 815px;">
  615.     <div class="postbox">
  616.  
  617.         <table class="form-table" style="margin:0;">
  618.         <tr valign="top"><td style="padding:0;width:180px;"><h3>Name</h3></td><td style="padding:0;width:130px;"><h3>Value</h3></td><td style="padding:0;"><h3>Description</h3></td></tr>
  619.  
  620.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="shadow" style="padding:10px;font-weight:bold;">disableShadow</label></td>
  621.         <td style="padding:5px 0;margin-left:5px;"><input type="checkbox" name="shadow" <?php if (get_option('shadow')) echo "checked='checked'"; ?>/>Disable</td>
  622.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Disable the shadow beneath the slider.</p></td></tr>
  623.        
  624.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="shadowtype" style="padding:10px;font-weight:bold;">shadowStyle:
  625.         <td style="padding:5px 0;margin-left:5px;"><select name="shadowstyle" style="width:110px;">
  626.             <option style="padding-right:10px;" value="arc" <?php selected('arc', get_option('shadowstyle')); ?>>Arc</option>
  627.             <option style="padding-right:10px;" value="large" <?php selected('large', get_option('shadowstyle')); ?>>Large</option>
  628.             <option style="padding-right:10px;" value="small" <?php selected('small', get_option('shadowstyle')); ?>>Small</option>
  629.         </select></td>
  630.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Choose between three different types of shadow beneath the slider.</p></td></tr>
  631.  
  632.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="buttons" style="padding:10px;font-weight:bold;">next/prevButtons</td></label>
  633.         <td style="padding:5px 0;margin-left:5px;"><input type="checkbox" name="buttons" <?php if (get_option('buttons')) echo "checked='checked'"; ?>/>Enable</td>
  634.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Enable the "next" and "previous" buttons. By default these are disabled.</p></td></tr>
  635.  
  636.     <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="next" style="padding:10px;font-weight:bold;">nextbuttonIcon</label></td>
  637.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="next" <?php if(empty($_REQUEST['buttons'])) {echo 'readonly="readonly"';}?> value="<?php echo ($next); ?>" style="width: 100px;" /><?php if($next!='') echo '<img src="'.$next.'" width="20px" style="position:relative;top:5px;padding-left:5px;" />';?></td>
  638.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">change the icon used for the 'next' button. If left blank, it will use the default image.</p></td></tr>
  639.    
  640.     <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="prev" style="padding:10px;font-weight:bold;">prevbuttonIcon</label></td>
  641.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="prev" <?php if(empty($_REQUEST['buttons'])) {echo 'readonly="readonly"';}?> value="<?php echo ($prev); ?>" style="width: 100px;" /><?php if($prev!='') echo '<img src="'.$prev.'" width="20px" style="position:relative;top:5px;padding-left:5px;" />';?></td>
  642.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Change the icon used for the 'prev' button. If left blank, it will use the default image.</p></td></tr>
  643.        
  644.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="width" style="padding:10px;font-weight:bold;">Slider "width"</label></td>
  645.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="width" value="<?php echo ($width); ?>" style="width: 50px;" />px</td>
  646.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Set the sliders width.</p></td></tr>
  647.  
  648.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="height" style="padding:10px;font-weight:bold;">Slider "height"</label></td>
  649.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="height" value="<?php echo ($height); ?>" style="width: 50px;" />px</td>
  650.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Set the sliders height.</p></td></tr>
  651.        
  652.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="padbottom" style="padding:10px;font-weight:bold;">paddingBottom</label></td>
  653.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="padbottom" value="<?php echo ($padbottom); ?>" style="width: 50px;" />px</td>
  654.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of padding to add to the bottom of the slider.</p></td></tr>
  655.  
  656.     <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="padleft" style="padding:10px;font-weight:bold;">paddingLeft</label></td>
  657.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="padleft" value="<?php echo ($padleft); ?>" style="width: 50px;" />px</td>
  658.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of padding to add to the left of the slider.</p></td></tr>
  659.        
  660.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="bgcolour" style="padding:10px;font-weight:bold;">backgroundColour:</label></td>
  661.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="bgcolour" value="<?php echo $bgcolour; ?>" style="width: 50px;" /></td>
  662.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Change the sliders background colour. When left blank it is set to white in order for the preloader to function correctly.</p></td></tr>
  663.  
  664.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="start" style="padding:10px;font-weight:bold;">startPosition:</label></td>
  665.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="start" value="<?php echo ($start); ?>" style="width: 50px;" /></td>
  666.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Number of the image that the slider will start with. Choose a number between one and ten.</p></td></tr>
  667.  
  668. <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="interval" style="padding:10px;font-weight:bold;">transitionSpeed:</label></td>
  669.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="interval" value="<?php echo $interval; ?>" style="width: 50px;" /></td>
  670.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of time it takes to transition one image to another.</p></td></tr>
  671.  
  672.  
  673.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="transpeed" style="padding:10px;font-weight:bold;">autoPlay:</label></td>
  674.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="transpeed" value="<?php echo $transpeed; ?>" style="width: 50px;" /></td>
  675.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">The amount of time in milliseconds each image is displayed for.</p></td></tr>
  676.  
  677.     <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="transition" style="padding:10px;font-weight:bold;">animationStyle:
  678.         <td style="padding:5px 0;margin-left:5px;"><select name="transition" style="width:110px;">
  679.             <option style="padding-right:10px;" value="slide" <?php selected('slide', get_option('transition')); ?>>slide</option>
  680.             <option style="padding-right:10px;" value="smooth" <?php selected('smooth', get_option('transition')); ?>>smooth</option>
  681.             <option style="padding-right:10px;" value="fade" <?php selected('fade', get_option('transition')); ?>>fade</option>
  682.             <option style="padding-right:10px;" value="swipe" <?php selected('swipe', get_option('transition')); ?>>swipe</option>
  683.             <option style="padding-right:10px;" value="bounce" <?php selected('bounce', get_option('transition')); ?>>bounce</option>
  684.         </select></td>
  685.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Easing effect used to transition from each image. Choose from five different effect: slide, smooth, fade, swipe & bounce.</p></td></tr>
  686.  
  687.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="bwidth" style="padding:10px;font-weight:bold;">borderWidth:</label></td>
  688.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="bwidth" value="<?php echo $bwidth; ?>" style="width: 50px;" />px</td>
  689.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Width of the sliders surrounding border. Set to "0" for no border.</p></td></tr>
  690.  
  691. <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="bcolour" style="padding:10px;font-weight:bold;">borderColour:</label></td>
  692.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="bcolour" value="<?php echo $bcolour; ?>" style="width: 50px;" /></td>
  693.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Colour of the surrounding border.</p></td></tr>
  694.  
  695.     <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="preload" style="padding:10px;font-weight:bold;">preloadIcon:</label></td>
  696.         <td style="padding:5px 0;margin-left:5px;"><select name="preload" style="width:110px;">
  697.             <option style="padding-right:10px;" value="none" <?php selected('none', get_option('preload')); ?>>none</option>
  698.             <option style="padding-right:10px;" value="indicator" <?php selected('indicator', get_option('preload')); ?>>indicator</option>
  699.     <option style="padding-right:10px;" value="arrows" <?php selected('arrows', get_option('preload')); ?>>arrows</option>
  700.     <option style="padding-right:10px;" value="bar" <?php selected('bar', get_option('preload')); ?>>bar</option>
  701.     <option style="padding-right:10px;" value="bigflower" <?php selected('bigflower', get_option('preload')); ?>>bigflower</option>
  702.     <option style="padding-right:10px;" value="bounceball" <?php selected('bounceball', get_option('preload')); ?>>bounceball</option>
  703.     <option style="padding-right:10px;" value="indicatorlight" <?php selected('indicatorlight', get_option('preload')); ?>>indicatorlight</option>
  704.     <option style="padding-right:10px;" value="pik" <?php selected('pik', get_option('preload')); ?>>pik</option>
  705.     <option style="padding-right:10px;" value="snake" <?php selected('snake', get_option('preload')); ?>>snake</option>
  706.         </select></td>
  707.  
  708.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Animation displayed while slider is loading. Choose between eight different options or set to "none" for no image.</p></td></tr>
  709.  
  710.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="sPagination" style="padding:10px;font-weight:bold;">pagination:</label></td>
  711.         <td style="padding:5px 0;margin-left:5px;"><select name="sPagination" style="width:110px;">
  712.             <option style="padding-right:10px;" value="yes" <?php selected('yes', get_option('sPagination')); ?>>Yes</option>
  713.             <option style="padding-right:10px;" value="no" <?php selected('no', get_option('sPagination')); ?>>No</option>
  714.         </select></td>
  715.  
  716.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Icons acting as links for each individual image.</p></td></tr>
  717.        
  718.         <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="pageposition" style="padding:10px;font-weight:bold;">paginationPosition:</label></td>
  719.             <td style="padding:5px 0;margin-left:5px;"><select name="pageposition" style="width:110px;">
  720.             <option style="padding-right:10px;" value="outside" <?php selected('outside', get_option('pageposition')); ?>>Outside</option>
  721.             <option style="padding-right:10px;" value="inside" <?php selected('inside', get_option('pageposition')); ?>>Inside</option>
  722.         </select><br /><select name="pageside" style="width:110px;">
  723.             <option style="padding-right:10px;" value="left" <?php selected('left', get_option('pageside')); ?>>Left</option>
  724.             <option style="padding-right:10px;" value="right" <?php selected('right', get_option('pageside')); ?>>Right</option>
  725.         </select></td>
  726.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Choose whether the pagination will be displayed inside the slider or outside of it. Also select whether it will appear on the left or right.</p></td></tr>
  727.        
  728.        
  729.    
  730.     <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="paginationon" style="padding:10px;font-weight:bold;">paginationIcon (on):</label></td>
  731.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="paginationon" <?php if($sPagination=='no') echo 'readonly="readonly"';?> value="<?php echo $paginationon; ?>" style="width: 100px;" /><?php if($paginationon!='') echo '<img src="'.$paginationon.'" style="position:relative;top:5px;padding-left:5px;" />';?></td>
  732.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Insert the selected version here of your custom pagination icon here.</p></td></tr>
  733.        
  734.     <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="paginationoff" style="padding:10px;font-weight:bold;">paginationIcon (off):</label></td>
  735.             <td style="padding:5px 0;margin-left:5px;"><input type="text" name="paginationoff" <?php if($sPagination=='no') echo 'readonly="readonly"';?> value="<?php echo $paginationoff; ?>" style="width: 100px;" /><?php if($paginationoff!='') echo '<img src="'.$paginationoff.'" style="position:relative;top:5px;padding-left:5px;" />';?></td>
  736.         <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Use your own custom pagination icons. Insert the unselected version here.</p></td></tr>
  737.    
  738.         </table></div></div>
  739.   </div>
  740.     <div><!--third div for content tabs -->
  741.     <div class="metabox-holder" style="width:815px;">
  742.     <div class="postbox">
  743.     <table class="form-table" style="margin:0;">
  744.     <tr valign="top"><td style="padding:0;width:180px;"><h3>Name</h3></td><td style="padding:0;width:235px;"><h3>Value</h3></td><td style="padding:0;"><h3>Description</td></h3></tr>
  745.     <tr valign="top" style="border-bottom:1px solid #ccc;">
  746.     <td  style="padding:5px 0;">
  747.      <label for="activation" style="padding:10px;font-weight:bold;">Activate Plugin</label>
  748.   </td>
  749.   <td style="padding:5px 0;">
  750.             <?php if($activation == 'enable') { ?>
  751.             <input type="radio" checked="checked" value="enable" name="activation">Enable
  752.             <br />
  753.             <input type="radio" value="disable" name="activation">Disable
  754.             <?php } else { ?>
  755.             <input type="radio" value="enable" name="activation">Enable
  756.             <br />
  757.             <input type="radio" checked="checked" value="disable" name="activation">Disable
  758.             <?php } ?>
  759.     </td>
  760.     <td  style="margin:5px 0;">
  761.     <p style="margin:0;font-style:italic;font-size:11px;">
  762.     Enable or disable the slider.
  763.     </p>
  764.     </td>
  765.     </tr>
  766.            
  767.             <tr valign="top" style="border-bottom:1px solid #ccc;">
  768.             <td  style="padding:5px 0;">
  769.         <label for="source" style="padding:10px;font-weight:bold;">Get Images From?</label>
  770.       </td>
  771.       <td  style="padding:5px 0;">
  772.         <select name="source" style="width:235px;">
  773.           <option value="featured" <?php selected('featured', get_option('source')); ?>>Custom Fields (Selected Category)</option>
  774.           <option value="all" <?php selected('all', get_option('source')); ?>>Custom Fields (All Categories)</option>
  775.           <option value="custom" <?php selected('custom', get_option('source')); ?>>Custom Images</option>
  776.         </select>
  777.       </td>
  778.       <td  style="padding:5px 0;">
  779.       <p style="margin:0 10px;font-style:italic;font-size:11px;">
  780.       Here you can select the source from which the images are displayed. </p><p style="margin:10px;font-style:italic;font-size:11px;">Select 'Custom Fields' if you wish to get the images from custom fields. To do so, enter 'easing' under name field & and the URL of the chosen image under the value field. </p><p style="margin:10px;font-style:italic;font-size:11px;"> Otherwise, you can choose to display 'custom' images. These images can be uploaded in the 'Custom Images' section where you can specify links to images from the Media Library or elsewhere. </p><p style="margin:10px;font-style:italic;font-size:11px;">By default, this option is set to 'Custom Fields (Selected Category)'.
  781.       </p>
  782.       </td>
  783.       </tr>
  784.      
  785.       <tr valign="top" style="border-bottom:1px solid #ccc;">
  786.       <td  style="padding:5px 0;">
  787.         <label for="featcat" style="padding:10px;font-weight:bold;">Selected Category:</label>
  788.       <td  style="padding:5px 0;"><style type="text/css">.cat_select{width:235px;};</style>
  789.         <?php wp_dropdown_categories(array('hide_empty' => 0, 'class' => 'cat_select', 'name' => 'featcat', 'orderby' => 'name', 'selected' => get_option('featcat'), 'hierarchical' => true,));?>
  790.       </td>
  791.       <td style="padding:5px 0;">
  792.       <p style="margin:10px;margin-top:0;font-style:italic;font-size:11px;">
  793.       Here you can select which categorie's post thumbnails you wish to display if you have selected the 'Post thumbnails (Selected Category)' option above.
  794.       </p>
  795.       </tr>
  796.      
  797.       <tr valign="top">
  798.       <td  style="padding:5px 0;">
  799.         <label for="featpost" style="padding:10px;font-weight:bold;">Number of Posts:</label>
  800.       </td>
  801.       <td  style="padding:5px 0;"">
  802.           <input type="text" id="test" style="width:50px;" name="featpost" value="<?php echo $featpost; ?>" <?php if($source=='custom') echo 'readonly="readonly"'; ?> />
  803.       </td>
  804.       <td style="padding:5px 0;">
  805.       <p style="margin:0 10px;font-style:italic;font-size:11px;">
  806.       Number of post thumbnails to be displayed in the slider. No matter how high you set it, the slider will display a maximum of 10 images. </p></tr>
  807.       </table>
  808.       </div></div></div>
  809.       </div><!-- #yui-content -->
  810.       </div><!-- #content-explorer -->
  811.    
  812.         </form>
  813.  
  814. <script type="text/javascript">
  815.     var myTabs = new YAHOO.widget.TabView("content-explorer");
  816.     </script>
  817. <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement