Posted By


kristin on 03/16/08

Tagged


Statistics


Viewed 110 times
Favorited by 0 user(s)

edit_form_advanced_field_fileupload.tpl.php


/ Published in: PHP
Save to your folder(s)

YAPB edit form for wp 2.5


Copy this code and paste it in your HTML
  1. <?php if ($this->image): ?>
  2. <!-- This fieldset gets rendered if we have an image attached to the post: Replace -->
  3. <div id="yapb_div_imageuploader" class="postbox">
  4. <h3><?php _e('Photoblog', 'yapb') ?></h3>
  5. <div class="inside" style="height: 80px;">
  6. <img src="<?php echo $this->image->getThumbnailHref(array('h=80','fltr[]=usm|30|3|3')) ?>" height="80" alt="" style="float:right; margin-right 10px;height:80px;padding:3px;border: 1px solid #CCCCCC">
  7. <input type="file" name="yapb_imageupload" size="30" tabindex="1" value="" id="imageupload" style="background-color:white;" /><br>
  8. <input type="checkbox" name="yapb_exifdate" id="checkbox_yapb_exifdate" value="1" <?php if(get_option('yapb_check_post_date_from_exif')): ?>checked<?php endif ?> />
  9. <label for="checkbox_yapb_exifdate"><?php _e('Post date from image exif data if available', 'yapb') ?></label><br>
  10. <input type="checkbox" name="yapb_remove_image" value="1"> <span style="color:red;"><?php _e('Remove image from post', 'yapb') ?></span><br>
  11. </div>
  12. </div>
  13.  
  14. <?php else: ?>
  15.  
  16. <!-- This fieldset gets rendered if we have no image attached to the post: Upload -->
  17. <div id="yapb_div_imageuploader" class="postbox">
  18. <h3><?php _e('Photoblog', 'yapb') ?></h3>
  19. <div class="inside">
  20. <input type="file" id="yapb_imageupload" name="yapb_imageupload" size="30" tabindex="1" value="" id="imageupload" style="background-color:white;" onChange="toggleCategory(true);" /><input class="button" type="button" value="<?php _e('clear field', 'yapb') ?>" onClick="$('yapb_imageupload').value='';toggleCategory(false);" /><br />
  21. <input type="checkbox" name="exifdate" id="checkbox_yapb_exifdate" value="1" <?php if(get_option('yapb_check_post_date_from_exif')): ?>checked<?php endif ?> /> <label for="checkbox_yapb_exifdate"><?php _e('Post date from image exif data if available', 'yapb') ?></label><br>
  22. </div>
  23. </div>
  24. <?php endif ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.