/ Published in: PHP
YAPB edit form for wp 2.5
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if ($this->image): ?> <!-- This fieldset gets rendered if we have an image attached to the post: Replace --> <div id="yapb_div_imageuploader" class="postbox"> <h3><?php _e('Photoblog', 'yapb') ?></h3> <div class="inside" style="height: 80px;"> <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"> <input type="file" name="yapb_imageupload" size="30" tabindex="1" value="" id="imageupload" style="background-color:white;" /><br> <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 ?> /> <label for="checkbox_yapb_exifdate"><?php _e('Post date from image exif data if available', 'yapb') ?></label><br> <input type="checkbox" name="yapb_remove_image" value="1"> <span style="color:red;"><?php _e('Remove image from post', 'yapb') ?></span><br> </div> </div> <?php else: ?> <!-- This fieldset gets rendered if we have no image attached to the post: Upload --> <div id="yapb_div_imageuploader" class="postbox"> <h3><?php _e('Photoblog', 'yapb') ?></h3> <div class="inside"> <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 /> <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> </div> </div> <?php endif ?>