== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Warning: Undefined array key "subpage" in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_contactform/serendipity_event_contactform.php on line 504.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/lib3/src/Netcarver/Textile/Parser.php on line 2181.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/lib3/src/Netcarver/Textile/Parser.php on line 2181.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 164.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 164.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 164.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Warning: Undefined array key "comment" in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 180.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 180.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/lib3/src/Netcarver/Textile/Parser.php on line 2181.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 164.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 164.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 164.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Warning: Undefined array key "html_nugget" in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 180.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 180.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/lib3/src/Netcarver/Textile/Parser.php on line 2181.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Warning: Undefined array key "ep_disable_markup_serendipity_event_imageselectorplus:34ba0343cf0d7f01a68354358af1be85" in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_imageselectorplus/serendipity_event_imageselectorplus.php on line 594.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Warning: Undefined array key "ep_disable_markup_serendipity_event_imageselectorplus:34ba0343cf0d7f01a68354358af1be85" in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_imageselectorplus/serendipity_event_imageselectorplus.php on line 594.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

Import alter Beiträge aus 2005/2006 | Bernds Rappelkiste Skip to content
== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Notice: Only variable references should be returned by reference in /var/www/virtual/bauigel/bernd.distler.ws/include/db/mysqli.inc.php on line 101.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

Import alter Beiträge aus 2005/2006

Nach langer langer langer Zeit habe ich es endlich mal geschafft, meine alten Beiträge aus 2005/2006 zu importieren. An die Feed-Leser: Evtl. zeigt euer Reader jetzt eine Menge (ca. 195) ungelesener Artikel an. Tschuldigung!

Es war insofern etwas blöd, da ich damals ein selbstgeschriebenes Weblog verwendete und die Daten daher nicht im üblichen Datenformat vorlagen. Immerhin war ich damals so clever, eine CSV zu machen. wink

2012 hatte ich diesbezüglich schon mal im Serendipity-Forum angefragt und Garvin gab mir einen Tipp, den ich nun endlich mal umsetzen konnte.

Nachdem ich dann die CSV noch ein bisschen vorbereitet hatte (Suchen & Ersetzen von einigen Syntax-Elementen durch HTML-Code) habe ich mich dann heute an den Import gewagt, den ich natürlich vorher in einer Testinstallation ausprobiert hatte. cool

Meine CSV sah im Grund erstmal so aus:

"ID","Zeit","Benutzer","Titel","Text_Short","Text_Long","Kategorie"
"1","2005-09-04 16:09:23","1","Server down","Ich bekomme Hass! Letzte Woche war noch alles schön und gut und heute fehlt plötzlich mein ganzes Blog-System :-(",,"4"

Mit Hilfe des Tipps von Garvin und einigem Ausprobieren kam ich dann am Ende zu folgendem PHP-Script zum Einlesen der Daten:

<?php
include 'serendipity_config.inc.php';
// if your csv has an header-line, set $row = 1 otherwise $row = 0;
$row = 1;
if (($handle = fopen("Blog_Eintraege.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $row++;
        $entry_data = array(
                'timestamp' => strtotime($data[1]),
                'title' => $data[3],
                'body' => $data[4],
                'extended' => $data[5],
                'isdraft' => 'false',
                'authorid' => 1
        );
        echo "<p>Importiere Zeile ".$row." mit der Überschrift: ".$entry_data['title']."</p>";
        serendipity_updertEntry($entry_data);
    }
    fclose($handle);
    echo "<p>Import abgeschlossen</p>";
}
?>

Das Script und die CSV legt man im Hauptverzeichnis von Serendipity ab und ruft es dann im Browser auf und dann sollten alle Einträge importiert werden.

Sollten, weil es bei mir natürlich wieder nicht so ganz wollte. wink Der Befehl serendipity_updertEntry trägt auch automatisch die URL in die Sitemap ein und meldet an die Suchmaschinen das Update. Bei mir brach das Script dann (warum auch immer) nach 80-90 Einträgen ab. Ich habe dann einfach die entsprechend bereits importierten Beiträge aus der CSV gelöscht und den Import nochmal aufgerufen.

Fertig.

Trackbacks

Keine Trackbacks

Kommentare

Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Kommentar schreiben

Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.
Textile-Formatierung erlaubt
Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.
Um einen Kommentar hinterlassen zu können, erhalten Sie nach dem Kommentieren eine E-Mail mit Aktivierungslink an ihre angegebene Adresse.
Wenn Du Deinen Twitter Namen eingibst wird Deine Timeline in Deinem Kommentar verlinkt.
Bewirb einen Deiner letzten Artikel
Dieses Blog erlaubt Dir mit Deinem Kommentar einen Deiner letzten Artikel zu bewerben. Bitte gib Deine Blog URL als Homepage ein, dann wird eine Auswahl erscheinen, in der Du einen Artikel auswählen kannst. (Javascript erforderlich)
Formular-Optionen
== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Warning: Undefined variable $headcss in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_lightbox/serendipity_event_lightbox.php on line 226.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.

== ERROR-REPORT (BETA/ALPHA-BUILDS) ==

Warning: Cannot modify header information - headers already sent by (output started at /var/www/virtual/bauigel/bernd.distler.ws/include/compat.inc.php:207) in Unknown on line 0.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.