df0b2 Friday 12th February 2016, 23:23:51
else if(isGET('archive') && strlen($_GET['archive']) === 4)
{
$archivedPosts = array();
$posts = listEntry('post');
sort($posts);
foreach($posts as $post)
{
if($_GET['archive'] === substr($post, 0, 4))
{
$month = substr($post, 5, 2);
$archivedPosts[$month][] = $post;
}
}
if(!$archivedPosts)
{
exit;
}
$out['subtitle'] = $_GET['archive'];
foreach($archivedPosts as $monthPosts)
{
$out['content'] .= '<b>' .toDate($monthPosts[0], 'M'). '</b>
<ul>';
foreach($monthPosts as $post)
{
$postEntry = readEntry('post', $post);
$out['content'] .= '<li>' .toDate($post, 'jS'). ' - ' .managePost($post). '<a href="view.php/post/' .$post. '">' .$postEntry['title']. '</a></li>';
}
$out['content'] .= '</ul>';
}
}
Fred#f8768 Sunday 14th February 2016, 10:40:18
A plugin will arrive very soon to meet your needs, you can [try it here](view.php/plugin/archives) and tell me if it suits you.Fred#f8768 Sunday 14th February 2016, 23:39:46
Try with a [.htaccess and rewrite rules](https://httpd.apache.org/docs/trunk/en/rewrite/intro.html).Suggested Topics | View / Reply | Forum |
---|---|---|
444f31e1 started REQUIRED IMAGE UPLOAD - FIRST POST | 1.3K / 1 | Feature Requests |
ea05f started Emoji's (better/ more modern) | 1.2K / 3 | Feature Requests |
AlexanderLiebrecht started solved Something went wrong when updating | 1.4K / 4 | General Questions |
Alexander Liebrecht started solved Quote in Topics not worked | 924 / 2 | Bug reports |