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?
Ah, missed that dialog. I’ll have to look into it, so it’s on the wish list indeed…
Hi Joost, in need of the ‘featured image’ feature as well, would be great if you could add it.
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…
i need to, i hope you find a solution for your great plugin 🙂
+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!
Hi, I would love to have this ability as well, is there anything that we can to to enable this option?
+1 for this feature. I will consider paying if you are open to working on it immediately.
+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 for the suggestion. I will look into the file-gallery plugin code to see if I can easily implement this.
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.
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!
get_post_thumbnail_iddoesn’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 )?
- The topic ‘[Plugin: Netword Shared Media] Fautured image support’ is closed to new replies.