Export from GN4 to Drupal version 7 is made available in December, 2012.
1.Install Drupal 7 (http://drupal.org/project/drupal) 2.Install CTools module (http://drupal.org/project/ctools) 3.Install Services module (http://drupal.org/project/services) 4.Enable Apache URL rewriting module (LoadModule rewrite_module modules/mod_rewrite.so) 5.Enable Drupal clean URLs 6.Enable Drupal XMLRPC server 7.Configure an XMLRPC endpoint service Path to endpoint string will be used to build the XMLRPC URL. 8.Enable service resources |
The update keeps the backward compatibility, so you can switch from Drupal 6 to Drupal 7 using the same Drupal.dll methods with the same signatures as before without changing any line of code (but only by changing methods parameters values). |
Methods available are: string ExportToDrupal(string serviceKey, string serviceDomain, string xmlRpcUrl, string userName, string password, XmlDocument gn4xml, string uid, out string id) string DeleteFromDrupal(string serviceKey, string serviceDomain, string xmlRpcUrl, string userName, string password, int id) string ExportFileToDrupal(string serviceKey, string serviceDomain, string xmlRpcUrl, string userName, string password, string drupalFolder, string filePath, string status, out string fileID) ServiceKey and serviceDomain are not used in Drupal version 7, so you can pass an empty string for those. Working example, an RNW article xml: <drupal> <ocs_field_lead_image>http://www.teradp.com/images/Right_One_banner_website_04.gif</ocs_field_lead_image> <field_video> <Array> <embed> <script type="text/javascript" src="http://rnw.bbvms.com/p/RNW-fullwidth/c/1122624.js"></script> </embed> <value>http://rnw.bbvms.com/p/RNW-fullwidth/c/1122624.js</value> <provider>bbvms</provider> <data> <Attributes> <emvideo_bbvms_version>1</emvideo_bbvms_version> <thumbnail> <Attributes> <url> http://img.bbvms.com/vi/http://rnw.bbvms.com/p/RNW-fullwidth/c/1122624.js/0.jpg </url> </Attributes> </thumbnail> <flash> <Attributes> <url>http://bbvms.com/v/http://rnw.bbvms.com/p/RNW-fullwidth/c/1122624.js</url> <size> </size> <mime>text/html; charset=utf-8</mime> </Attributes> </flash> </Attributes> </data> <download_button></download_button> <song_name>song</song_name> <artist_name>aaartissta</artist_name> <description>descrizione</description> </Array> </field_video> </drupal>
Example of node creation: doc.Load(@"c:\article.xml"); DrupalService.ExportToDrupal(string.Empty, string.Empty, "http://servername/sitename/gn4", "admin", "password", doc, "0", out id);
Example of file node creation: DrupalService.ExportFileToDrupal(string.Empty, string.Empty, "http://servername/sitename/gn4", "admin", "password", "public://", @"c:\image.jpg", "0", out id);
|