Inhalt
Download Bludit Plugin
Export Bludit2Pico Konverter Plugin
Das folgende Bludit Plugin exportiert den gesamten Bludit-Inhalt und konvertiert alle Beiträge in das MD-Format des Pico CMS. Die Exportfiles werden in einem separatem Ordner exports abgelegt.
001 <?php
002
003 class pluginBludit2Pico extends Plugin {
004
005 public function init()
006 {
007 $this->formButtons = false;
008 }
009
010 public function post()
011 {
012 if (isset($_POST['createBackup'])) {
013 return $this->createPages();
014 return $this->createIndex();
015 }
016 return false;
017 }
018
019 public function form()
020 {
021 global $L;
022
023 $html = '<div class="alert alert-primary" role="alert">';
024 $html .= $this->description();
025 $html .= '</div>';
026 $html .= '<button name="createBackup" value="true" class="btn btn-primary" type="submit">Export</button>';
027
028 return $html;
029 }
030
031 public function createPages() {
032 global $pages;
033 global $syslog;
034 global $L;
035
036 $pageNumber = 1;
037 $numberOfItems = -1;
038 $onlyPublished = true;
039 $items = $pages->getList($pageNumber, $numberOfItems, $onlyPublished);
040
041 foreach ($items as $key) {
042 $page = buildPage($key);
043
044 $content = '
FlightCMS
2023-12-21
Konstanten
post
0