function form($instance)
 {
     $id_base = 'widget-' . $this->id_base . '-' . $this->number . '-';
     $name_base = 'widget-' . $this->id_base . '[' . $this->number . ']';
     sns_form_widget_title($id_base, $name_base, $instance);
     $instance['size'] = 'widget';
     $instance['hide-size'] = true;
     sns_form_slider_settings($id_base, $name_base, $instance);
 }
Example #2
0
 function form($instance)
 {
     $id_base = 'widget-' . $this->id_base . '-' . $this->number . '-';
     $name_base = 'widget-' . $this->id_base . '[' . $this->number . ']';
     $instance['size'] = 'widget';
     $instance['hide-size'] = true;
     $nextgen = sns_get_nextgen_galleries();
     sns_form_widget_title($id_base, $name_base, $instance);
     sns_print_nextgen_gallery_form($id_base, $name_base, $instance, $nextgen);
     sns_form_slider_settings($id_base, $name_base, $instance);
 }
Example #3
0
    ?>
	
	    	<div class="tab tab_nextgen">       
	    		<p>Display a slider with images from a NextGen gallery</p>
	    	    <?php 
    sns_print_nextgen_gallery_form('nivo_', 'easy_nivo_slider_options', $options, $nivo_nextgen);
    ?>
	    	</div>
	    <?php 
}
?>
    
    </div>   <!-- nivo_settings_content -->	
    
	<?php 
sns_form_slider_settings('nivo_', 'easy_nivo_slider_options', $options);
?>
               
	<div align="center">	   
		<input type="submit" id="insert" name="insert" value="Insert" onClick="submit_mce_form();" />
		<input type="button" id="cancel" name="cancel" value="Cancel" onClick="tinyMCEPopup.close();" />
        </div>
             
	</form>
</body>
</html>
<?php 
// -----------------------
// EASY ECHO FUNCTION, BECAUSE THIS POPUP WINDOW DOESN'T RUN IN THE WORDPRESS SPACE
// -----------------------
function _e($txt)
Example #4
0
function easy_nivo_slider_settings_page()
{
    ?>


	<div class="wrap"> 
		<?php 
    screen_icon('tools');
    ?>
		<h2>Easy Nivo Slider Settings</h2>  
        
		<div id="poststuff" class="metabox-holder has-right-sidebar">
			
        
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
        <!-- ABOUT THE PLUGIN 																			-->
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
        <div id="side-info-column" class="inner-sidebar">
			<div class="meta-box-sortables"> 
				<div id="about" class="postbox ">  
			
					<div class="handlediv" title="<?php 
    _e('Click to toggle');
    ?>
"><br/></div>
					<h3 class="hndle" id="about-sidebar"><?php 
    _e('About the plugin');
    ?>
</h3>
					<div class="inside">
                       	<p>Easy Nivo Slider<br />Version: <?php 
    echo EASY_NIVO_SLIDER_VERSION;
    ?>
</p>
						<p>Visit the <a href="http://www.theemeraldcurtain.com/wordpress-plugin/easy-nivo-slider/">
                       	plugin homepage</a> for further information or to get the latest version.</p>

						<p>Feedback and <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QG7JF2QUHGF6A" target="_blank">donations</a> are welcome.</p>
                        <p><strong>Acknowledgements:</strong></p>
							
                        <p>This plugin would not be possible without 
                        <a href="http://nivo.dev7studios.com/" target="_blank">Nivo Slider</a>, 
                        the world's most awesome jQuery slider.  </p>
                            
                        <p>And it's vastly improved by the Filosofo 
                        <a href="http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/"
                        target="_blank">Custom Image Sizes</a> plugin, which is also completely awesome.</p>
                        
						<p><span style="float: right;">
						&copy; Copyright 2011 - <?php 
    echo date('Y');
    ?>
 
                        <a href="http://theemeraldcurtain.com">Phillip Bryan</a></p>
					</div> <!-- inside -->
				</div> <!-- about -->
			</div> <!-- meta-box-sortables -->
		</div> <!-- side-info-column -->
                       
		<!-- Start the settings form and set up the plugin options-->   
		<form method="post" action="options.php">
		<?php 
    settings_fields('easy_nivo_slider_group');
    ?>
		<?php 
    $options = get_option('easy_nivo_slider_options');
    ?>
     
   		<input id="nivo_settings_current_tab" name="easy_nivo_slider_options[nivo_settings_current_tab]" type="hidden" 
    	value="<?php 
    echo $options['nivo_settings_current_tab'];
    ?>
" />
		<!-- Start the settings form -->    
        
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
        <!-- NAVIGATION TABS 																			-->
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
        <div id="post-body" class="has-sidebar">
			<div id="post-body-content" class="has-sidebar-content">
				<div id="normal-sortables" class="meta-box-sortables">
                   	
        	        <ul id="nivo_settings_tab">
						<li class="tab_first"><a name="tab_first" href="#">First Slider</a></li>
						<li class="tab_second"><a name="tab_second" href="#">Second Slider</a></li>
						<li class="tab_widget"><a name="tab_widget" href="#">Widget Slider</a></li>
						<li class="tab_preview"><a name="tab_preview" href="#">Preview</a></li>
						<li class="tab_settings"><a name="tab_settings" href="#">Settings</a></li>
					</ul>           
            
					<div class="postbox">
						<div class="inside"> 
							<div id="nivo_settings_content">
                            
	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    <!-- TAB																						-->
	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
	<div class="tab tab_first">      
		<p>Add a Nivo Slider to a post or page by using the <span class="easy-nivo-slider-icon"></span> 
        button in the Visual editor.  The plugin will generate the <code>[nivo]</code> shortcode for 
        your choice of image selection, slider speed, and type of animation.</p>
        
        <p>There are three different configurations for slider size and behaviour.  This panel
        contains the settings for the <strong>First</strong> configuration.</p>
                
    	<?php 
    easy_nivo_slider_options_for_size('first');
    ?>
	</div> 
	
    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    <!-- TAB 																						-->
	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
	<div class="tab tab_second">     
        <p>This panel contains the settings for the <strong>Second</strong> slider configuration.</p></p>
    	<?php 
    easy_nivo_slider_options_for_size('second', false);
    ?>
    </div>
    
    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    <!-- TAB 																						-->
	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->		
    <div class="tab tab_widget">       
        <p>This panel contains the settings for slider widgets.</p>
    	<?php 
    easy_nivo_slider_options_for_size('widget', false);
    ?>
	</div>
    
   	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    <!-- TAB 																						-->
	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
	<div class="tab tab_preview"> 
                     
       	<?php 
    sns_form_image_selection('nivo_', 'easy_nivo_slider_options', $options);
    ?>
                         
       	<?php 
    sns_form_slider_settings('nivo_', 'easy_nivo_slider_options', $options);
    ?>

        <fieldset class="nivo-slider-fieldset">          
			<input type="submit" class="button-primary" value="Save Settings and Preview Slider" />
        
    	    <p>Here is how the slider will appear. A gray border has been added to show the exact size 
           	of the slider.</p>
        
	        <p>The <strong><?php 
    echo ucwords($options['size']);
    ?>
</strong> slider has the size 
			<?php 
    echo $options[$options['size'] . '_width'];
    ?>
px by 
			<?php 
    echo $options[$options['size'] . '_height'];
    ?>
px.</p>

	        <?php 
    easy_nivo_slider_for_featured_images($options);
    ?>
        </fieldset>		                                    
	</div>	
                      
    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    <!-- TAB 																						-->
	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
	<div class="tab tab_settings"> 
                     
        <fieldset class="nivo-slider-fieldset">
        	<legend>Plugin Settings</legend>     
                            
			<p><input name="easy_nivo_slider_options[activate_nextgen]" type="checkbox" value="true" 
			<?php 
    checked('true', $options['activate_nextgen']);
    ?>
  /> Activate NextGen sliders. 
            If checked, you'll be able to create Nivo sliders from your NextGen galleries.
            
            Tested with version <?php 
    echo EASY_NIVO_SLIDER_NEXTGEN_VERSION;
    ?>
 of NextGen.</p>

			<p><input name="easy_nivo_slider_options[debug]" type="checkbox" value="true" 
			<?php 
    checked('true', $options['debug']);
    ?>
  /> Activate Debug mode.  Hopefully you won't need it.</p>                                                                           
   			<p><input name="easy_nivo_slider_options[load_nivo]" type="checkbox" value="true" 
			<?php 
    checked('true', $options['load_nivo']);
    ?>
  /> Load Nivo Slider. By default, this plugin loads
            version <?php 
    echo EASY_NIVO_SLIDER_NIVO_VERSION;
    ?>
 of Nivo Slider.  
            Leave this checked unless Nivo is installed separately.</p>
                            
			<p><input name="easy_nivo_slider_options[load_cis]" type="checkbox" value="true" 
			<?php 
    checked('true', $options['load_cis']);
    ?>
  /> Load Custom Image Sizes plugin.  By default, this plugin
            loads version <?php 
    echo EASY_NIVO_SLIDER_CUSTOM_IMAGE_SIZES_VERSION;
    ?>
 of Custom Image Sizes. 
            Live this checked unless the plugin is installed separately.</p>                                                     
			<p><input name="easy_nivo_slider_options[uninstall]" type="checkbox" value="true" 
			<?php 
    checked('true', $options['uninstall']);
    ?>
  /> Uninstall the plugin when deactivated.  
            This will delete the options set by the plugin.</p>
                            
			<p><input type="submit" class="button-primary" value="Save Settings" /></p>
        
        </fieldset> 	                                    
	</div>	
        

	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    <!-- TAB 																						-->
	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
                            
			                            
							</div> <!-- nivo_settings_content -->
						</div> <!-- inside -->
					</div> <!-- about -->
                    
				</div> <!-- normalx-sortables -->
			</div> <!-- post-body-content -->
		</div> <!-- post-body -->
                           
        
           
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
        <!-- CLOSE EVERYTHING DOWN, WHEW																-->
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

		<!-- Close the settings form -->          
		</form>       

		</div> <!-- poststuff -->
	</div> <!-- wrap -->   

<?php 
}