trigger_error(__FUNCTION__ .": missing 'id', 'permalink' or 'pagetitle' parameter"); return; } if (!empty($params['authorid'])) { $where .= " AND authorid = " . (int)$params['authorid']; } if (empty($params['query'])) { $params['query'] = "SELECT * FROM {$serendipity['dbPrefix']}staticpages WHERE $where LIMIT 1"; } $page = serendipity_db_query($params['query'], true, 'assoc'); if (is_array($page)) { $old_staticpage = $serendipity['staticpage_plugin']->staticpage; $serendipity['staticpage_plugin']->staticpage =& $page; $serendipity['staticpage_plugin']->checkPage(); echo $serendipity['staticpage_plugin']->parseStaticPage($params['pagevar'], $params['template']); $serendipity['staticpage_plugin']->staticpage = $old_staticpage; return; } } /** * Smarty Function: Returns the s9y-URL for a given category-id * * @access public * @data array Smarty parameter input array: * cid: id of the category * @param object Smarty object * @return string The URL of the category - must be added to {$serendipityBaseURL} for a full URL */ function smarty_getCategoryLinkByID ($data, $smarty) { $cat = serendipity_fetchCategoryInfo($data['cid']); $result = serendipity_getPermalink($cat, 'category'); return $result; } /** * Smarty Function: Get the URL to the archives-path * * @access public * @return string The archive-path */ function getArchiveURL() { global $serendipity; return serendipity_rewriteURL(PATH_ARCHIVES); }