jan212
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Transfer thumbnail from any network blog to global blogi’ve fuckin got it.
Forum: Networking WordPress
In reply to: Transfer thumbnail from any network blog to global blogGot the function running but it’s ignoring switch_to_blog and copies the files in the origin blogs.dir. It doesn’t create the _thumnail_id entry in wp_ID_postmeta ?? Confusing shit.
Forum: Networking WordPress
In reply to: Transfer thumbnail from any network blog to global blogThe difference is in between “pretty much” and “exactly” and the deep focus and the nutshell… My scenario is different even if i wish i wouldn’t be ??
I need somebody who is familar with
media_handle_sideload
??Forum: Networking WordPress
In reply to: Transfer thumbnail from any network blog to global blogHi everbody,
actual state:
after aswitch_to_blog
and a$p = wp_insert_post( $my_post );
comes/* here goes thumbnail part #2 */ $filepath = $filename; //$filepath = 'wp-content/blogs.dir/2/files/'. $filename ; $wp_filetype = wp_check_filetype( basename( $filepath ), null ); $aFile["name"] = basename( $filepath ); $aFile["type"] = $wp_filetype; $afile["tmp_name"] = $filepath; $attach_id = media_handle_sideload( $aFile, $p, 'This is optional file title' ); /**/
while $filename is
2011/05/myimg.png
.Doesn’t do anything atm… Tables staying empty. Any ideas?
Regards
JanForum: Networking WordPress
In reply to: Transfer thumbnail from any network blog to global blogI am getting deeper into it, i think the right function would be
media_handle_sideload()
… sleep mode for now.Forum: Networking WordPress
In reply to: Transfer thumbnail from any network blog to global blogto be honest, i am confused atm ??
Update:
I took a look in the sitewide tags plugin code, it stores the thumb in a new custom field. If there is no other way or solution to use built in functions and architecture i will do it the same way and modify the template i think… A disadvantage of this solution is that i wouldn’t keep the posts thumbnail in the global blog if origin post/blog deleted. An advantage is that i don’t have to double store it.
In conclusion i think there’s no other way than to copy it with phpcopy()
…Forum: Networking WordPress
In reply to: Transfer thumbnail from any network blog to global blogHi Andrea,
thanks for this first hint – i am not using Sitewide tags plugin but i will look into the code, is that what u mean?
Edit:
add_theme_support( 'post-thumbnails' );
is still enabled by default, all client blogs are using twentyten theme in this early state ??