function archives() { $archive = sedot::loadJson('index', 'archive'); foreach ($archive as $year => $x) { foreach ($x as $month => $y) { $link = trim(SITE_URL, '/') . '/timeline/' . $year . '/' . $month; $list[] = '<li><a href="' . $link . '">' . date('F Y', strtotime($year . '-' . $month)) . '</a></li>'; } } $container = '<ul>%1$s</ul>'; return sprintf($container, implode('', $list)); }
/* grouping */ $group[$postid]["id"] = $postid; $group[$postid]["image"] = $thumbImg; $group[$postid]["tag"] = $postmeta['tag']; $group[$postid]["title"] = $postmeta['title']; $group[$postid]["url"] = self::_url($postmeta['permalink']); $group[$postid]["date"] = $postmeta['date']; $group[$postid]["entry"] = $konten; } return $group; } } # end sedot class include 'sp_theme/' . THEME . '/widget.php'; ### START LISTENING ### $post = new sedot(); if (!isset($_FRONT_PAGE)) { $_FRONT_PAGE = false; } if (!isset($_SINGLE_POST)) { $_SINGLE_POST = false; } if (!isset($_PAGE_404)) { $_PAGE_404 = false; } if (empty($getRequest[0])) { $_FRONT_PAGE = true; $pointer = $post->loadJson('index', 'index-0'); $entries = $post->index_page($pointer, false); $post->navi($post->totalpost(), 1); } elseif ($getRequest[0] == "page") {
function filterStr($str) { $str = strtolower(sedot::plainString($str)); $cleared = preg_replace('/[^a-zA-Z0-9\\s]/u', '', $str); return str_replace('\\s', '-', $cleared); }