WordPress.org

Forums

Yet Another Photoblog
Converting from YAPB to native wordpress "featured image"? (12 posts)

  1. scormeny
    Member
    Posted 2 years ago #

    I was an early user and enthusiast of YAPB -- it has served me and my clients well over the last several years. Thank you so much!

    We're overhauling a website I've worked on for a long time, and we are going to a new WordPress Theme. This theme has some great hooks into the WordPress image handling system, and so I am going to remove YAPB from this site and convert to Featured Image instead.

    My question -- is there a fairly easy, mass way to change my YAPB images to Featured Images?

    Thanks so much for advice! I'll continue to be a big fan of this developer's work and use these plugins where they work for my sites.

    http://wordpress.org/extend/plugins/yet-another-photoblog/

  2. jaroat
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry for the late response - you should have a look at the posts-table and the post type attachment in special.

    If you have a web developer at hand, he could export the yapb_images table and change the data columns so they look like entries of the posts table (content-type attachment, post_parent = yapb_image_parent).

    Additionally he could add the according post_meta so the image become the featured image of the according article.

    I've done that several times and that should be no big deal.

    If you don't have a capable developer at hand:
    i also happen to offer professional support for a reasonable hourly rate if i'm allowed to mention that ;-)

    best regards from Salzburg,

    - Johannes

  3. iPads
    Member
    Posted 2 years ago #

    Hello jaroat,

    I have the same problem as scormeny. I am now moving to a new WP template and would want a seamless (or an easy) transition to the new template.

    Can you give just a little more detail on the information:
    - export the yapb_images table and change the data columns so they look like entries of the posts table (content-type attachment, post_parent = yapb_image_parent).

    - Additionally he could add the according post_meta so the image become the featured image of the according article.

    Many thanks!
    -Pads-

  4. seriocomic
    Member
    Posted 2 years ago #

    Hi Johannes, as one of the earliest users of your awesome plugin, i have also found myself locked into old templates that require a different way of displaying images. If you were to write an export function/plugin to take existing images from YAPB to the standard WP Attachment method, i'd be happy to pay for it (I've already donated to your plugin over the years).

  5. seriocomic
    Member
    Posted 2 years ago #

    To those who are looking for this solution, i've managed to find another plugin ("Media Tools") that I've modified a function (lines 485- in media-tools.php) with the following:

    /**
    	 * Extracts the first image in the post content
    	 * @param object $post the post object
    	 * @return bool|string false if no images or img src
    	 */
    	function extract_image( $post ) {
    		if (!isset($post->image)):
    			$post->image = YapbImage::getInstanceFromDb($post->ID);
    		endif;
    		$image_wanted = $post->image->uri;
    		if ( ! empty( $image_wanted ) ) {
    			$image_got = get_site_url().$image_wanted;
    			return  $image_got;
    		} else {
    			return false;
    		}
    	}

    This essentially looks for the associated YAPB post and "imports and attaches" the image (and it's thumbnails) to the post.

    This is working in a development environment (so far), so please ensure you are backing up and testing before using in a live environment.

  6. dancingdog
    Member
    Posted 2 years ago #

    Hi Seriocomic
    many thanks - this is working for me too - 6 years of a weekly post to transfer to featured image.

  7. iPads
    Member
    Posted 2 years ago #

    Followed the instructions, but won't work on me :(

  8. Singlemalt76
    Member
    Posted 2 years ago #

    Helo,
    i have the same problem like the others. I have modified the media-tools.php like "seriocomic" has done, but i got an error. Is therer anyone who can help?

    APPB – Converter Test Bild 2

    Running import and set featured image tool
    No images found for APPB - Converter Test Bild 2
    Upload Error: Could not upload image. Check for malformed img src url

    Media tool complete (Post ID 994) in 1,460 seconds. 1 errors
    APPB – Converter Test Bild 1

    Running import and set featured image tool
    No images found for APPB - Converter Test Bild 1
    Upload Error: Could not upload image. Check for malformed img src url

    Media tool complete (Post ID 993) in 2,193 seconds. 1 errors

  9. Singlemalt76
    Member
    Posted 2 years ago #

    If i use the function in media-tools: "Set Featured Image"

    APPB – Converter Test Bild 2
    Upload Error: Could not upload image. Check for malformed img src url
    Media tool complete (Post ID 994) in 1,716 seconds. 1 errors

    So what i had done:
    Step 1) Make a new post in a new Categorie called: Test1.
    Step 2) Adding an yapb image with headline "APPB - Convert Test Bild 2" to Test 1
    Step 3) Using modified media-tool.php with "Set Featured Image" function

    My System:
    Hoster: hosteurope
    Wordpress: 3.5.1 (german)
    yapb plugin: 1.10.10

  10. Nitrok
    Member
    Posted 1 year ago #

    Any solution for this?
    I get only "Upload Error: Could not upload image. Check for malformed img src url" with modified Media Tools plugin.

  11. jaroat
    Member
    Plugin Author

    Posted 1 year ago #

    Have a look at the next post

  12. jaroat
    Member
    Plugin Author

    Posted 1 year ago #

    For all of you seeking a way out of YAPB i just programmed a migration plugin to be found via

    http://johannes.jarolim.com/blog/wp-content/uploads/2006/08/yet-another-photoblog-migrator.zip

    I'm sorry to see you go but understand that the WordPress Media Management has grown up since 2006 - the start date of YAPB.

    The plugin converts all your YAPB images into standard WordPress attachments - you may even set them all as post thumbnails if your theme supports that feature.

    Just upload the plugin into your wp-content/plugins directory, go into your admin panel and activate the plugin. After that, click on "tools/YAPB Migration" and start the migration.

    So: Thanks for the support over the years and wish you all the best:
    br from good 'ol Salzburg!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Photoblog
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic