1
0
forked from Chaospott/site

added a few articles, added media

This commit is contained in:
Timm Szigat
2014-10-26 19:35:05 +01:00
parent 6498447b0d
commit af8e095bf4
537 changed files with 28682 additions and 66 deletions

View File

@@ -0,0 +1,66 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chaospott Wir sind da wat am Hacken dran...</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml">
</head>
<body>
<div id="content">
<div id="wrap">
<div id="header" class="left">
<a href="/" title="Chaospott"><img src="/logo.png" alt="Chaostreff Essen" width="350px" height="350px"></a>
</div>
</div>
<div id="about">
<div class="layout">
<h2>Über uns</h2>
<p>Wir sind der örtliche Erfa-Kreis des Chaos Computer Clubs in Essen. Unsere Gesprächsthemen und Projekte reichen von Soft- und Hardware zu Datenschutz und Netzpolitik.</p>
<p>Alle Interessierten sind herzlich zu unserem Treff eingeladen.</p>
<h2><a href="logbuch.html">Logbuch</a></h2>
<div id="logbook">
<? if (isset($content['posts'])) foreach ($content['posts'] as $post) { ?>
<div style="width: 100%;">
<a href="<?= h($post['post-permalink-or-link']) ?>"><h5><?= $post['post-title'] ?></h5></a>
<?= $post['post-type'] == 'link' ? '<span class="linkarrow">&rarr;</span>' : '' ?>
</div>
<span class="date">
<?= date('F j, Y', $post['post-timestamp']) ?>
</span>
<? } ?>
</div>
</div>
</div>
<div id="contact">
<div class="layout">
<h2>Kontakt</h2>
<h3>Chaostreff</h3>
<p>Wir treffen uns jeden Mittwoch ab 19 Uhr in der <a href="http://www.die-foobar.de/">foobar</a>, Sibyllastr. 9 (Hinterhof) in 45136 Essen.</p>
<h3>Mailingliste</h3>
<p>Zum Abonnieren der Mailingliste eine leere Mail an <pre>chaostreff-essen-subscribe(at)lists.cccmz.de</pre> schicken oder das <a href="https://lists.cccmz.de/mailman/listinfo/chaostreff-essen">Webinterface</a> benutzen.</p>
<h3>E-Mail</h3>
<pre>E-Mail: <a href="mailto:cryptoparty@ccc-essen.de">cryptoparty@ccc-essen.de</a>
GPG-Fingerprint: <a href="/media/ccc-essen.pgp">01CB 5D67 4100 6A17 2492 739D 4592 4F8A 867E D719</a></pre>
<h3>IRC</h3>
<pre>Server: <a href="http://hackint.eu/">hackint.eu</a>
Channel: #chaospott</pre>
</div>
</div>
<div style="clear: both;">
<div id="footer">
<!--<span>Februar 2012</span>-->
<span><?= date ("F Y"); ?></span>
<!--<a href="impressum.html">Impressum</a>-->
</div>
</body>
</html>

View File

@@ -0,0 +1,68 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?=
(isset($content['post']) ? h($content['post']['post-title']) . ' &ndash; ' : '') .
($content['page-title'] != $content['blog-title'] && (
$content['page-type'] == 'page' || $content['page-type'] == 'archive' || $content['page-type'] == 'tag' || $content['page-type'] == 'type'
) ? h($content['page-title']) . ' &ndash; ' : '') .
h($content['blog-title'])
?>
— Wir sind da wat am Hacken dran...
</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml">
</head>
<body>
<div id="content">
<div id="wrap">
<div id="header" class="left">
<a href="/" title="Chaospott"><img src="/logo.png" alt="Chaostreff Essen" width="350px" height="350px"></a>
</div>
</div>
<div class="article">
<? if ($content['page-type'] == 'page') { ?>
<h2><?= h($content['page-title']) ?></h2>
<?= $content['page-body'] ?>
<? } else { ?>
<? if (isset($content['posts'])) foreach ($content['posts'] as $post) { ?>
<div class="layout">
<h2 class="news-title">
<a href="<?= h($post['post-permalink-or-link']) ?>"><?= h($post['post-title']) ?></a>
<?= $post['post-type'] == 'link' ? '<span class="linkarrow">&rarr;</span>' : '' ?>
</h2>
<p class="date">
<?= date('F j, Y', $post['post-timestamp']) ?>
</p>
<?= $post['post-body'] ?>
</div>
<? } ?>
<? } ?>
<? if (isset($content['archives'])) { ?>
<h3 class="archive">Archives</h3>
<div class="archive-layout">
<? $so_far = 0; $per_column = ceil(count($content['archives']) / 5); ?>
<? foreach ($content['archives'] as $archive) { ?>
<? if (++$so_far > $per_column) { ?>
<? $so_far = 1; ?>
</div>
<div class="archive-layout">
<? } ?>
<a href="<?= h($archive['archives-uri']) ?>"><?= $archive['archives-month-short-name'] ?>&nbsp;<?= $archive['archives-year'] ?></a>
<br/>
<? } ?>
</div>
<div>
<? } ?>
</div>
</div>
<div id="footer">
<span><?= date ("F Y"); ?></span>
<!--<a href="impressum.html">Impressum</a>-->
</div>
</body>
</html>

View File

@@ -0,0 +1,80 @@
<?
if (! function_exists('title_for_post_callback')) {
// Feel free to edit these -------------------------------------------------
function title_for_post_callback($post)
{
if ($post['post-type'] == 'link') {
// For link posts, prepend a Unicode right-pointing-arrow (&rarr;)
return "\xE2\x86\x92 " . $post['post-title'];
} else {
return $post['post-title'];
}
}
function url_for_post_callback($post) { return $post['post-permalink-or-link']; }
function body_for_post_callback($post)
{
if ($post['post-type'] == 'link') {
// Insert little permalink infinity-symbol into RSS body for link posts
return $post['post-body'] . "\n\n<p><a href=\"http://www.YOURDOMAINHERE.com" . $post['post-permalink'] . "\">&#8734; Permalink</a></p>";
} else {
return $post['post-body'];
}
}
// You should probably stop editing here -----------------------------------
}
$dom = new DOMDocument('1.0', 'UTF-8');
$root = $dom->createElement('rss');
$root->setAttribute('version', '2.0');
$channel = $dom->createElement('channel');
$title_node = $dom->createElement('title');
$title_node->appendChild($dom->createTextNode($content['blog-title']));
$channel->appendChild($title_node);
$link_node = $dom->createElement('link');
$link_node->appendChild($dom->createTextNode($content['blog-url']));
$channel->appendChild($link_node);
$desc_node = $dom->createElement('description');
$desc_node->appendChild($dom->createTextNode($content['blog-description']));
$channel->appendChild($desc_node);
foreach ($content['posts'] as $post) {
$item_node = $dom->createElement('item');
$title_node = $dom->createElement('title');
$title_node->appendChild($dom->createTextNode(title_for_post_callback($post)));
$item_node->appendChild($title_node);
$link_node = $dom->createElement('link');
$link_url = url_for_post_callback($post);
if (! isset($link_url[0]) || $link_url[0] == '/') $link_url = rtrim($content['blog-url'], '/') . $link_url;
$link_node->appendChild($dom->createTextNode($link_url));
$item_node->appendChild($link_node);
$guid = $dom->createElement('guid');
$guid->setAttribute('isPermaLink', 'false');
$guid->appendChild($dom->createTextNode($post['post-permalink-or-link']));
$item_node->appendChild($guid);
$date_node = $dom->createElement('pubDate');
$date_node->appendChild($dom->createTextNode($post['post-rss-date']));
$item_node->appendChild($date_node);
$desc = $dom->createElement('description');
$desc->appendChild($dom->createTextNode(body_for_post_callback($post)));
$item_node->appendChild($desc);
$channel->appendChild($item_node);
}
$root->appendChild($channel);
$dom->appendChild($root);
echo $dom->saveXML();