2 require_once __DIR__ . '/../data/config.php';
3 header('Link: <' . $hub . '>; rel="hub"');
4 header('Link: <' . $self . '>; rel="self"', false);
6 $files = glob(__DIR__ . '/articles/*.htm');
8 foreach ($files as $file) {
9 $content = file_get_contents($file);
10 $xml = simplexml_load_string($content);
11 $timestamp = strtotime(basename($file, '.htm'));
12 $articles[$timestamp] = (object) array(
13 'file' => 'articles/' . basename($file),
14 'title' => basename($file, '.htm'),
15 'content' => (string) $xml->body->div,
21 <html xmlns="http://www.w3.org/1999/xhtml">
23 <title>PubSubHubbub tester</title>
26 <iframe src="" id="addview" name="addview" style="position: absolute; right: 0.5ex; width: 60ex; height: 10ex; border: 1px solid grey"></iframe>
28 <a href="add-article.php" target="addview">create new article</a>
31 <?php foreach ($articles as $article) { ?>
32 <article class="h-entry">
33 <h2><?php echo htmlspecialchars($article->title); ?></h2>
34 <div class="e-content">
35 <?php echo $article->content; ?>
38 <a href="<?php echo $article->file; ?>" class="u-url">permalink</a>
39 at <time class="dt-published"><?php echo date('c', $article->time); ?></time>
41 <span class="h-card vcard author p-author">
42 <img class="u-photo" src="someone.png" width="16" height="16" alt=""/>
43 <a class="p-author h-card" href="someone.htm">Someone</a>