1
0
Fork 0
isopod.cool/blog/posts/post_dates.php
will b53202db59 added dates to blog post pages + some other changes
Moved personal social/contact links from /links to /about
Other minor changes to /links
Added some PHP code to every blog post that automatically pulls the publish and update dates from the Atom feed
Added a button to /etc
Added a new webgarden
Updated /stats
Wording changes to /uses
2024-03-18 04:21:49 -06:00

18 lines
541 B
PHP

<?php
$cwd = preg_replace('/^.*\//', '', getcwd());
$feed = simplexml_load_file($_SERVER['DOCUMENT_ROOT']."/blog/blog.atom");
$pdate = "";
$udate = "";
foreach($feed->entry as $entry) {
if($entry->id == $cwd) {
$pdate = preg_replace('/T.*$/', ' ', $entry->published);
$udate = preg_replace('/T.*$/', ' ', $entry->updated);
break;
}
}
echo("<p style='text-align: center;'><em>Posted&nbsp;on&nbsp;$pdate");
if($pdate != $udate) {
echo(" | Updated&nbsp;on&nbsp;$udate");
}
echo("</em></p>");
?>