<?php
function comp_blog() {
- echo '<h2>latest blog posts</h2>';
+ echo ' <h2>latest blog posts</h2>' ."\n";
if ($data = parse_rss(get_config('blog_rss'))) {
- echo '<ul>';
+ echo ' <ul>' . "\n";
foreach ($data->content as $item) {
- echo '<li><a href="' . $item->link . '">' . $item->title . '</a></li>';
+ echo ' <li><a href="' . $item->link . '">' . $item->title . '</a></li>' . "\n";;
}
- echo '<li class="last"><a href="http://she.geek.nz/"> ... more</a></li>';
- echo '</ul>';
+ echo ' <li class="last"><a href="' . get_config('blog_url') . '"> ... more</a></li>' . "\n";
+ echo ' </ul>' . "\n";
}
}
$photos_url = $f->urls_getUserPhotos($person['id']);
$photos = $f->people_getPublicPhotos($person['id'], NULL, 9);
+ // no nice formatting here, whtespace fucks the browser
+ echo "\n";
foreach ((array)$photos['photo'] as $photo) {
echo "<a href=$photos_url$photo[id]>";
echo "<img border='0' alt='$photo[title]' ".
echo "</a>";
$i++;
}
+ echo "\n";
}
<?php
function comp_lastfm() {
- echo '<h2>recently listened tracks</h2>';
+ echo ' <h2>recently listened tracks</h2>' . "\n";
if ($data = parse_rss('http://ws.audioscrobbler.com/1.0/user/' . get_config('lastfm_username') . '/recenttracks.rss')) {
- echo '<ul>';
+ echo ' <ul>' . "\n";
foreach ($data->content as $item) {
- echo '<li><a href="' . $item->link . '">' . $item->title . '</a></li>';
+ echo ' <li><a href="' . $item->link . '">' . $item->title . '</a></li>' . "\n";
}
- echo '<li class="last"><a href="http://last.fm/user/mjollnir_/">... more</a></li>';
- echo '</ul>';
+ echo ' <li class="last"><a href="http://last.fm/user/' . get_config('lastfm_username') . '/">... more</a></li>' . "\n";
+ echo ' </ul>' . "\n";
}
}
<?php
function comp_twitter() {
- echo '<h2>latest twitter updates</h2>';
+ echo ' <h2>latest twitter updates</h2>' . "\n";
if ($data = parse_rss('http://twitter.com/statuses/user_timeline/' . get_config('twitter_username') . '.rss')) {
- echo '<ul>';
+ echo ' <ul>' . "\n";
foreach ($data->content as $item) {
- echo '<li><a href="' . $item->link . '">' . substr($item->title, strlen(get_config('twitter_username')) + 2) . '</a></li>';
+ echo ' <li><a href="' . $item->link . '">' . substr($item->title, strlen(get_config('twitter_username')) + 2) . '</a></li>' . "\n";
}
- echo '<li class="last"><a href="http://twitter.com/mjollnir/">... more</a></li>';
- echo '</ul>';
+ echo ' <li class="last"><a href="http://twitter.com/' . get_config('twitter_username') . '/">... more</a></li>' . "\n";
+ echo ' </ul>' . "\n";
}
}
'twitter_username' => '',
'lastfm_username' => '',
'blog_rss' => '',
+ 'blog_url' => '',
'rss_cache' => '',
'curl' => '',
'cache_lifetime' => 0,
+ 'title' => '',
);
// autodetect stuff
ksort($whorepile);
?>
-<h2>mjollnir.org</h2>
-<p>a collection of what I'm doing all over the internet, mashed together into one place for your viewing pleasure.</p>
-<p>my blog lives at <a href="http://she.geek.nz">she.geek.nz</a>. there's an <a href="http://she.geek.nz/about/">about page</a> there too. it's old and rather out of date.</p>
-<p>find me on <?php
- $count = 0;
- foreach ($whorepile as $service => $url) {
- echo '<a href="' . $url . '">' . $service . '</a>';
- if ($count != count($whorepile) -1) {
- echo ', ';
- }
- $count++;
- }
-?>. christ. at least I never got livejournal.</p>
-<p>I don't have an rss feed for this mashup. use friendfeed instead, or an individual site's feed.</p>
-<p>thanks to <a href="http://nothing.net.nz">vex</a> for the vserver</p>
-<p><a href="mailto:penny@mjollnir.org">send me email!</a>
-<span class="mind"><b>On my mind</b>: <a href="http://mahara.org">mahara</a>, more tattoos, less tattoos, moodle gsoc, Europe</span>
+ <h2>mjollnir.org</h2>
+ <p>a collection of what I'm doing all over the internet, mashed together into one place for your viewing pleasure.</p>
+ <p>my blog lives at <a href="http://she.geek.nz">she.geek.nz</a>. there's an <a href="http://she.geek.nz/about/">about page</a> there too. it's old and rather out of date.</p>
+ <p>find me on <?php
+ $count = 0;
+ foreach ($whorepile as $service => $url) {
+ echo '<a href="' . $url . '">' . $service . '</a>';
+ if ($count != count($whorepile) -1) {
+ echo ', ';
+ }
+ $count++;
+ }
+ ?>. christ. at least I never got livejournal.</p>
+ <p>I don't have an rss feed for this mashup. use friendfeed instead, or an individual site's feed.</p>
+ <p>thanks to <a href="http://nothing.net.nz">vex</a> for the vserver</p>
+ <p><a href="mailto:penny@mjollnir.org">send me email!</a>
+ <span class="mind"><b>On my mind</b>: <a href="http://mahara.org">mahara</a>, more tattoos, less tattoos, moodle gsoc, Europe</span>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>mjollnir.org</title>
+ <title><?php echo get_config('title'); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<?php
foreach ($components as $comp) {
- echo ' <div class="component" id="' . $comp . '">';
+ echo ' <div class="component" id="' . $comp . '">' . "\n";
require_once(get_config('comp') . $comp . '.php');
call_user_func('comp_' . $comp);
- echo ' </div>';
+ echo "\n" . ' </div>' . "\n";
}
?>
</body>