Forums

Network Shared Media
[Plugin: Netword Shared Media] Fautured image support (16 posts)

  1. bastiaaaan
    Member
    Posted 11 months ago #

    Thanks for the great plugin, however it's a pity that you can't use media from another networkblog as a featured image. Maybe an idea to add that to the wish list?

    http://wordpress.org/extend/plugins/network-shared-media/

  2. joost de keijzer
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    Ah, missed that dialog. I'll have to look into it, so it's on the wish list indeed...

  3. SooBahkDo
    Member
    Posted 11 months ago #

    That would be GREAT for us as well!

  4. titush
    Member
    Posted 11 months ago #

    Absolutely needed feature! Let me know if you need a tester!

  5. nexusstudios
    Member
    Posted 10 months ago #

    Hi Joost, in need of the 'featured image' feature as well, would be great if you could add it.

    Gert-Jan

  6. joost de keijzer
    Member
    Plugin Author

    Posted 10 months ago #

    Hi all,

    I've been looking into this and I'm afraid it's quite complicated.

    WordPress stores the featured image only by media id (for the current blog), so I can't link to the "other" blog.

    It implement this, the whole featured image functionality must be rewritten.

    I will put it on my list, but don't expect anything soon...

  7. B_Dark
    Member
    Posted 7 months ago #

    i need to, i hope you find a solution for your great plugin :)

  8. arkeoweb
    Member
    Posted 6 months ago #

    +1, for this feature, please!

    This plugin is extremely useful for keeping up multilingual-multisite network, and this feature would make it complete... Great work!

    Thanks

  9. Dankoval1378
    Member
    Posted 3 months ago #

    Hi, I would love to have this ability as well, is there anything that we can to to enable this option?

  10. Denis Lam
    Member
    Posted 3 months ago #

    +1 for this feature. I will consider paying if you are open to working on it immediately.

  11. PoseLab
    Member
    Posted 3 months ago #

    other +1 for this feature

  12. maorb
    Member
    Posted 2 months ago #

    +1 for this feature.
    This is a great plugin. Without the feature to add featured image from other blogs, it's less efeective.
    Maybe there's a way to first "copy" an image from another site on the network to the current site, and then it will have an image ID (i.e. it will be saved as a post in wp_X_posts table, but the file itself won't be duplicated, like the file-gallery plugin does when duplicating instanced of attachments copied between posts in a same site). In such a way, after having an image ID, it would be easier to have it as a featured image as well.

    Thanks.

  13. joost de keijzer
    Member
    Plugin Author

    Posted 2 months ago #

    Hi maorb,

    Thanks for the suggestion. I will look into the file-gallery plugin code to see if I can easily implement this.

  14. joost de keijzer
    Member
    Plugin Author

    Posted 2 months ago #

    Hi all,

    Good news: I've got a (alpha quality) version of the plugin supporting featured images!

    I would like to invite you to try this version (please don't use a production environment!).
    I've tested the plugin on WP3.5 and the 3.6 'trunk' version.
    It works with the TwentyTwelve theme. It does not work with TwentyTen and TwentyEleven (because of the way those theme test for a featured-image).

    You can only add the networked featured image through the "Add media" button. I'm still struggling with the new media browser introduced in WP3.5 :-/

    You can download the plugin at: https://github.com/joostdekeijzer/wp_network_shared_media/tree/featured-image-support

    I'm curious how it works on your systems with your themes.

  15. neueweide
    Member
    Posted 2 months ago #

    Hi in my costum theme i use:
    $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    to get the URL of the featured image. But this didn't work since he tries to search the thumbnail_id in the wrong multisite-mysql-table?!

    I got a resolution for me:

    $xmlobject = simplexml_load_string(get_the_post_thumbnail());
    $url = $xmlobject->attributes()->src;

    In this version i copy the src attribute of the img tag with the php function simplexml_load_string.

    thanks for the plugin!

  16. joost de keijzer
    Member
    Plugin Author

    Posted 1 month ago #

    Hi Neueweide,

    get_post_thumbnail_id doesn't have any hooks so I can't alter the inner-workings. And yes: it does look in the wrong WP table :-/

    The blog_id is stored as metadata for the post with the key: _nsm_thumbnail_blog_id, so you could also do:

    $new_blog = absint( get_post_meta( $post->ID, '_nsm_thumbnail_blog_id', true ) );
    if( 0 < $new_blog ) switch_to_blog( $new_blog );
    $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    if( 0 < $new_blog ) restore_current_blog();

    Would it be an idea to add a convenience function like
    nsm_get_post_thumbnail_url( $post_id ) ?

Reply

You must log in to post.

About this Plugin

About this Topic