Closed (fixed)
Project:
Embedded Media Field
Version:
6.x-3.x-dev
Component:
Embedded Video Field
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2011 at 16:36 UTC
Updated:
17 Oct 2013 at 09:44 UTC
I'm wirting a set of custom import scripts to import my nodes from site A to B, and I have several hundred nodes with video fields...
I have tried both node_save & drupal_execute ways of creating my nodes, with assigning the relative cck fields for video... but it just doesn't save to the database.
Is there a simple example of how you can use emfield programmatically?
Comments
Comment #1
joejoejoew commentedTry this:
Comment #2
the_g_bomb commentedAs an alternative to the above, have you thought about using the http://drupal.org/project/feeds module?
I have a custom importer setup using it, create a view on site A that outputs XML, csv, or any other format pick your preference as long as feeds supports it. Then create an import profile on site B, map the relevant fields and import away. It may just save you having to hand code eveything.
Comment #3
jibranThis code works fine for me.
Comment #4
Llewellyn commentedHi there jibran
Does the embed code have to be a specific format?
Comment #5
jibranYou can add any code as long as you have enabled respective extended module(s). i.e. media_youtube, media_vimeo etc.
I hope this helps.
Comment #6
Llewellyn commentedThanks will give this a try.
Comment #7
Steven Brown commentedI'm needing this same thing but in D7. Anyone know how I should do it?
Comment #8
atin81 commentedTry with this code:
Comment #9
aaron commentedComment #11
rakesh.gectcr