Advertisement
Guest User

WP_Alchemy Metabox Template for Media Uploader

a guest
Feb 1st, 2011
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.18 KB | None | 0 0
  1. <div class="my_meta_control">
  2.    
  3.     <p id="js-warning"><?php _e('This might not function properly without javascript enabled. At the very least it will not look as cool.')?></p>
  4.    
  5.    
  6.         <label><?php _e('Add Custom Slides');?></label>
  7.  
  8.     <a style="float:right; margin:0 10px;" href="#" class="dodelete-slides button"><?php _e('Remove All');?></a>
  9.  
  10.     <p><?php _e('Add custom slides to the slider by uploading a picture and defining optional slide title and slide content text.  Add new slides by using the "Add Slide" button.');?></p>
  11.  
  12.     <?php while($mb->have_fields_and_multi('slides')): ?>
  13.     <?php $mb->the_group_open(); ?>
  14.      
  15.         <h4 class="slide"><?php if ($mb->get_the_value('slide_title')) { _e('Custom Slide: ') . $mb->the_value('slide_title');} else {_e('Custom Slide');} ?></h4>
  16.         <a href="#" class="dodelete button"><?php _e('Remove Slide');?></a>
  17.        
  18.       <div class="slide_preview">
  19.         <?php $mb->the_field('slide_image'); ?>
  20.         <img src="<?php if($mb->get_the_value()){$mb->the_value();}else { echo FUNCTIONS . '/WPAlchemy/default_preview.png';}?>" alt="<?php $mb->the_name();?> Preview" />
  21.         <input type="hidden" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  22.         <button class="upload_image_button button" type="button"><?php _e('Upload Image');?></button>
  23.        
  24.       </div>
  25.      
  26.       <div class="slide_text">
  27.  
  28.         <?php $mb->the_field('slide_title'); ?>
  29.         <label><?php _e('Slide Title');?></label>
  30.         <input type="text" size="100" class="slide_title" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  31.        
  32.         <?php $mb->the_field('slide_text'); ?>
  33.         <br/><label><?php _e('Slide Text'); ?></label>
  34.         <textarea rows="6" name="<?php $mb->the_name(); ?>" /><?php $mb->the_value();?></textarea><br/>
  35.  
  36.         <span><?php _e('Feel free to leave the slide title and/or text blank if you don\'t want to show any text.'); ?></span>
  37.       </div>
  38.  
  39.     <?php $mb->the_group_close(); ?>
  40.     <?php endwhile; ?>
  41.  
  42.     <p style="margin-bottom:15px; padding-top:5px;"><a href="#" class="docopy-slides button"><?php _e('Add Slide');?></a></p>  
  43.    
  44.     <p class="meta-save"><input type="submit" class="button-primary" name="save" value="<?php _e('Update');?>"></p>
  45.  
  46.  
  47.  
  48. </div><!--.my_meta_control-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement