YAPB Admin form fix for WP2.5

March 15th, 2008  |  Published in Notebook  |  11 Comments

PLEASE NOTE, THERE IS A NEW VERSION OF THAT WORKS WITHOUT THIS . Please head to Johannes’s site and download the beta version of the plugin here

I’m still working on the to display the images in the post listing fields on the admin page, but this is to make it display correctly when adding a post.

The file you’ll need to replace the in is located at:

wp-content/yet-another-photoblog//edit_form_advanced_field_fileupload..

  1. <? 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><? _e('Photoblog', '') ?></h3>
  5.                         <div class="inside" style="height: 80px;">
  6.                                                         <img src="<? 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" <? if(get_option('yapb_check_post_date_from_exif')): ?>checked<? endif ?> />
  9.                                                         <label for="checkbox_yapb_exifdate"><? _e('Post date from image exif data if available', '') ?></label><br>
  10.                                                         <input type="checkbox" name="yapb_remove_image" value="1"> <span style="color:red;"><? _e('Remove image from post', '') ?></span><br>
  11.                         </div>
  12.                 </div>
  13.                
  14. <? 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><? _e('Photoblog', '') ?></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="<? _e('clear field', '') ?>" onClick="$('yapb_imageupload').value='';toggleCategory(false);" /><br />
  21.                                 <input type="checkbox" name="exifdate" id="checkbox_yapb_exifdate" value="1" <? if(get_option('yapb_check_post_date_from_exif')): ?>checked<? endif ?> />                 <label for="checkbox_yapb_exifdate"><? _e('Post date from image exif data if available', '') ?></label><br>
  22.                 </div>
  23.         </div>
  24. <? endif ?>

Download plaintext version

Responses

  1. Earl says:

    March 16th, 2008at 9:38 am(#)

    Thanks, testing it now.

  2. dalton says:

    March 18th, 2008at 8:10 am(#)

    Excellent! I am hoping to upgrade to 2.5 pretty soon after it comes out (barring any major bugs, of course) and YAPB was the one plugin holding me back!

  3. leoberaldo says:

    May 20th, 2008at 4:25 pm(#)

    thank you very much!

  4. Jenny says:

    May 21st, 2008at 5:24 pm(#)

    I’d love to know how you got your archives to be how they are with the photos and the posts. I’d like to do something similar on my site. Could you email me?

  5. Kristin says:

    May 23rd, 2008at 10:30 am(#)

    Hi Jenny,

    I used some php conditionals & two wordpress loops to loop through 2 different categories and display them seperately.

    If youd like a code example, leave me a note and I’ll send you an email.

  6. Mari says:

    May 29th, 2008at 10:33 pm(#)

    Hi Kristin,

    I’d also be interested in obtaining examples of the php conditionals and wordpress loops you’ve mentioned. Could you please send me an email as well? I’ve been trying (without success!) to simulate what you’ve been able to accomplish with your photos.

    I adore the photo management on your site. Please do share. Thanks!

  7. Jenny says:

    May 30th, 2008at 4:45 pm(#)

    Yes please :)

  8. Jenny says:

    June 8th, 2008at 9:43 am(#)

    did you email me yet or did it get spammed? i hope not if you did :(

  9. Kristin says:

    June 9th, 2008at 10:22 pm(#)

    Hi Jenny,

    Sorry for the delay on this. Since someone else also asked I was thinking about just posting a couple tutorials on my site.. and then I got slammed at work. As soon as I have a little free time I’ll get it written up.

  10. Kristin says:

    June 9th, 2008at 10:35 pm(#)

    Update: Ive posted my code up temporarily, if you can decipher go for it, otherwise you can wait until I post a little explanation about what is what.

    http://snipplr.com/view/6635/my-wordpress-archives-page/

  11. Jenny says:

    June 12th, 2008at 9:33 pm(#)

    Oh thankies muchly!

Leave a Response