Example #1
0
    public static function display()
    {
        $options = photospace_plugin_options::PS_getOptions();
        ?>
		
		<div id="photospace_admin" class="wrap">
		
			<h2>Photospace Options</h2>
			
			<form method="post" action="#" enctype="multipart/form-data">				
				
				<div class="wp-menu-separator" style="clear:both; padding-bottom:15px; border-bottom:solid 1px #e6e6e6" ></div>
				
				<p><label><input name="show_download" type="checkbox" value="checkbox" <?php 
        if ($options['show_download']) {
            echo "checked='checked'";
        }
        ?>
 /> Show download link</label></p>			
				
				<p><label><input name="show_controls" type="checkbox" value="checkbox" <?php 
        if ($options['show_controls']) {
            echo "checked='checked'";
        }
        ?>
 /> Show controls</label></p>			
				
				<p><label><input name="use_paging" type="checkbox" value="checkbox" <?php 
        if ($options['use_paging']) {
            echo "checked='checked'";
        }
        ?>
 /> Use paging </label></p>			
				
				<p><label><input name="enable_history" type="checkbox" value="checkbox" <?php 
        if ($options['enable_history']) {
            echo "checked='checked'";
        }
        ?>
 /> Enable history </label></p>			
				
				
				<p><label><input name="show_captions" type="checkbox" value="checkbox" <?php 
        if ($options['show_captions']) {
            echo "checked='checked'";
        }
        ?>
 /> Show Title / Caption / Desc under image</label></p>
				
				<p><label><input name="reset_css" type="checkbox" value="checkbox" <?php 
        if ($options['reset_css']) {
            echo "checked='checked'";
        }
        ?>
 /> Try to clear current theme image css / formatting</label></p>


				<p><label><input name="show_bg" type="checkbox" value="checkbox" <?php 
        if ($options['show_bg']) {
            echo "checked='checked'";
        }
        ?>
 /> Show background colours for layout testing</label></p>
				
				
				
				<div class="ps_border" ></div>
				
				<div class="fl_box">		
					<p><label><input name="auto_play" type="checkbox" value="checkbox" <?php 
        if ($options['auto_play']) {
            echo "checked='checked'";
        }
        ?>
 /> Auto play slide show</label></p>
				</div>
				<div class="fl_box">		
					<p><label><input name="hide_thumbs" type="checkbox" value="checkbox" <?php 
        if ($options['hide_thumbs']) {
            echo "checked='checked'";
        }
        ?>
 /> Hide thumbnails</label></p>
				</div>

				
				<div class="fl_box">		
					<p>Slide delay in milliseconds</p>
					<p><input type="text" name="delay" value="<?php 
        echo $options['delay'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">		
					<p>Page button size</p>
					<p><input type="text" name="button_size" value="<?php 
        echo $options['button_size'];
        ?>
" /></p>
				</div>		 			


				
				<div style="clear:both; padding-bottom:15px; border-bottom:solid 1px #e6e6e6" ></div>
				
				<h3 style="font-style:italic; font-weight:normal; color:grey " >Images that are already on the server will not change size until you regenerate the thumbnails. Use <a title="http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/" href="http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/">AJAX thumbnail rebuild</a> or <a title="http://wordpress.org/extend/plugins/regenerate-thumbnails/" href="http://wordpress.org/extend/plugins/regenerate-thumbnails/">Regenerate Thumbnails</a> </h3>

				<div class="fl_box">				
					<p>Thumbnail Width</p>
					<p><input type="text" name="thumbnail_width" value="<?php 
        echo $options['thumbnail_width'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">				
					<p>Thumbnail Height</p>
					<p><input type="text" name="thumbnail_height" value="<?php 
        echo $options['thumbnail_height'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">
					<p>Main image width</p>
					<p><input type="text" name="main_col_width" value="<?php 
        echo $options['main_col_width'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">
					<p>Main image height</p>
					<p><input type="text" name="main_col_height" value="<?php 
        echo $options['main_col_height'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">
					<p>Crop thumnails</p>
					<p><label><input name="thumbnail_crop" type="checkbox" value="checkbox" <?php 
        if ($options['thumbnail_crop']) {
            echo "checked='checked'";
        }
        ?>
 /></label></p>

				</div>				

				<div style="clear:both; padding-bottom:15px; border-bottom:solid 1px #e6e6e6" ></div>
				
				<div class="fl_box">		
					<p>Number of thumbnails</p>
					<p><input type="text" name="num_thumb" value="<?php 
        echo $options['num_thumb'];
        ?>
" /></p>
				</div>
					
				
				<div class="fl_box">				
					<p>Thumbnail column width</p>
					<p><input type="text" name="thumb_col_width" value="<?php 
        echo $options['thumb_col_width'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">				
					<p>Thumbnail margin</p>
					<p><input type="text" name="thumbnail_margin" value="<?php 
        echo $options['thumbnail_margin'];
        ?>
" /></p>
				</div>
				
				
				<div style="clear:both; padding-bottom:15px; border-bottom:solid 1px #e6e6e6" ></div>
				
				
				
				<h3>Gallery width (at least Thumbnail column + Main image width)</h3>
				<p><input type="text" name="gallery_width" value="<?php 
        echo $options['gallery_width'];
        ?>
" /></p>
				<br />
				
				<div style="clear:both; padding-bottom:15px; border-bottom:solid 1px #e6e6e6" ></div>
				
								
				<div class="fl_box">
					<p>Play text</p>				
					<p><input type="text" name="play_text" value="<?php 
        echo $options['play_text'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">
					<p>Pause text</p>					
					<p><input type="text" name="pause_text" value="<?php 
        echo $options['pause_text'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">				
					<p>Previous text</p>	
					<p><input type="text" name="previous_text" value="<?php 
        echo $options['previous_text'];
        ?>
" /></p>
				</div>

				<div class="fl_box">				
					<p>Next text</p>	
					<p><input type="text" name="next_text" value="<?php 
        echo $options['next_text'];
        ?>
" /></p>
				</div>
				
				<div class="fl_box">				
					<p>Download link text</p>	
					<p><input type="text" name="download_text" value="<?php 
        echo $options['download_text'];
        ?>
" /></p>
				</div>

				<div style="clear:both; padding-bottom:15px; border-bottom:solid 1px #e6e6e6" ></div>

			
				<p><input class="button-primary" type="submit" name="ps_save" value="Save Changes" /></p>
			
			</form>
	
		</div>
		
		<?php 
    }
Example #2
0
    public static function display()
    {
        $options = photospace_plugin_options::PS_getOptions();
        ?>

		<div id="photospace_admin" class="wrap">

			<h2>Gallery Settings</h2>

			<form method="post" action="#" enctype="multipart/form-data">

				<table class="form-table">
					<tbody>
						<tr>
							<th>Formatting</th>
							<td>
								<fieldset>
									<legend class="screen-reader-text">
										<span>Formatting</span>
									</legend>
									<label for="enable_history">
										<input name="enable_history" id="enable_history" type="checkbox" value="checkbox" <?php 
        if ($options['enable_history']) {
            echo "checked='checked'";
        }
        ?>
 /> Enable history
									</label>
									<br>
									<label for="show_captions">
										<input name="show_captions" id="show_captions" type="checkbox" value="checkbox" <?php 
        if ($options['show_captions']) {
            echo "checked='checked'";
        }
        ?>
 /> Show title / caption / description
									</label>
									<br>
									<label for="show_play">
										<input name="show_play" id="show_play" type="checkbox" value="checkbox" <?php 
        if ($options['show_play']) {
            echo "checked='checked'";
        }
        ?>
 /> Show play / pause control
									</label>
									<br>
									<label for="show_next_prev">
										<input name="show_next_prev" id="show_next_prev" type="checkbox" value="checkbox" <?php 
        if ($options['show_next_prev']) {
            echo "checked='checked'";
        }
        ?>
 /> Show next / previous controls
									</label>
									<br>
									<label for="auto_play">
										<input name="auto_play" id="auto_play" type="checkbox" value="checkbox" <?php 
        if ($options['auto_play']) {
            echo "checked='checked'";
        }
        ?>
 /> Auto play slide show
									</label>
								</fieldset>
							</td>
						</tr>
						<tr>
							<th>
								<label for="delay">Slide delay (in ms)</label>
							</th>
							<td>
								<input name="delay" id="delay" type="number" value="<?php 
        echo $options['delay'];
        ?>
" />
							</td>
						</tr>
						<tr>
							<th>
								<label for="transition_speed">Transition Speed (in ms)</label>
							</th>
							<td>
								<input name="transition_speed" id="transition_speed" type="number" value="<?php 
        echo $options['transition_speed'];
        ?>
" />
							</td>
						</tr>
					</tbody>
				</table>

				<h3 class="title">Image sizes</h3>

				<p>Images that are already on the server will not change size until you regenerate the thumbnails. Use <a title="http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/" href="http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/">AJAX thumbnail rebuild</a> or <a title="http://wordpress.org/extend/plugins/regenerate-thumbnails/" href="http://wordpress.org/extend/plugins/regenerate-thumbnails/">Regenerate Thumbnails</a></p>

				<table class="form-table">
					<tbody>
						<tr>
							<th scope="row">Thumbnail size</th>
							<td>
								<label for="thumbnail_width">Width</label>
								<input name="thumbnail_width" id="thumbnail_width" type="number" value="<?php 
        echo $options['thumbnail_width'];
        ?>
" class="small-text" />
								<label for="thumbnail_height">Height</label>
								<input name="thumbnail_height" id="thumbnail_height" type="number" value="<?php 
        echo $options['thumbnail_height'];
        ?>
" class="small-text" />
								<br>
								<input name="thumbnail_crop" id="thumbnail_crop" type="checkbox" value="checkbox" <?php 
        if ($options['thumbnail_crop']) {
            echo "checked='checked'";
        }
        ?>
 />
								<label for="thumbnail_crop">Crop thumbnail to exact dimensions (normally thumbnails are proportional)</label>
							</td>
						</tr>
						<tr>
							<th scope="row">Medium size</th>
							<td>
								<label for="medium_width">Width</label>
								<input name="medium_width" id="medium_width" type="number" value="<?php 
        echo $options['medium_width'];
        ?>
" class="small-text" />
								<label for="medium_height">Height</label>
								<input name="medium_height" id="medium_height" type="number" value="<?php 
        echo $options['medium_height'];
        ?>
" class="small-text" />
								<br>
								<input name="medium_crop" id="medium_crop" type="checkbox" value="checkbox" <?php 
        if ($options['medium_crop']) {
            echo "checked='checked'";
        }
        ?>
 />
								<label for="medium_crop">Crop medium images to exact dimensions (normally medium images are proportional)</label>
							</td>
						</tr>
						<tr>
							<th scope="row">Large size</th>
							<td>
								<fieldset>
									<legend class="screen-reader-text">
										<span>Large size</span>
									</legend>
									<label for="main_col_width">Max Width</label>
									<input name="main_col_width" id="main_col_width" type="number" value="<?php 
        echo $options['main_col_width'];
        ?>
" class="small-text" />
									<label for="main_col_height">Max Height</label>
									<input name="main_col_height" id="main_col_height" type="number" value="<?php 
        echo $options['main_col_height'];
        ?>
" class="small-text" />
								</fieldset>
							</td>
						</tr>
					</tbody>
				</table>

				<h3 class="title">Thumbnails</h3>

				<table class="form-table">
					<tbody>
						<tr>
							<th>
								<label for="num_thumb">Number of thumbnails</label>
							</th>
							<td>
								<input name="num_thumb" id="num_thumb" type="number" value="<?php 
        echo $options['num_thumb'];
        ?>
" />
							</td>
						</tr>
						<tr>
							<th>
								<label for="thumb_col_width">Thumbnail column width</label>
							</th>
							<td>
								<input name="thumb_col_width" id="thumb_col_width" type="number" value="<?php 
        echo $options['thumb_col_width'];
        ?>
" />
							</td>
						</tr>
						<tr>
							<th>
								<label for="thumbnail_margin">Thumbnail margin</label>
							</th>
							<td>
								<input name="thumbnail_margin" id="thumbnail_margin" type="number" value="<?php 
        echo $options['thumbnail_margin'];
        ?>
" />
							</td>
						</tr>
					</tbody>
				</table>

				<h3 class="title">Gallery</h3>

				<table class="form-table">
					<tbody>
						<tr>
							<th>
								<label for="gallery_width">Gallery width</label>
							</th>
							<td>
								<input name="gallery_width" id="gallery_width" type="number" value="<?php 
        echo $options['gallery_width'];
        ?>
" />
								<br>
								<p>(at least Thumbnail column + Main image width)</p>
							</td>
						</tr>
						<tr>
							<th>Fill to height</th>
							<td>
								<fieldset>
									<legend class="screen-reader-text">
										<span>Fill to height</span>
									</legend>
									<label for="gallery_height">
										<input name="gallery_height" id="gallery_height" type="checkbox" value="checkbox" <?php 
        if ($options['gallery_height']) {
            echo "checked='checked'";
        }
        ?>
 /> Allow the gallery images to fill browser height
									</label>
							</td>
						</tr>
					</tbody>
				</table>

				<h3 class="title">Slideshow controls</h3>

				<table class="form-table">
					<tbody>
						<tr>
							<th>
								<label for="play_text">Play text</label>
							</th>
							<td>
								<input name="play_text" id="play_text" type="text" value="<?php 
        echo $options['play_text'];
        ?>
" />
							</td>
						</tr>
						<tr>
							<th>
								<label for="pause_text">Pause text</label>
							</th>
							<td>
								<input name="pause_text" id="pause_text" type="text" value="<?php 
        echo $options['pause_text'];
        ?>
" />
							</td>
						</tr>
						<tr>
							<th>
								<label for="previous_text">Previous text</label>
							</th>
							<td>
								<input name="previous_text" id="previous_text" type="text" value="<?php 
        echo $options['previous_text'];
        ?>
" />
							</td>
						</tr>
						<tr>
							<th>
								<label for="next_text">Next text</label>
							</th>
							<td>
								<input name="next_text" id="next_text" type="text" value="<?php 
        echo $options['next_text'];
        ?>
" />
							</td>
						</tr>
					</tbody>
				</table>

				<p class="submit">
					<input type="submit" name="ps_save" id="submit" class="button-primary" value="Save Changes" />
				</p>

			</form>

		</div>

		<?php 
    }