Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

Archived entries for import

Drupal: Importing Content

Im sitepoint Blog gibt es ein kurzes Tutorial wie man das Feeds Module für den Import von Content verwenden kann.

One of the most painful steps in any web system is importing content — especially so with Drupal. It is something that I have always dreaded. Images of CSV custom scripts and line by line parsing of data or awkward SQL commands come to mind. Yuck!

That is all in the past. I am happy now. I recently discovered a module that is a crown jewel in the Drupal Contrib community — Feeds.

Drupal: Feeds module

Im developmentSEED Blog zeigen 3 Videos was mit dem Feeds module möglich ist.

In comparison to the modules mentioned here, Feeds’ philosophy is to allow recurring action and pluggability. Feeds does not make any assumptions on whether an import is being used at build time or throughout the life time of a site. It provides a common architecture on which the three stages of importing stuff (fetching, parsing, processing) rest and it allows the site builder to configure these three stages to fit the use case at hand.

WordPress: Datenimport

Joost de Valk gibt einige Tips wie man Daten aus externen Datenbank in WordPress importieren kann.

Die entscheiden Codefragmente:

// $post array mit dem resultset der externen Datenbank bauen
$i = 0;
while ($row = mysql_fetch_array($results,MYSQL_ASSOC)) {
 $post = array();
 $post['post_status'] = 'publish';
 $post['post_category'] = array(4);
 $post['post_date'] = date('Y-m-d H:i:s',strtotime($row['newsitem_date']));
 $post['post_title'] = $row['newsitem_title'];
 $post['post_content'] = $row['newsitem_content'];
 $posts[$i] = $post;
 $i++;
}
// Daten in WordPress importieren
require('./wp-load.php');
foreach ($posts as $post) {
 wp_insert_post($post);
}

Drupal: Feeds Modul

Alex Barth von developmentSEED stellt das Modul Feeds als Nachfolger des FeedAPI Moduls vor.

Die Features hören sich sehr verlockend an:

  • Fetching data from file or HTTP sources
  • Parsing RSS, Atom, CSV or OPML
  • Producing either simple database records (with Data module), nodes, users or terms
  • Use an importer configuration either by creating a node or on a stand alone form
  • Presets for the most common aggregation and import tasks
  • Integrated mapper for mapping feeds on a field level to CCK nodes, users, terms or SQL tables
  • A views-style OOP plugin API that makes it easy to tweak existing plugins or create your own (big KUDOS to merlinofchaos for CTools’ plugin API)
  • A views-style export-to-code functionality for configuration (again, hats off, merlinofchaos: CTools export API makes it easy to add exportables to a module)

Testen.

Drupal data imports

Angie Byron erklärt auf Lullabot wie man externe Daten z.B. aus einem alten CMS in Drupal importieren kann.

This article introduced the Migrate and Table Wizard modules, and provided an overview of the content import method they utilize: first getting data into MySQL/PostgreSQL tables, then exposing those database tables to Views, and finally mapping the views to internal Drupal data types and triggering the migration process. We then walked through an example import of legacy product data into Drupal nodes with attached CCK fields.
Most “real world” data import jobs require a bit more tweaking, and a follow-up article will explain how to import more advanced data sets, such as hierarchical data and multi-valued fields.



Copyright © 2004–2009. All rights reserved. – Impressum

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.