Exemplo n.º 1
0
        $extension = '.text';
        $contents = new Loggix_View($resource . $extension);
        $retrievedContents = $theRss->fixMarkdown(Markdown($contents->render()));
    } elseif (file_exists($resource . '.txt')) {
        $extension = '.txt';
        $contents = new Loggix_View($resource . $extension);
        $retrievedContents = $contents->render();
    } else {
        $extension = '.html';
        $contents = new Loggix_View($resource . $extension);
        $retrievedContents = $contents->render();
    }
    // Comment to Content Module
    $retrievedContents = str_replace('./data/resources/', $theRss->getRootUri() . $expanderDir . '/data/resources/', $retrievedContents);
    $item['title'] = $theRss->setTitle($config['title']);
    $item['link'] = $theRss->getRootUri() . $resourceUri;
    $item['content_encoded'] = $retrievedContents;
    $item['date'] = date($theRss->getRssTimeFormat('2.0'), filemtime($resource . $extension)) . $theRss->getTimeZone();
    $item['enclosure'] = '';
    $item['description'] = '';
    $items[] = $item;
    $xml['loggix_title'] = $theRss->setTitle($config['title']);
    $xml['root_uri'] = $theRss->getRootUri() . 'index.php';
    $xml['rss_uri'] = $theRss->getRootUri() . $resourceUri;
    $xml['last_modified'] = $item['date'];
    header("Content-type: application/xml");
    $rssVersion2 = new Loggix_View();
    $rssVersion2->assign('items', $items);
    $rssVersion2->assign('xml', $xml);
    $rssVersion2->display($pathToIndex . '/modules/rss/theme/rss.2.0.xml');
}