From: garvinhicking Date: Sun, 22 May 2005 15:37:11 +0000 (+0000) Subject: Major update, commit custom permalink patch and some DB updates. X-Git-Tag: 0.9~452 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3fdc3252f8632d95c53ee42eeb058a1baa725046;p=s9y.git Major update, commit custom permalink patch and some DB updates. Please report any updates, as from now "alpha" means "alpha". :) --- diff --git a/comment.php b/comment.php index 6c3d79b..1647c71 100644 --- a/comment.php +++ b/comment.php @@ -98,9 +98,9 @@ if ($type == 'trackback') { ); } else if (!isset($serendipity['POST']['submit'])) { if ($serendipity['GET']['type'] == 'trackbacks') { - $query = "SELECT title FROM {$serendipity['dbPrefix']}entries WHERE id = '". $id ."'"; + $query = "SELECT title, timestamp FROM {$serendipity['dbPrefix']}entries WHERE id = '". $id ."'"; $entry = serendipity_db_query($query); - $entry = serendipity_archiveURL($id, $entry[0]['title'], 'baseURL'); + $entry = serendipity_archiveURL($id, $entry[0]['title'], 'baseURL', true, array('timestamp' => $entry[0]['timestamp'])); $serendipity['smarty']->assign( array( diff --git a/docs/NEWS b/docs/NEWS index 324bb0a..dc38f06 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,16 @@ Version 0.9 () ------------------------------------------------------------------------ + * Added Custom Permalink URL days, months, years, etc. to the + Serendipity Configuration ("Paths") panel. + If you use the external plugin serendipity_plugin_authors or + serendipity_event_linktoolbar, you need to update those to + their latest versions to work with the new changes. + (garvinhicking, tomsommer) + + * Importers can now properly import data if the source database is + not the same as the target database (garvinhicking) + * Use $smarty.const. to access constants instead of $CONST within Smarty templates; this is replaced using a Smarty prefilter, so that within templates you can still use the $CONST shortcut @@ -34,7 +44,7 @@ Version 0.9 () * New entryproperties plugin option: Hide an entry from the frontpage (garvinhicking) - * Media manager: Allow to upload as many files as you want via + * Media manager: Allow to upload as many files as you want via JavaScript interaction and "add more images" button. (garvinhicking) * "Comments" Sidebar plugin can now have a custom title @@ -54,15 +64,15 @@ Version 0.8.1 (May 17th, 2005) * Fix missing PDF thumbnail creation (imagemagick only) (garvinhicking) - + * Fix possible arbitrary media file upload for editors (garvinhicking, sesser, nohn) - + * Fix possible XSS when using the templatedropdown or shoutbox plugins (garvinhicking) * Fix pagination of "Entries by Author" (garvinhicking) - + * Fix RSS 1.0 missing top-level namespace (garvinhicking) * Deactivated gzip compression by default, as in certain server @@ -74,24 +84,24 @@ Version 0.8.1 (May 17th, 2005) link. Also fix not sending trackbacks containing "#" fragments (garvinhicking) - * Do not display Sidebar titles if they are not set for the bundled + * Do not display Sidebar titles if they are not set for the bundled default, kubrick and wp templates (sidebar.tpl) (garvinhicking) - * Fix error "Warning: ob_start(): output handler 'ob_gzhandler' + * Fix error "Warning: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter'" which can occur on installations where session.use_trans_sid is activated and Serendipity's gzip compression is used. (garvinhicking) * Adjusted checking for "convert" binary in installation for Windows servers. Thanks to BobRock! (garvinhicking) - + * BBCode plugin: Allow =, ~ and ! URL characters (garvinhicking) - + * Added romanian translation by Alexandru Szasz - + * Some IIS webserver compatibility for $_SERVER variables. This should ensure most basic operations. (garvinhicking) - + * RSS feed does no longer initialize a session and thus now causes proper cachability for Conditional Get (garvinhicking) @@ -157,7 +167,7 @@ Version 0.8-beta5 (April 1st, 2005) * Fixed a XMLRPC problem for metaWeblog_newMediaObject() to properly save a binary file. Thanks to marco from the forums! (garvinhicking) - + * Fixed possible SQL-Injection in Pingbacks (nohn; reported by Stefan Esser) @@ -212,7 +222,7 @@ Version 0.8-beta3/4 (March 15th, 2005) plugin and browsing the calendar with category restriction(s). Thanks to Larry Rosenman for helping out with this! (garvinhicking) - + * Introduce "div.container_X" CSS class for sidebar plugin items. X is substituted with the plugin classname, like "serendipity_plugin_categories". This class is contained in the @@ -223,12 +233,12 @@ Version 0.8-beta3/4 (March 15th, 2005) (garvinhicking) * Bundle Tom Sommer's port of the Kubrick template - + * Fix hardcoded "templates" directory reference inside the admin style selector. * Updated czech language files, thanks to Josef Klimosz - + * Updated persian language files, thanks to Omid Mottaghi * Do not display rotation/resize image manipulation methods for diff --git a/include/admin/category.inc.php b/include/admin/category.inc.php index f81f3c2..172ddfb 100644 --- a/include/admin/category.inc.php +++ b/include/admin/category.inc.php @@ -32,10 +32,7 @@ if (isset($_POST['SAVE'])) { if ( $sql ) { echo '
'. sprintf(CATEGORY_ALREADY_EXIST, htmlspecialchars($name)) .'
'; } else { - $query = "INSERT INTO {$serendipity['dbPrefix']}category - (category_name, category_description, authorid, category_icon, parentid, category_left, category_right) - VALUES ('". serendipity_db_escape_string($name) ."', '". serendipity_db_escape_string($desc) ."', ". (int)$authorid .", '". serendipity_db_escape_string($icon) ."', ". (int)$parentid .", 0, 0)"; - serendipity_db_query($query); + serendipity_addCategory($name, $desc, $authorid, $icon, $parentid); echo '
'. CATEGORY_SAVED .'
'; } @@ -57,15 +54,7 @@ if (isset($_POST['SAVE'])) { WHERE categoryid = ". (int)$parentid); echo sprintf(ALREADY_SUBCATEGORY, htmlspecialchars($r[0]['category_name']), htmlspecialchars($name)); } else { - $query = "UPDATE {$serendipity['dbPrefix']}category - SET category_name = '". serendipity_db_escape_string($name) ."', - category_description = '". serendipity_db_escape_string($desc) ."', - authorid = ". (int)$authorid .", - category_icon = '". serendipity_db_escape_string($icon) ."', - parentid = ". (int)$parentid ." - WHERE categoryid = ". (int)$serendipity['GET']['cid'] ." - $admin_category"; - serendipity_db_query($query); + serendipity_updateCategory($serendipity['GET']['cid'], $name, $desc, $authorid, $icon, $parentid); echo '
'. CATEGORY_SAVED .'
'; } } @@ -101,7 +90,7 @@ if ($serendipity['GET']['adminAction'] == 'doDelete') { {$admin_category}"; } if ( serendipity_db_query($query) ) { - if ( serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}category WHERE category_left BETWEEN {$category_range} {$admin_category}") ) { + if (serendipity_deleteCategory($category_range, $admin_category) ) { echo '
'. ($remaining_cat ? sprintf(CATEGORY_DELETED_ARTICLES_MOVED, (int)$serendipity['GET']['cid'], $remaining_cat) : sprintf(CATEGORY_DELETED,(int)$serendipity['GET']['cid'])) .'
'; $serendipity['GET']['adminAction'] = 'view'; } diff --git a/include/admin/configuration.inc.php b/include/admin/configuration.inc.php index c6953de..561ea95 100644 --- a/include/admin/configuration.inc.php +++ b/include/admin/configuration.inc.php @@ -12,14 +12,41 @@ if (!isset($_POST['installAction'])) { switch ($_POST['installAction']) { case 'check': - $oldRewrite = $serendipity['rewrite']; // We save the rewrite method, because we run a check after $serendipity has been updated + $oldConfig = $serendipity; $res = serendipity_updateConfiguration(); if (is_array($res)) { echo DIAGNOSTIC_ERROR; echo '- ' . implode('
', $res) . '


'; } else { /* If we have new rewrite rules, then install them */ - if (isset($_POST['rewrite']) && $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN && $oldRewrite != $_POST['rewrite']) { + $permalinkOld = array( + $oldConfig['serendipityHTTPPath'], + $oldConfig['serendipityPath'], + $oldConfig['baseURL'], + $oldConfig['indexFile'], + $oldConfig['rewrite']); + + $permalinkNew = array( + $serendipity['serendipityHTTPPath'], + $serendipity['serendipityPath'], + $serendipity['baseURL'], + $serendipity['indexFile'], + $serendipity['rewrite']); + + // Compare all old permalink section values against new one. A change in any of those + // will force to update the .htaccess for rewrite rules. + if ($serendipity['rewrite'] != 'none') { + $permconf = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE); + foreach($permconf['permalinks']['items'] AS $permitem) { + $permalinkOld[] = $oldConfig[$permitem['var']]; + $permalinkNew[] = $serendipity[$permitem['var']]; + } + } + +print_r($permalinkOld); // DEBUG +print_r($permalinkNew); // DEBUG + + if ($serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN && serialize($permalinkOld) != serialize($permalinkNew)) { printf(ATTEMPT_WRITE_FILE, $serendipity['serendipityPath'] . '.htaccess'); $res = serendipity_installFiles($serendipity['serendipityPath']); if (is_array($res)) { @@ -27,7 +54,10 @@ switch ($_POST['installAction']) { } else { echo DONE . '
'; } + + serendipity_buildPermalinks(); } + echo '
'. WRITTEN_N_SAVED .'
'; } diff --git a/include/admin/upgrader.inc.php b/include/admin/upgrader.inc.php index ede20b1..76e2d4f 100644 --- a/include/admin/upgrader.inc.php +++ b/include/admin/upgrader.inc.php @@ -123,6 +123,11 @@ $tasks = array(array('version' => '0.5.1', 'function' => 'serendipity_smarty_purge', 'title' => 'Clear Smarty compiled templates', 'desc' => 'Smarty has been upgraded to its latest stable version, and we therefore need to purge all compiled templates and cache'), + + array('version' => '0.9-alpha2', + 'function' => 'serendipity_buildPermalinks', + 'title' => 'Build permalink patterns', + 'desc' => 'This version introduces user-configurable Permalinks and needs to pre-cache the list of all permalinks to be later able to fetch the corresponding entries for a permalink.'), ); /* Fetch SQL files which needs to be run */ @@ -329,7 +334,7 @@ if (($showAbort && $serendipity['GET']['action'] == 'ignore') || $serendipity['G

-

+

$serendipity['POST']['authorid'], + 'username' => $_POST['username'], + 'realname' => $_POST['realname'], + 'email' => $_POST['email'] + ); + serendipity_updatePermalink($pl_data, 'author'); printf('
' . MODIFIED_USER . '
', $_POST['realname']); } } diff --git a/include/functions.inc.php b/include/functions.inc.php index feb4e38..eb2a7ed 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -12,6 +12,7 @@ include_once(S9Y_INCLUDE_PATH . "include/functions_images.inc.php"); include_once(S9Y_INCLUDE_PATH . "include/functions_installer.inc.php"); include_once(S9Y_INCLUDE_PATH . "include/functions_entries.inc.php"); include_once(S9Y_INCLUDE_PATH . "include/functions_comments.inc.php"); +include_once(S9Y_INCLUDE_PATH . "include/functions_permalinks.inc.php"); include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php"); include_once(S9Y_INCLUDE_PATH . "include/functions_smarty.inc.php"); @@ -163,14 +164,14 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL if ( is_null($fromName) ) { $fromName = $serendipity['blogTitle']; } - + if ( is_null($fromMail) ) { $fromMail = $to; } - + // Fix special characters $fromName = str_replace(array('"'), array("'"), $fromName); - + /* Prefix all mail with weblog title */ $subject = '['. $serendipity['blogTitle'] . '] '. $subject; @@ -199,108 +200,6 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL return mail($to, $subject, $message, implode("\n", $headers)); } -function serendipity_makeFilename($str) { - static $from = array( - ' ', - - 'Ä', - 'ä', - - 'Ö', - 'ö', - - 'Ü', - 'ü', - - 'ß', - - 'é', - 'è', - 'ê', - - 'í', - 'ì', - 'î', - - 'á', - 'à', - 'â', - 'å', - - 'ó', - 'ò', - 'ô', - 'õ', - - 'ú', - 'ù', - 'û', - - 'ç', - 'Ç', - - 'ñ', - - 'ý'); - - static $to = array( - '-', - - 'AE', - 'ae', - - 'OE', - 'oe', - - 'UE', - 'ue', - - 'ss', - - 'e', - 'e', - 'e', - - 'i', - 'i', - 'i', - - 'a', - 'a', - 'a', - 'a', - - 'o', - 'o', - 'o', - 'o', - - 'u', - 'u', - 'u', - - 'c', - 'C', - - 'n', - - 'y'); - - // Replace international chars not detected by every locale - $str = str_replace($from, $to, $str); - - // Nuke chars not allowed in our URI - $str = preg_replace('#[^' . PAT_FILENAME . ']#i', '', $str); - - // Remove consecutive separators - $str = preg_replace('#'. $to[0] .'{2,}#s', $to[0], $str); - - // Remove excess separators - $str = trim($str, $to[0]); - - return $str; -} - function serendipity_fetchReferences($id) { global $serendipity; @@ -323,7 +222,7 @@ function serendipity_utf8_encode($string) { } function serendipity_rss_getguid($entry, $comments = false) { - $guid = serendipity_archiveURL((isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']), 'guid'); + $guid = serendipity_archiveURL((isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']), 'guid', 'baseURL', true, array('timestamp' => $entry['timestamp'])); if ($comments == true) { $guid .= '#c' . $entry['commentid']; } @@ -357,36 +256,6 @@ function xhtml_cleanup($html) { return preg_replace($p, $r, $html); } -/* Uses logic to figure out how the URI should look, based on current rewrite rule */ -function serendipity_rewriteURL($path, $key='baseURL') { - global $serendipity; - return $serendipity[$key] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . $path; -} - -function serendipity_makePermalink($format, $data) { - static $keys = array('%id%', '%title%'); - $replacements = array((int)$data['id'], serendipity_makeFilename($data['title'])); - return str_replace($keys, $replacements, $format); -} - -function serendipity_makePermalinkRegex($format) { - static $keys = array('%id%', '%title%'); - static $regexValues = array('([0-9]+)', '[0-9a-z\.\_!;,\+\-]+'); - return str_replace($keys, $regexValues, preg_quote($format)); -} - -function serendipity_archiveURL($id, $title, $key = 'baseURL', $checkrewrite = true) { - $path = PATH_ARCHIVES . '/' . serendipity_makePermalink(PERM_ARCHIVES, array('id'=>$id, 'title' => $title)); - if ( $checkrewrite ) { - $path = serendipity_rewriteURL($path, $key); - } - return $path; -} - -function serendipity_archiveDateUrl($range, $summary=false, $key='baseURL') { - return serendipity_rewriteURL(PATH_ARCHIVES . '/' . $range . ($summary ? '/summary' : '') . '.html', $key); -} - function serendipity_fetchAuthor($author) { global $serendipity; @@ -435,7 +304,7 @@ function serendipity_track_referrer($entry = 0) { } $ts = serendipity_db_get_interval('ts'); - $interval = serendipity_db_get_interval('interval', 900); + $interval = serendipity_db_get_interval('interval', 900); $suppressq = "SELECT count(1) FROM $serendipity[dbPrefix]suppress @@ -484,7 +353,7 @@ function serendipity_track_referrer_gc() { global $serendipity; $ts = serendipity_db_get_interval('ts'); - $interval = serendipity_db_get_interval('interval', 900); + $interval = serendipity_db_get_interval('interval', 900); $gc = "DELETE FROM $serendipity[dbPrefix]suppress WHERE last <= $ts - $interval"; serendipity_db_query($gc); } @@ -641,55 +510,53 @@ function serendipity_isResponseClean($d) { return (strpos($d, "\r") === false && strpos($d, "\n") === false); } -function serendipity_currentURL() { +function serendipity_addCategory($name, $desc, $authorid, $icon, $parentid) { global $serendipity; + $query = "INSERT INTO {$serendipity['dbPrefix']}category + (category_name, category_description, authorid, category_icon, parentid, category_left, category_right) + VALUES + ('". serendipity_db_escape_string($name) ."', + '". serendipity_db_escape_string($desc) ."', + ". (int)$authorid .", + '". serendipity_db_escape_string($icon) ."', + ". (int)$parentid .", + 0, + 0)"; + + serendipity_db_query($query); + $cid = serendipity_db_insert_id('category', 'categoryid'); + + $data = array( + 'categoryid' => $cid, + 'category_name' => $name, + 'category_description' => $desc + ); - // All that URL getting humpty-dumpty is necessary to allow a user to change the template in the - // articles view. POSTing data to that page only works with mod_rewrite and not the ErrorDocument - // redirection, so we need to generate the ErrorDocument-URI here. - - $uri = parse_url($_SERVER['REQUEST_URI']); - $qst = ''; - if (!empty($uri['query'])) { - $qst = '&' . str_replace('&', '&', $uri['query']); - } - $uri['path'] = str_replace($serendipity['serendipityHTTPPath'], '', $uri['path']); - $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst; - $url = str_replace( - array( - $serendipity['indexFile'] . '&', - '"', - "'", - '<', - '>' - ), - - array( - '', - '', - '', - '' - ), - - $url); // Kill possible looped repitions and bad characters which could occur - - return $url; + serendipity_insertPermalink($data, 'category'); + return $cid; } -function serendipity_getUriArguments($uri, $wildcard = false) { -global $serendipity; +function serendipity_updateCategory($cid, $name, $desc, $authorid, $icon, $parentid) { + global $serendipity; + + $query = "UPDATE {$serendipity['dbPrefix']}category + SET category_name = '". serendipity_db_escape_string($name) ."', + category_description = '". serendipity_db_escape_string($desc) ."', + authorid = ". (int)$authorid .", + category_icon = '". serendipity_db_escape_string($icon) ."', + parentid = ". (int)$parentid ." + WHERE categoryid = ". (int)$cid ." + $admin_category"; + serendipity_db_query($query); + + $data = array( + 'categoryid' => $cid, + 'category_name' => $name, + 'category_description' => $desc + ); + + serendipity_updatePermalink($data, 'category'); - /* Explode the path into sections, to later be able to check for arguments and add our own */ - preg_match('/^'. preg_quote($serendipity['serendipityHTTPPath'], '/') . '(' . preg_quote($serendipity['indexFile'], '/') . '\?\/)?(' . ($wildcard ? '.+' : '[;a-z0-9\-*\/%\+]+') . ')/i', $uri, $_res); - if (strlen($_res[2]) != 0) { - $args = explode('/', $_res[2]); - if ($args[0] == 'index') { - unset($args[0]); - } - return $args; - } else { - return array(); - } } define("serendipity_FUNCTIONS_LOADED", true); diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 7d353d2..87d0ed0 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -12,12 +12,24 @@ function serendipity_addAuthor($username, $password, $realname, $email, $userlev '" . serendipity_db_escape_String($email) . "', '" . serendipity_db_escape_String($userlevel) . "')"; serendipity_db_query($query); - return serendipity_db_insert_id('authors', 'authorid'); + $cid = serendipity_db_insert_id('authors', 'authorid'); + + $data = array( + 'authorid' => $cid, + 'username' => $username, + 'realname' => $realname, + 'email' => $email + ); + + serendipity_insertPermalink($data, 'author'); + return $cid; } function serendipity_deleteAuthor($authorid) { global $serendipity; - serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}authors WHERE authorid=" . (int)$authorid ." and userlevel <= ". (int)$serendipity['serendipityUserlevel']); + if (serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}authors WHERE authorid=" . (int)$authorid ." and userlevel <= ". (int)$serendipity['serendipityUserlevel'])) { + serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE entry_id=" . (int)$authorid ." and type='author'"); + } return true; } @@ -152,7 +164,7 @@ function serendipity_load_configuration($author = null) { WHERE authorid = '". (int)$author ."'"); } else { // Only get default variables, user-independent (frontend) - $rows = serendipity_db_query("SELECT name,value + $rows = serendipity_db_query("SELECT name, value FROM {$serendipity['dbPrefix']}config WHERE authorid = 0"); } diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 9b99f9f..b1b0715 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -521,6 +521,12 @@ function serendipity_printEntryFooter() { $serendipity['smarty']->assign('footer_prev_page', serendipity_rewriteURL(implode('/', $uriArguments) .'.html')); } + $uriArguments = $serendipity['uriArguments']; + $uriArguments[] = 'P%s'; + $serendipity['smarty']->assign('footer_totalEntries', $totalEntries); + $serendipity['smarty']->assign('footer_totalPages', $totalPages); + $serendipity['smarty']->assign('footer_currentPage', $serendipity['GET']['page']); + $serendipity['smarty']->assign('footer_pageLink', serendipity_rewriteURL(implode('/', $uriArguments) . '.html')); $serendipity['smarty']->assign('footer_info', sprintf(PAGE_BROWSE_ENTRIES, (int)$serendipity['GET']['page'], $totalPages, $totalEntries)); if ($serendipity['GET']['page'] < $totalPages) { @@ -607,9 +613,21 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false) { serendipity_plugin_api::hook_event('frontend_display', $entry); - $entry['link'] = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath'); - $entry['commURL'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', false); - $entry['rdf_ident'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL'); + if ($preview) { + $entry['author'] = $entry['realname']; + $entry['authorid'] = $serendipity['authorid']; + } + + $authorData = array( + 'authorid' => $entry['authorid'], + 'username' => $entry['author'], + 'email' => $entry['email'], + 'realname' => $entry['author'] + ); + + $entry['link'] = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp'])); + $entry['commURL'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', false, array('timestamp' => $entry['timestamp'])); + $entry['rdf_ident'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])); $entry['title'] = htmlspecialchars($entry['title']); $entry['link_allow_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=enable&serendipity[entry]=' . $entry['id']; @@ -624,11 +642,11 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false) { $entry['link_rdf'] = serendipity_rewriteURL(PATH_FEEDS . '/ei_'. $entry['id'] .'.rdf'); $entry['link_viewmode_threaded'] = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] .'?url='. $entry['commURL'] .'&serendipity[cview]='. VIEWMODE_THREADED; $entry['link_viewmode_linear'] = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] .'?url='. $entry['commURL'] .'&serendipity[cview]='. VIEWMODE_LINEAR; - $entry['link_author'] = serendipity_rewriteURL(PATH_AUTHORS .'/'. serendipity_makePermalink(PERM_AUTHORS, array('id' => $entry['authorid'], 'title' => $entry['author']))); + $entry['link_author'] = serendipity_authorURL($authorData); if (is_array($entry['categories'])) { foreach ($entry['categories'] as $k => $v) { - $entry['categories'][$k]['category_link'] = serendipity_rewriteURL(PATH_CATEGORIES . '/' . serendipity_makePermalink(PERM_CATEGORIES, array('id' => $entry['categories'][$k]['categoryid'], 'title' => $entry['categories'][$k]['category_name']))); + $entry['categories'][$k]['category_link'] = serendipity_categoryURL($entry['categories'][$k]); } } @@ -712,7 +730,7 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu foreach ($entries as $entry) { $id = (isset($entry['entryid']) && !empty($entry['entryid']) ? $entry['entryid'] : $entry['id']); $guid = serendipity_rss_getguid($entry, $comments); - $entryLink = serendipity_archiveURL($id, $entry['title']); + $entryLink = serendipity_archiveURL($id, $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])); if ($comments == true) { // Display username as part of the title for easier feed-readability $entry['title'] = $entry['author'] . ': ' . $entry['title']; @@ -975,12 +993,14 @@ function serendipity_updertEntry($entry) { $entry['id'] = $serendipity['lastSavedEntry'] = serendipity_db_insert_id('entries', 'id'); if (is_array($categories)) { foreach ($categories as $cat) { - if (is_numeric($cat)) - serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat})"); + if (is_numeric($cat)) { + serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat})"); + } } } - } - else { + + serendipity_insertPermalink($entry); + } else { //Some error message here return ENTRIES_NOT_SUCCESSFULLY_INSERTED; } @@ -1010,6 +1030,7 @@ function serendipity_updertEntry($entry) { $res = serendipity_db_update('entries', array('id' => $entry['id']), $entry); $newEntry = 0; + serendipity_updatePermalink($entry); } if (is_string($res)) { @@ -1060,6 +1081,7 @@ function serendipity_deleteEntry($id) { serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entryproperties WHERE entryid=$id"); serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}comments WHERE entry_id=$id"); serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='$id'"); + serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE entry_id='$id'"); } /** @@ -1107,14 +1129,14 @@ function serendipity_generateCategoryList($cats, $select = array(0), $type = 0, htmlspecialchars($cat['category_description']), $xmlImg, str_repeat(' ', $level * 3), - serendipity_rewriteURL(PATH_CATEGORIES . '/' . serendipity_makePermalink(PERM_CATEGORIES, array('id' => $cat['categoryid'], 'title' => $category_id)), 'serendipityHTTPPath'), + serendipity_categoryURL($cat, 'serendipityHTTPPath'), htmlspecialchars($cat['category_description']), htmlspecialchars($cat['category_name'])); } else { $ret .= sprintf( '%s%s
', str_repeat(' ', $level * 3), - serendipity_rewriteURL(PATH_CATEGORIES . '/' . serendipity_makePermalink(PERM_CATEGORIES, array('id' => $cat['categoryid'], 'title' => $category_id)), 'serendipityHTTPPath'), + serendipity_categoryURL($cat, 'serendipityHTTPPath'), htmlspecialchars($cat['category_description']), htmlspecialchars($cat['category_name'])); } diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index b3cef23..fc6632c 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -113,6 +113,9 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t switch ($optname) { + case 'permalinkStructure': + return $default; + case 'dbType' : if (extension_loaded('mysqli')) { $type = 'mysqli'; @@ -400,6 +403,10 @@ function showConfigAll(count) { if (in_array('probeDefault', $item['flags'])) { $item['default'] = serendipity_probeInstallation($item['var']); } + + if (in_array('ifEmpty', $item['flags']) && empty($value)) { + $value = serendipity_query_default($item['var'], $item['default']); + } ?> @@ -615,6 +622,13 @@ function serendipity_installFiles($serendipity_core = '') { $errs[] = ERROR_TEMPLATE_FILE; } + // When we write this file we cannot rely on the constants defined + // earlier, as they do not yet contain the updated contents from the + // new config. Thus we re-define those. We do still use constants + // for backwards/code compatibility. + + $PAT = serendipity_permalinkPatterns(true); + $content = str_replace( array( '{PREFIX}', @@ -624,34 +638,36 @@ function serendipity_installFiles($serendipity_core = '') { '{PAT_FEEDS}', '{PATH_FEEDS}', '{PAT_FEED}', '{PAT_ADMIN}', '{PATH_ADMIN}', - '{PAT_ENTRIES}', '{PATH_ENTRIES}', '{PAT_ARCHIVE}', '{PATH_ARCHIVE}', - '{PAT_CATEGORIES}', '{PATH_CATEGORIES}', '{PAT_PLUGIN}', '{PATH_PLUGIN}', '{PAT_DELETE}', '{PATH_DELETE}', '{PAT_APPROVE}', '{PATH_APPROVE}', '{PAT_SEARCH}', '{PATH_SEARCH}', '{PAT_CSS}', - '{PAT_AUTHORS}', '{PATH_AUTHORS}' + '{PAT_PERMALINK}', + '{PAT_PERMALINK_AUTHORS}', + '{PAT_PERMALINK_FEEDCATEGORIES}', + '{PAT_PERMALINK_CATEGORIES}', ), array( $serendipityHTTPPath, $indexFile, - trim(PAT_UNSUBSCRIBE, '@/i'), PATH_UNSUBSCRIBE, - trim(PAT_ARCHIVES, '@/i'), PATH_ARCHIVES, - trim(PAT_FEEDS, '@/i'), PATH_FEEDS, + trim($PAT['UNSUBSCRIBE'], '@/i'), $serendipity['permalinkUnsubscribePath'], + trim($PAT['ARCHIVES'], '@/i'), $serendipity['permalinkArchivesPath'], + trim($PAT['FEEDS'], '@/i'), $serendipity['permalinkFeedsPath'], trim(PAT_FEED, '@/i'), - trim(PAT_ADMIN, '@/i'), PATH_ADMIN, - trim(PAT_ENTRIES, '@/i'), PATH_ENTRIES, - trim(PAT_ARCHIVE, '@/i'), PATH_ARCHIVE, - trim(PAT_CATEGORIES, '@/i'), PATH_CATEGORIES, - trim(PAT_PLUGIN, '@/i'), PATH_PLUGIN, - trim(PAT_DELETE, '@/i'), PATH_DELETE, - trim(PAT_APPROVE, '@/i'), PATH_APPROVE, - trim(PAT_SEARCH, '@/i'), PATH_SEARCH, + trim($PAT['ADMIN'], '@/i'), $serendipity['permalinkAdminPath'], + trim($PAT['ARCHIVE'], '@/i'), $serendipity['permalinkArchivePath'], + trim($PAT['PLUGIN'], '@/i'), $serendipity['permalinkPluginPath'], + trim($PAT['DELETE'], '@/i'), $serendipity['permalinkDeletePath'], + trim($PAT['APPROVE'], '@/i'), $serendipity['permalinkApprovePath'], + trim($PAT['SEARCH'], '@/i'), $serendipity['permalinkSearchPath'], trim(PAT_CSS, '@/i'), - trim(PAT_AUTHORS, '@/i'), PATH_AUTHORS + trim($PAT['PERMALINK'], '@/i'), + trim($PAT['PERMALINK_AUTHORS'], '@/i'), + trim($PAT['PERMALINK_FEEDCATEGORIES'], '@/i'), + trim($PAT['PERMALINK_CATEGORIES'], '@/i'), ), implode('', $a) diff --git a/include/functions_permalinks.inc.php b/include/functions_permalinks.inc.php new file mode 100644 index 0000000..c43f786 --- /dev/null +++ b/include/functions_permalinks.inc.php @@ -0,0 +1,439 @@ + $value) { + define('PAT_' . $constant, $value); + } + + return true; + } +} + +function serendipity_searchPermalink($struct, $url, $default, $type = 'entry') { + global $serendipity; + + if (stristr($struct, '%id%') === FALSE) { + $url = preg_replace('@^(' . preg_quote($serendipity['serendipityHTTPPath'], '@') . '(' . preg_quote($serendipity['indexFile'], '@') . ')?\??(url=)?/?)([^&?]+).*@', '\4', $url); + + // If no entryid is submitted, we rely on a new DB call to fetch the permalink. + $pq = "SELECT entry_id, data + FROM {$serendipity['dbPrefix']}permalinks + WHERE permalink = '" . serendipity_db_escape_string($url) . "' + AND type = '" . serendipity_db_escape_string($type) . "' + LIMIT 1"; +// echo $pq; // DEBUG +// die($pq); // DEBUG + $permalink = serendipity_db_query($pq, true, 'both', false, false, false, true); + + if (is_array($permalink)) { + return $permalink['entry_id']; + } + } + + return $default; +} + +function serendipity_getPermalink(&$data, $type = 'entry') { + switch($type) { + case 'entry': + return serendipity_archiveURL( + $data['id'], + $data['title'], + '', + false, + array('timestamp' => $data['timestamp']) + ); + break; + + case 'category': + return serendipity_categoryURL($data, '', false); + break; + + case 'author': + return serendipity_authorURL($data, '', false); + break; + } + + return false; +} + +function serendipity_updatePermalink(&$data, $type = 'entry') { + global $serendipity; + + $link = serendipity_getPermalink($data, $type); + return(serendipity_db_query(sprintf("UPDATE {$serendipity['dbPrefix']}permalinks + SET permalink = '%s' + WHERE entry_id = %s + AND type = '%s'", + + serendipity_db_escape_string($link), + (int)$data['id'], + serendipity_db_escape_string($type)))); +} + +function serendipity_insertPermalink(&$data, $type = 'entry') { + global $serendipity; + + $link = serendipity_getPermalink($data, $type); + + switch($type) { + case 'entry': + $idfield = 'id'; + break; + + case 'author': + $idfield = 'authorid'; + break; + + case 'category': + $idfield = 'categoryid'; + break; + } + + return(serendipity_db_query(sprintf("INSERT INTO {$serendipity['dbPrefix']}permalinks + (permalink, entry_id, type) + VALUES ('%s', '%s', '%s')", + + serendipity_db_escape_string($link), + (int)$data[$idfield], + serendipity_db_escape_string($type)))); +} + +function serendipity_buildPermalinks() { + global $serendipity; + + $entries = serendipity_db_query("SELECT id, title, timestamp FROM {$serendipity['dbPrefix']}entries"); + + if (is_array($entries)) { + serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE type = 'entry'"); + + foreach($entries AS $entry) { + serendipity_insertPermalink($entry, 'entry'); + } + } + + $authors = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors"); + + if (is_array($authors)) { + serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE type = 'author'"); + + foreach($authors AS $author) { + serendipity_insertPermalink($author, 'author'); + } + } + + $categories = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}category"); + + if (is_array($categories)) { + serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE type = 'category'"); + + foreach($categories AS $category) { + serendipity_insertPermalink($category, 'category'); + } + } +} + +/* Uses logic to figure out how the URI should look, based on current rewrite rule */ +function serendipity_rewriteURL($path, $key='baseURL', $forceNone = false) { + global $serendipity; + return $serendipity[$key] . (($serendipity['rewrite'] == 'none' && !$forceNone) || ($serendipity['rewrite'] != 'none' && $forceNone) ? $serendipity['indexFile'] . '?/' : '') . $path; +} + +function serendipity_makePermalink($format, $data, $type = 'entry') { + global $serendipity; + static $entryKeys = array('%id%', '%title%', '%day%', '%month%', '%year%'); + static $authorKeys = array('%id%', '%username%', '%realname%', '%email%'); + static $categoryKeys = array('%id%', '%name%', '%description%'); + + switch($type) { + case 'entry': + if (!isset($data['entry']['timestamp']) && preg_match('@(%day%|%month%|%year%)@', $format)) { + // We need the timestamp to build the URI, but no timestamp has been submitted. Thus we need to fetch the data. + $ts = serendipity_db_query("SELECT timestamp FROM {$serendipity['dbPrefix']}entries WHERE id = " . (int)$data['id'], true); + if (is_array($ts)) { + $data['entry']['timestamp'] = $ts['timestamp']; + } else { + $data['entry']['timestamp'] = time(); + } + } + + $ts = serendipity_serverOffsetHour($data['entry']['timestamp']); + + $replacements = + array( + (int)$data['id'], + serendipity_makeFilename($data['title']), + date('d', $ts), + date('m', $ts), + date('Y', $ts) + ); + return str_replace($entryKeys, $replacements, $format); + break; + + case 'author': + $replacements = + array( + (int)$data['authorid'], + serendipity_makeFilename($data['username']), + serendipity_makeFilename($data['realname']), + serendipity_makeFilename($data['email']) + ); + return str_replace($authorKeys, $replacements, $format); + break; + + case 'category': + $replacements = + array( + (int)$data['categoryid'], + serendipity_makeFilename($data['category_name']), + serendipity_makeFilename($data['category_description']) + ); + return str_replace($categoryKeys, $replacements, $format); + break; + } + + return false; +} + +function serendipity_makePermalinkRegex($format, $type = 'entry') { + static $entryKeys = array('%id%', '%title%', '%day%', '%month%', '%year%'); + static $entryRegexValues = array('([0-9]+)', '[0-9a-z\.\_!;,\+\-]+', '[0-9]{1,2}', '[0-9]{1,2}', '[0-9]{4}'); + + static $authorKeys = array('%id%', '%username%', '%realname%', '%email%'); + static $authorRegexValues = array('([0-9]+)', '[0-9a-z\.\_!;,\+\-]+', '[0-9a-z\.\_!;,\+\-]+', '[0-9a-z\.\_!;,\+\-]+'); + + static $categoryKeys = array('%id%', '%name%', '%description%'); + static $categoryRegexValues = array('([0-9;]+)', '[0-9a-z\.\_!;,\+\-]+', '[0-9a-z\.\_!;,\+\-]+'); + + switch($type) { + case 'entry': + return str_replace($entryKeys, $entryRegexValues, preg_quote($format)); + break; + + case 'author': + return str_replace($authorKeys, $authorRegexValues, preg_quote($format)); + break; + + case 'category': + return str_replace($categoryKeys, $categoryRegexValues, preg_quote($format)); + break; + } +} + +function serendipity_archiveURL($id, $title, $key = 'baseURL', $checkrewrite = true, $entryData = null) { + global $serendipity; + $path = serendipity_makePermalink($serendipity['permalinkStructure'], array('id'=> $id, 'title' => $title, 'entry' => $entryData)); + if ($checkrewrite) { + $path = serendipity_rewriteURL($path, $key); + } + return $path; +} + +function serendipity_authorURL(&$data, $key = 'baseURL', $checkrewrite = true) { + global $serendipity; + $path = serendipity_makePermalink($serendipity['permalinkAuthorStructure'], $data, 'author'); + if ($checkrewrite) { + $path = serendipity_rewriteURL($path, $key); + } + return $path; +} + +function serendipity_categoryURL(&$data, $key = 'baseURL', $checkrewrite = true) { + global $serendipity; + $path = serendipity_makePermalink($serendipity['permalinkCategoryStructure'], $data, 'category'); + if ($checkrewrite) { + $path = serendipity_rewriteURL($path, $key); + } + return $path; +} + +function serendipity_feedCategoryURL(&$data, $key = 'baseURL', $checkrewrite = true) { + global $serendipity; + $path = serendipity_makePermalink($serendipity['permalinkFeedCategoryStructure'], $data, 'category'); + if ($checkrewrite) { + $path = serendipity_rewriteURL($path, $key); + } + return $path; +} + +function serendipity_archiveDateUrl($range, $summary=false, $key='baseURL') { + return serendipity_rewriteURL(PATH_ARCHIVES . '/' . $range . ($summary ? '/summary' : '') . '.html', $key); +} + +function serendipity_currentURL() { + global $serendipity; + + // All that URL getting humpty-dumpty is necessary to allow a user to change the template in the + // articles view. POSTing data to that page only works with mod_rewrite and not the ErrorDocument + // redirection, so we need to generate the ErrorDocument-URI here. + + $uri = parse_url($_SERVER['REQUEST_URI']); + $qst = ''; + if (!empty($uri['query'])) { + $qst = '&' . str_replace('&', '&', $uri['query']); + } + $uri['path'] = str_replace($serendipity['serendipityHTTPPath'], '', $uri['path']); + $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst; + $url = str_replace( + array( + $serendipity['indexFile'] . '&', + '"', + "'", + '<', + '>' + ), + + array( + '', + '', + '', + '' + ), + + $url); // Kill possible looped repitions and bad characters which could occur + + return $url; +} + +function serendipity_getUriArguments($uri, $wildcard = false) { +global $serendipity; + + /* Explode the path into sections, to later be able to check for arguments and add our own */ + preg_match('/^'. preg_quote($serendipity['serendipityHTTPPath'], '/') . '(' . preg_quote($serendipity['indexFile'], '/') . '\?\/)?(' . ($wildcard ? '.+' : '[;a-z0-9\-*\/%\+]+') . ')/i', $uri, $_res); + if (strlen($_res[2]) != 0) { + $args = explode('/', $_res[2]); + if ($args[0] == 'index') { + unset($args[0]); + } + return $args; + } else { + return array(); + } +} + diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index d17f307..ff30240 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -185,8 +185,6 @@ function serendipity_smarty_init() { 'head_subtitle' => $serendipity['head_subtitle'], 'head_link_stylesheet' => serendipity_rewriteURL('serendipity.css'), - 'CONST' => get_defined_constants(), - 'is_xhtml' => $serendipity['XHTML11'], 'use_popups' => $serendipity['enablePopup'], 'is_embedded' => (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) ? false : true, diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index 65aaac8..ada9757 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -847,4 +847,4 @@ class serendipity_event extends serendipity_plugin { include_once S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php'; /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/include/plugin_internal.inc.php b/include/plugin_internal.inc.php index 95dd6b4..195832d 100644 --- a/include/plugin_internal.inc.php +++ b/include/plugin_internal.inc.php @@ -130,7 +130,7 @@ class serendipity_calendar_plugin extends serendipity_plugin { serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('noCache' => false, 'noSticky' => false)); if (isset($serendipity['GET']['category'])) { - $base_query = 'C' . $categoryid; + $base_query = 'C' . $serendipity['GET']['category']; $add_query = '/' . $base_query; $querystring = "SELECT timestamp FROM {$serendipity['dbPrefix']}category c, @@ -1048,9 +1048,9 @@ class serendipity_categories_plugin extends serendipity_plugin { } if ( !empty($image) ) { - $html .= 'XML '; + $html .= 'XML '; } - $html .= ''. $cat['category_name'] .''; + $html .= ''. $cat['category_name'] .''; $html .= '' . "\n"; } } diff --git a/include/tpl/config_local.inc.php b/include/tpl/config_local.inc.php index fa52e73..6d917a9 100644 --- a/include/tpl/config_local.inc.php +++ b/include/tpl/config_local.inc.php @@ -111,6 +111,111 @@ )); + $res['permalinks'] = + array('title' => INSTALL_CAT_PERMALINKS, + 'description' => INSTALL_CAT_PERMALINKS_DESC, + 'items' => array( + array('var' => 'permalinkStructure', + 'title' => INSTALL_PERMALINK, + 'description' => INSTALL_PERMALINK_DESC, + 'type' => 'string', + 'default' => 'archives/%id%-%title%.html', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkAuthorStructure', + 'title' => INSTALL_PERMALINK_AUTHOR, + 'description' => INSTALL_PERMALINK_AUTHOR_DESC, + 'type' => 'string', + 'default' => 'authors/%id%-%realname%', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkCategoryStructure', + 'title' => INSTALL_PERMALINK_CATEGORY, + 'description' => INSTALL_PERMALINK_CATEGORY_DESC, + 'type' => 'string', + 'default' => 'categories/%id%-%name%', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkFeedCategoryStructure', + 'title' => INSTALL_PERMALINK_FEEDCATEGORY, + 'description' => INSTALL_PERMALINK_FEEDCATEGORY_DESC, + 'type' => 'string', + 'default' => 'feeds/categories/%id%-%name%.rss', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkArchivesPath', + 'title' => INSTALL_PERMALINK_ARCHIVESPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'archives', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkArchivePath', + 'title' => INSTALL_PERMALINK_ARCHIVEPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'archive', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkCategoriesPath', + 'title' => INSTALL_PERMALINK_CATEGORIESPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'categories', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkUnsubscribePath', + 'title' => INSTALL_PERMALINK_UNSUBSCRIBEPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'unsubscribe', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkDeletePath', + 'title' => INSTALL_PERMALINK_DELETEPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'delete', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkApprovePath', + 'title' => INSTALL_PERMALINK_APPROVEPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'approve', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkFeedsPath', + 'title' => INSTALL_PERMALINK_FEEDSPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'feeds', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkPluginPath', + 'title' => INSTALL_PERMALINK_PLUGINPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'plugin', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkAdminPath', + 'title' => INSTALL_PERMALINK_ADMINPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'admin', + 'flags' => array('ifEmpty')), + + array('var' => 'permalinkSearchPath', + 'title' => INSTALL_PERMALINK_SEARCHPATH, + 'description' => '', + 'type' => 'string', + 'default' => 'search', + 'flags' => array('ifEmpty')), + + ) + ); + $res['settings'] = array('title' => INSTALL_CAT_SETTINGS, 'description' => INSTALL_CAT_SETTINGS_DESC, diff --git a/include/tpl/htaccess_cgi_rewrite.tpl b/include/tpl/htaccess_cgi_rewrite.tpl index 860c2f0..603ac61 100644 --- a/include/tpl/htaccess_cgi_rewrite.tpl +++ b/include/tpl/htaccess_cgi_rewrite.tpl @@ -4,6 +4,10 @@ DirectoryIndex {PREFIX}{indexFile} RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [L,QSA] +RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [L,QSA] +RewriteRule ^({PAT_PERMALINK_FEEDCATEGORIES}) {indexFile}?/$1 [L,QSA] +RewriteRule ^({PAT_PERMALINK_CATEGORIES}) {indexFile}?/$1 [L,QSA] RewriteRule ^{PAT_ARCHIVES} {indexFile}?url=/{PATH_ARCHIVES}/$1.html [L,QSA] RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html {indexFile}?url=$1-article.html [L,NC,QSA] RewriteRule ^{PAT_FEEDS}/(.*) {indexFile}?url=/{PATH_FEEDS}/$1 [L,QSA] @@ -12,12 +16,10 @@ RewriteRule ^{PAT_APPROVE} {indexFile}?url={PATH_APPROVE}/$1/$2/$3 [L,QSA] RewriteRule ^{PAT_DELETE} {indexFile}?url={PATH_DELETE}/$1/$2/$3 [L,QSA] RewriteRule ^{PAT_ADMIN} {indexFile}?url={PATH_ADMIN}/ [L,QSA] RewriteRule ^{PAT_ARCHIVE} {indexFile}?url=/{PATH_ARCHIVE} [L,QSA] -RewriteRule ^{PAT_CATEGORIES} {indexFile}?url=/{PATH_CATEGORIES}/$1 [L,QSA] RewriteRule ^{PAT_FEED} rss.php?file=$1&ext=$2 -RewriteRule ^{PAT_PLUGIN} {indexFile}?url=plugin/$1 [L,QSA] +RewriteRule ^{PAT_PLUGIN} {indexFile}?url=$1/$2 [L,QSA] RewriteRule ^{PAT_SEARCH} {indexFile}?url=/{PATH_SEARCH}/$1 [L,QSA] RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA] -RewriteRule ^{PAT_AUTHORS} {indexFile}?url=/{PATH_AUTHORS}/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] diff --git a/include/tpl/htaccess_rewrite.tpl b/include/tpl/htaccess_rewrite.tpl index 6e863a4..cce5d1d 100644 --- a/include/tpl/htaccess_rewrite.tpl +++ b/include/tpl/htaccess_rewrite.tpl @@ -6,6 +6,10 @@ php_value register_globals off RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [L,QSA] +RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [L,QSA] +RewriteRule ^({PAT_PERMALINK_FEEDCATEGORIES}) {indexFile}?/$1 [L,QSA] +RewriteRule ^({PAT_PERMALINK_CATEGORIES}) {indexFile}?/$1 [L,QSA] RewriteRule ^{PAT_ARCHIVES} {indexFile}?url=/{PATH_ARCHIVES}/$1.html [L,QSA] RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html {indexFile}?url=$1-article.html [L,NC,QSA] RewriteRule ^{PAT_FEEDS}/(.*) {indexFile}?url=/{PATH_FEEDS}/$1 [L,QSA] @@ -14,12 +18,10 @@ RewriteRule ^{PAT_APPROVE} {indexFile}?url={PATH_APPROVE}/$1/$2/$3 [L,QSA] RewriteRule ^{PAT_DELETE} {indexFile}?url={PATH_DELETE}/$1/$2/$3 [L,QSA] RewriteRule ^{PAT_ADMIN} {indexFile}?url={PATH_ADMIN}/ [L,QSA] RewriteRule ^{PAT_ARCHIVE} {indexFile}?url=/{PATH_ARCHIVE} [L,QSA] -RewriteRule ^{PAT_CATEGORIES} {indexFile}?url=/{PATH_CATEGORIES}/$1 [L,QSA] RewriteRule ^{PAT_FEED} rss.php?file=$1&ext=$2 -RewriteRule ^{PAT_PLUGIN} {indexFile}?url=plugin/$1 [L,QSA] +RewriteRule ^{PAT_PLUGIN} {indexFile}?url=$1/$2 [L,QSA] RewriteRule ^{PAT_SEARCH} {indexFile}?url=/{PATH_SEARCH}/$1 [L,QSA] RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA] -RewriteRule ^{PAT_AUTHORS} {indexFile}?url=/{PATH_AUTHORS}/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] diff --git a/index.php b/index.php index 85d49c2..c2f1502 100644 --- a/index.php +++ b/index.php @@ -23,7 +23,6 @@ header('X-Blog: Serendipity'); // Used for installer detection ob_start(); include_once('serendipity_config.inc.php'); header('Content-Type: text/html; charset='. LANG_CHARSET); - $track_referer = true; $uri = $_SERVER['REQUEST_URI']; @@ -80,18 +79,26 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range continue; } if ($v{0} == 'C') { /* category */ - $serendipity['GET']['category'] = substr($v, 1); - unset($_args[$k]); + $cat = substr($v, 1); + if (is_numeric($cat)) { + $serendipity['GET']['category'] = $cat; + unset($_args[$k]); + } } elseif ($v{0} == 'W') { /* Week */ $week = substr($v, 1); - unset($_args[$k]); + if (is_numeric($week)) { + unset($_args[$k]); + } } elseif ($v == 'summary') { /* Summary */ $serendipity['short_archives'] = true; unset($_args[$k]); } elseif ($v{0} == 'P') { /* Page */ - $serendipity['GET']['page'] = substr($v, 1); - unset($_args[$k]); - unset($serendipity['uriArguments'][$k]); + $page = substr($v, 1); + if (is_numeric($page)) { + $serendipity['GET']['page'] = $page; + unset($_args[$k]); + unset($serendipity['uriArguments'][$k]); + } } } @@ -144,7 +151,10 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range } echo $data; -} else if (preg_match(PAT_COMMENTSUB, $uri, $matches)) { +} else if ( preg_match(PAT_COMMENTSUB, $uri, $matches) || + preg_match(PAT_PERMALINK, $uri, $matches) ) { + + $matches[1] = serendipity_searchPermalink($serendipity['permalinkStructure'], $uri, $matches[1], 'entry'); serendipity_rememberComment(); if (!empty($serendipity['POST']['submit'])) { @@ -156,7 +166,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range $comment['parent_id'] = $serendipity['POST']['replyTo']; if (!empty($comment['comment'])) { if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) { - $sc_url = $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . $serendipity['csuccess']; + $sc_url = $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true'); if (serendipity_isResponseClean($sc_url)) { header('Location: ' . $sc_url); } @@ -192,17 +202,21 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range fclose($fp); } print $data; -} elseif (preg_match(PAT_FEEDS, $uri)) { +} elseif (preg_match(PAT_FEEDS, $uri) || preg_match(PAT_PERMALINK_FEEDCATEGORIES, $uri, $matches)) { header('Content-Type: text/html; charset=utf-8'); if (preg_match('@/(index|atom|rss|comments|opml)\.(rss[0-9]?|rdf|rss|xml|atom)$@', $uri, $matches)) { list($_GET['version'], $_GET['type']) = serendipity_discover_rss($matches[1], $matches[2]); } - if (preg_match(PAT_FEEDS_CATEGORIES, $uri, $matches)) { - $_GET['category'] = $matches[1]; + if (is_array($matches)) { + $uri = preg_replace('@(' . preg_quote(PATH_FEEDS, '@') . '/)(.+)\.rss@i', '\2', $uri); + $catid = serendipity_searchPermalink($serendipity['permalinkFeedCategoryStructure'], $uri, false, 'category'); + if ($catid) { + $_GET['category'] = $catid; + } } - + ob_start(); include_once(S9Y_INCLUDE_PATH . 'rss.php'); $data = ob_get_contents(); @@ -225,53 +239,64 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range $serendipity['GET']['action'] = 'archives'; include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php'); } else if (preg_match(PAT_PLUGIN, $uri, $matches)) { - serendipity_plugin_api::hook_event('external_plugin', $matches[1]); + serendipity_plugin_api::hook_event('external_plugin', $matches[2]); exit; -} else if ($is_multicat || preg_match(PAT_CATEGORIES, $uri, $matches)) { +} else if ($is_multicat || preg_match(PAT_PERMALINK_CATEGORIES, $uri, $matches)) { if ($is_multicat) { $serendipity['GET']['category'] = implode(';', $serendipity['POST']['multiCat']); $serendipity['uriArguments'][] = PATH_CATEGORIES; $serendipity['uriArguments'][] = serendipity_db_escape_string($serendipity['GET']['category']) . '-multi'; - } else { - $serendipity['GET']['category'] = $matches[1]; + } elseif (preg_match('@/([0-9;]+)@', $uri, $multimatch)) { + $is_multicat = true; + $serendipity['GET']['category'] = $multimatch[1]; } + $serendipity['GET']['action'] = 'read'; $_args = $serendipity['uriArguments']; /* Attempt to locate hidden variables within the URI */ - foreach ($_args as $k => $v){ + foreach ($_args as $k => $v) { if ($v == PATH_CATEGORIES) { continue; } if ($v{0} == 'P') { /* Page */ - $serendipity['GET']['page'] = substr($v, 1); - unset($_args[$k]); - unset($serendipity['uriArguments'][$k]); + $page = substr($v, 1); + if (is_numeric($page)) { + $serendipity['GET']['page'] = $page; + unset($_args[$k]); + unset($serendipity['uriArguments'][$k]); + } } } + if (!$is_multicat) { + $matches[1] = serendipity_searchPermalink($serendipity['permalinkCategoryStructure'], implode('/', $_args), $matches[1], 'category'); + $serendipity['GET']['category'] = $matches[1]; + } + $cInfo = serendipity_fetchCategoryInfo($serendipity['GET']['category']); $serendipity['head_title'] = $cInfo['category_name']; $serendipity['head_subtitle'] = $serendipity['blogTitle']; include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php'); -} else if (preg_match(PAT_AUTHORS, $uri, $matches)) { +} else if (preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) { $_args = $serendipity['uriArguments']; /* Attempt to locate hidden variables within the URI */ foreach ($_args as $k => $v){ - if ($v == PATH_AUTHORS) { - continue; - } if ($v{0} == 'P') { /* Page */ - $serendipity['GET']['page'] = substr($v, 1); - unset($_args[$k]); - unset($serendipity['uriArguments'][$k]); + $page = substr($v, 1); + if (is_numeric($page)) { + $serendipity['GET']['page'] = $page; + unset($_args[$k]); + unset($serendipity['uriArguments'][$k]); + } } } + $matches[1] = serendipity_searchPermalink($serendipity['permalinkAuthorStructure'], implode('/', $serendipity['uriArguments']), $matches[1], 'author'); $serendipity['GET']['viewAuthor'] = $matches[1]; $serendipity['GET']['action'] = 'read'; @@ -291,9 +316,12 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range } if ($v{0} == 'P') { /* Page */ - $serendipity['GET']['page'] = substr($v, 1); - unset($_args[$k]); - unset($serendipity['uriArguments'][$k]); + $page = substr($v, 1); + if (is_numeric($page)) { + $serendipity['GET']['page'] = $page; + unset($_args[$k]); + unset($serendipity['uriArguments'][$k]); + } } else { $search[] = $v; } diff --git a/lang/serendipity_lang_bg.inc.php b/lang/serendipity_lang_bg.inc.php index 869c419..e9e6af3 100644 --- a/lang/serendipity_lang_bg.inc.php +++ b/lang/serendipity_lang_bg.inc.php @@ -656,6 +656,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_cn.inc.php b/lang/serendipity_lang_cn.inc.php index de6bf39..afc1037 100644 --- a/lang/serendipity_lang_cn.inc.php +++ b/lang/serendipity_lang_cn.inc.php @@ -670,6 +670,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_cs.inc.php b/lang/serendipity_lang_cs.inc.php index e283ee1..4590b8b 100644 --- a/lang/serendipity_lang_cs.inc.php +++ b/lang/serendipity_lang_cs.inc.php @@ -672,6 +672,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/lang/serendipity_lang_cz.inc.php b/lang/serendipity_lang_cz.inc.php index f9add4c..6231ad0 100644 --- a/lang/serendipity_lang_cz.inc.php +++ b/lang/serendipity_lang_cz.inc.php @@ -672,6 +672,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/lang/serendipity_lang_da.inc.php b/lang/serendipity_lang_da.inc.php index f134ee7..71b98e9 100644 --- a/lang/serendipity_lang_da.inc.php +++ b/lang/serendipity_lang_da.inc.php @@ -672,6 +672,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ ?> diff --git a/lang/serendipity_lang_de.inc.php b/lang/serendipity_lang_de.inc.php index 2979ddd..83f8b8a 100644 --- a/lang/serendipity_lang_de.inc.php +++ b/lang/serendipity_lang_de.inc.php @@ -671,6 +671,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_en.inc.php b/lang/serendipity_lang_en.inc.php index bb8e7bf..cc46ad9 100644 --- a/lang/serendipity_lang_en.inc.php +++ b/lang/serendipity_lang_en.inc.php @@ -669,6 +669,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_es.inc.php b/lang/serendipity_lang_es.inc.php index 0b7c4a4..00cc769 100644 --- a/lang/serendipity_lang_es.inc.php +++ b/lang/serendipity_lang_es.inc.php @@ -674,6 +674,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/lang/serendipity_lang_fa.inc.php b/lang/serendipity_lang_fa.inc.php index 39ebed5..2bb4b6f 100644 --- a/lang/serendipity_lang_fa.inc.php +++ b/lang/serendipity_lang_fa.inc.php @@ -671,6 +671,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_fi.inc.php b/lang/serendipity_lang_fi.inc.php index 6fc6466..12a6c6e 100644 --- a/lang/serendipity_lang_fi.inc.php +++ b/lang/serendipity_lang_fi.inc.php @@ -669,6 +669,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_fr.inc.php b/lang/serendipity_lang_fr.inc.php index aa9be6c..098ba95 100644 --- a/lang/serendipity_lang_fr.inc.php +++ b/lang/serendipity_lang_fr.inc.php @@ -677,6 +677,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Permetre aux visiteurs d\'afficher plusieurs catégories à la fois?'); @define('CATEGORIES_ALLOW_SELECT_DESC', 'Si cette option est autorisée, une case à cocher sera positionnée à coté de chaque catégorie dans le plugin de la barre latérale. Les utilisateurs pourront ainsi cocher ces cases et ainsi visualiser les entrées correspondantes.'); @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); // Translate +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/lang/serendipity_lang_is.inc.php b/lang/serendipity_lang_is.inc.php index 8a9b89e..25c0adb 100644 --- a/lang/serendipity_lang_is.inc.php +++ b/lang/serendipity_lang_is.inc.php @@ -669,6 +669,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_it.inc.php b/lang/serendipity_lang_it.inc.php index 16423d7..4737900 100644 --- a/lang/serendipity_lang_it.inc.php +++ b/lang/serendipity_lang_it.inc.php @@ -671,6 +671,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_ja.inc.php b/lang/serendipity_lang_ja.inc.php index 7bcb19e..563b84e 100644 --- a/lang/serendipity_lang_ja.inc.php +++ b/lang/serendipity_lang_ja.inc.php @@ -671,6 +671,26 @@ Serendipity のアップグレードステージを無視しました。正し @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ ?> diff --git a/lang/serendipity_lang_ko.inc.php b/lang/serendipity_lang_ko.inc.php index 72305f7..2bd8a0b 100644 --- a/lang/serendipity_lang_ko.inc.php +++ b/lang/serendipity_lang_ko.inc.php @@ -674,6 +674,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_nl.inc.php b/lang/serendipity_lang_nl.inc.php index 701c923..5cd4f57 100644 --- a/lang/serendipity_lang_nl.inc.php +++ b/lang/serendipity_lang_nl.inc.php @@ -673,6 +673,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_no.inc.php b/lang/serendipity_lang_no.inc.php index 07d97b7..d6d72cf 100644 --- a/lang/serendipity_lang_no.inc.php +++ b/lang/serendipity_lang_no.inc.php @@ -672,5 +672,25 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_pt.inc.php b/lang/serendipity_lang_pt.inc.php index 19f4695..8e7dfa7 100644 --- a/lang/serendipity_lang_pt.inc.php +++ b/lang/serendipity_lang_pt.inc.php @@ -672,6 +672,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_ro.inc.php b/lang/serendipity_lang_ro.inc.php index c21fac9..80a3f13 100644 --- a/lang/serendipity_lang_ro.inc.php +++ b/lang/serendipity_lang_ro.inc.php @@ -669,6 +669,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_ru.inc.php b/lang/serendipity_lang_ru.inc.php index b9f7cb7..27da55b 100644 --- a/lang/serendipity_lang_ru.inc.php +++ b/lang/serendipity_lang_ru.inc.php @@ -672,6 +672,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_tn.inc.php b/lang/serendipity_lang_tn.inc.php index ff2f54b..cdb9762 100644 --- a/lang/serendipity_lang_tn.inc.php +++ b/lang/serendipity_lang_tn.inc.php @@ -670,6 +670,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_tw.inc.php b/lang/serendipity_lang_tw.inc.php index 339faad..da59212 100644 --- a/lang/serendipity_lang_tw.inc.php +++ b/lang/serendipity_lang_tw.inc.php @@ -670,6 +670,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/lang/serendipity_lang_zh.inc.php b/lang/serendipity_lang_zh.inc.php index 0ac6a7e..3b95c73 100644 --- a/lang/serendipity_lang_zh.inc.php +++ b/lang/serendipity_lang_zh.inc.php @@ -670,6 +670,26 @@ @define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate @define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate @define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.'); +@define('INSTALL_CAT_PERMALINKS', 'Permalinks'); +@define('INSTALL_CAT_PERMALINKS_DESC', 'Defines various URL patterns to define permanent links in your blog. It is suggested that you use the defaults; if not, you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.'); +@define('INSTALL_PERMALINK', 'Permalink Entry URL structure'); +@define('INSTALL_PERMALINK_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries may become available. You can use the variables %id%, %title%, %day%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_AUTHOR', 'Permalink Author URL structure'); +@define('INSTALL_PERMALINK_AUTHOR_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain authors may become available. You can use the variables %id%, %realname%, %username%, %email% and any other characters.'); +@define('INSTALL_PERMALINK_CATEGORY', 'Permalink Category URL structure'); +@define('INSTALL_PERMALINK_CATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.'); +@define('INSTALL_PERMALINK_FEEDCATEGORY', 'Permalink RSS-Feed Category URL structure'); +@define('INSTALL_PERMALINK_FEEDCATEGORY_DESC', 'Here you can define the relative URL structure begining from your base URL to where RSS-feeds frmo certain categories may become available. You can use the variables %id%, %name%, %description% and any other characters.'); +@define('INSTALL_PERMALINK_ARCHIVESPATH', 'Path to archives'); +@define('INSTALL_PERMALINK_ARCHIVEPATH', 'Path to archive'); +@define('INSTALL_PERMALINK_CATEGORIESPATH', 'Path to categories'); +@define('INSTALL_PERMALINK_UNSUBSCRIBEPATH', 'Path to unsubscribe comments'); +@define('INSTALL_PERMALINK_DELETEPATH', 'Path to delete comments'); +@define('INSTALL_PERMALINK_APPROVEPATH', 'Path to approve comments'); +@define('INSTALL_PERMALINK_FEEDSPATH', 'Path to RSS Feeds'); +@define('INSTALL_PERMALINK_PLUGINPATH', 'Path to single plugin'); +@define('INSTALL_PERMALINK_ADMINPATH', 'Path to admin'); +@define('INSTALL_PERMALINK_SEARCHPATH', 'Path to search'); /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> diff --git a/plugins/serendipity_event_karma/serendipity_event_karma.php b/plugins/serendipity_event_karma/serendipity_event_karma.php index 08a9625..b64a88f 100644 --- a/plugins/serendipity_event_karma/serendipity_event_karma.php +++ b/plugins/serendipity_event_karma/serendipity_event_karma.php @@ -115,7 +115,7 @@ class serendipity_event_karma extends serendipity_event $propbag->add('description', PLUGIN_KARMA_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', PLUGIN_KARMA_VERSION); + $propbag->add('version', '1.4'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -260,7 +260,7 @@ class serendipity_event_karma extends serendipity_event } else { $entryid = false; } - + if ($entryid) { $track_clicks = serendipity_db_bool($this->get_config('visits_active', true)); if ($track_clicks) { @@ -434,6 +434,7 @@ class serendipity_event_karma extends serendipity_event foreach($sql AS $key => $rows) { $q = "SELECT e.id, e.title, + e.timestamp, SUM(k.{$rows[0]}) AS no FROM {$serendipity['dbPrefix']}karma AS k @@ -450,7 +451,7 @@ class serendipity_event_karma extends serendipity_event if (is_array($sql_rows)) { foreach($sql_rows AS $id => $row) { ?> -
+
add('description', PLUGIN_EVENT_LIVESEARCH_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Christian Stocker, Garvin Hicking'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -149,7 +149,7 @@ class serendipity_event_livesearch extends serendipity_event echo ''; echo '
'; foreach($res AS $id => $entry) { - echo ''; + echo ''; } echo '
'; } diff --git a/plugins/serendipity_event_mailer/serendipity_event_mailer.php b/plugins/serendipity_event_mailer/serendipity_event_mailer.php index 45c0690..d353e73 100644 --- a/plugins/serendipity_event_mailer/serendipity_event_mailer.php +++ b/plugins/serendipity_event_mailer/serendipity_event_mailer.php @@ -44,7 +44,7 @@ class serendipity_event_mailer extends serendipity_event $propbag->add('description', PLUGIN_EVENT_MAILER_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Sebastian Nohn, Kristian Köhntopp, Garvin Hicking'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -113,7 +113,7 @@ class serendipity_event_mailer extends serendipity_event } if (serendipity_db_bool($this->get_config('includelink', false)) == true) { - $mail['body'] = serendipity_archiveURL($eventData['id'], $eventData['title']) . "\n\n" . $mail['body']; + $mail['body'] = serendipity_archiveURL($eventData['id'], $eventData['title'], 'baseURL', true, array('timestamp' => $eventData['timestamp'])) . "\n\n" . $mail['body']; } serendipity_sendMail($mail['to'], $mail['subject'], $mail['body'], $mail['from']); diff --git a/plugins/serendipity_event_statistics/serendipity_event_statistics.php b/plugins/serendipity_event_statistics/serendipity_event_statistics.php index 8f43c14..4bce669 100644 --- a/plugins/serendipity_event_statistics/serendipity_event_statistics.php +++ b/plugins/serendipity_event_statistics/serendipity_event_statistics.php @@ -129,7 +129,7 @@ class serendipity_event_statistics extends serendipity_event $propbag->add('description', PLUGIN_EVENT_STATISTICS_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -203,7 +203,7 @@ class serendipity_event_statistics extends serendipity_event $image_rows = serendipity_db_query("SELECT extension, count(id) AS images FROM {$serendipity['dbPrefix']}images GROUP BY extension ORDER BY images DESC"); $subscriber_count = count(serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'NORMAL' AND subscribed = 'true' GROUP BY email")); - $subscriber_rows = serendipity_db_query("SELECT e.id, e.title, count(c.id) as postings + $subscriber_rows = serendipity_db_query("SELECT e.timestamp, e.id, e.title, count(c.id) as postings FROM {$serendipity['dbPrefix']}comments c, {$serendipity['dbPrefix']}entries e WHERE e.id = c.entry_id AND type = 'NORMAL' AND subscribed = 'true' @@ -212,7 +212,7 @@ class serendipity_event_statistics extends serendipity_event LIMIT $max_items"); $comment_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'NORMAL'", true); - $comment_rows = serendipity_db_query("SELECT e.id, e.title, count(c.id) as postings + $comment_rows = serendipity_db_query("SELECT e.timestamp, e.id, e.title, count(c.id) as postings FROM {$serendipity['dbPrefix']}comments c, {$serendipity['dbPrefix']}entries e WHERE e.id = c.entry_id AND type = 'NORMAL' @@ -228,7 +228,7 @@ class serendipity_event_statistics extends serendipity_event LIMIT $max_items"); $tb_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'TRACKBACK'", true); - $tb_rows = serendipity_db_query("SELECT e.id, e.title, count(c.id) as postings + $tb_rows = serendipity_db_query("SELECT e.timestamp, e.id, e.title, count(c.id) as postings FROM {$serendipity['dbPrefix']}comments c, {$serendipity['dbPrefix']}entries e WHERE e.id = c.entry_id AND type = 'TRACKBACK' @@ -326,7 +326,7 @@ class serendipity_event_statistics extends serendipity_event if (is_array($comment_rows)) { foreach($comment_rows AS $comment => $com_stat) { ?> -
+
$subscriber_stat) { ?> -
+
$tb_stat) { ?> -
+
$length_stat) { ?> -
+
add('description', PLUGIN_COMMENTS_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -133,6 +133,7 @@ class serendipity_plugin_comments extends serendipity_plugin c.timestamp AS stamp, c.author AS user, e.title AS subject, + e.timestamp AS entrystamp, e.id AS entry_id, c.id AS comment_id, c.type AS comment_type, @@ -171,7 +172,7 @@ class serendipity_plugin_comments extends serendipity_plugin PLUGIN_COMMENTS_ABOUT, $user, - ' ' + ' ' . htmlspecialchars($row['subject']) . '
' . "\n" . htmlspecialchars(serendipity_strftime($dateformat, $row['stamp'])) . '
' . "\n" diff --git a/plugins/serendipity_plugin_history/serendipity_plugin_history.php b/plugins/serendipity_plugin_history/serendipity_plugin_history.php index 833bd62..77ba1e2 100644 --- a/plugins/serendipity_plugin_history/serendipity_plugin_history.php +++ b/plugins/serendipity_plugin_history/serendipity_plugin_history.php @@ -75,7 +75,7 @@ class serendipity_plugin_history extends serendipity_plugin $propbag->add('description', PLUGIN_HISTORY_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Jannis Hermanns'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -225,7 +225,9 @@ class serendipity_plugin_history extends serendipity_plugin for($x=0; $x < $e_c; $x++) { $url = serendipity_archiveURL($e[$x]['id'], $e[$x]['title'], - 'serendipityHTTPPath' + 'serendipityHTTPPath', + true, + array('timestamp' => $e[$x]['timestamp']) ); $date = ($displaydate=='0') ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']); $t = ($maxlength==0 || strlen($e[$x]['title'])<=$maxlength) ? diff --git a/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php b/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php index aa729b9..265f3ca 100644 --- a/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php +++ b/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php @@ -44,7 +44,7 @@ class serendipity_plugin_recententries extends serendipity_plugin { $propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Christian Machmeier'); - $propbag->add('version', '1.2'); + $propbag->add('version', '1.3'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -171,7 +171,9 @@ class serendipity_plugin_recententries extends serendipity_plugin { $entryLink = serendipity_archiveURL( $entry['id'], $entry['title'], - 'serendipityHTTPPath' + 'serendipityHTTPPath', + true, + array('timestamp' => $entry['timestamp']) ); echo '' . $entry['title'] . '
' diff --git a/serendipity_admin.php b/serendipity_admin.php index 56a3e83..6ed3f47 100644 --- a/serendipity_admin.php +++ b/serendipity_admin.php @@ -9,6 +9,7 @@ include('serendipity_config.inc.php'); header('Content-Type: text/html; charset=' . LANG_CHARSET); if (IS_installed === false) { + require_once(S9Y_INCLUDE_PATH . 'include/functions_permalinks.inc.php'); require_once(S9Y_INCLUDE_PATH . 'include/functions_installer.inc.php'); require_once S9Y_INCLUDE_PATH . 'include/functions_config.inc.php'; $css_file = 'serendipity.css.php?serendipity[css_mode]=serendipity_admin.css'; diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index 6b3242d..79144fc 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -21,7 +21,7 @@ if (IS_installed === true && !defined('IN_serendipity')) { include_once(S9Y_INCLUDE_PATH . 'include/compat.inc.php'); // The version string -$serendipity['version'] = '0.9-alpha1'; +$serendipity['version'] = '0.9-alpha2'; // Name of folder for the default theme $serendipity['defaultTemplate'] = 'default'; @@ -100,53 +100,7 @@ $serendipity['languages'] = array('en' => 'English', */ include($serendipity['serendipityPath'] . 'include/lang.inc.php'); -/* URI paths - * These could be defined in the language headers, except that would break - * backwards URL compatibility - */ -@define('PATH_ARCHIVES', 'archives'); -@define('PATH_ARCHIVE', 'archive'); -@define('PATH_AUTHORS', 'authors'); -@define('PATH_UNSUBSCRIBE', 'unsubscribe'); -@define('PATH_DELETE', 'delete'); -@define('PATH_APPROVE', 'approve'); -@define('PATH_FEEDS', 'feeds'); -@define('PATH_CATEGORIES', 'categories'); -@define('PATH_PLUGIN', 'plugin'); -@define('PATH_ADMIN', 'admin'); -@define('PATH_ENTRIES', 'entries'); -@define('PATH_SEARCH', 'search'); @define('PATH_SMARTY_COMPILE', 'templates_c'); // will be placed inside the template directory - -/* Changing this is NOT recommended, rewrite rules does not take them into account - yet */ -@define('PERM_ARCHIVES', '%id%-%title%.html'); -@define('PERM_CATEGORIES', '%id%-%title%'); -@define('PERM_AUTHORS', '%id%-%title%'); -@define('PERM_FEEDS_CATEGORIES', '%id%-%title%.rss'); - -/* URI patterns - * Note that it's important to use @ as the pattern delimiter. DO NOT use shortcuts - * like \d or \s, since mod_rewrite will use the regexps as well and chokes on them. - * If you add new patterns, remember to add the new rules to the *.tpl files and - * function serendipity_installFiles(). - */ -@define('PAT_FILENAME', '0-9a-z\.\_!;,\+\-'); -@define('PAT_UNSUBSCRIBE', '@/'.PATH_UNSUBSCRIBE.'/(.*)/([0-9]+)@'); -@define('PAT_APPROVE', '@/'.PATH_APPROVE.'/(.*)/(.*)/([0-9]+)@'); -@define('PAT_DELETE', '@/'.PATH_DELETE.'/(.*)/(.*)/([0-9]+)@'); -@define('PAT_ARCHIVES', '@/'.PATH_ARCHIVES.'([/A-Za-z0-9]+)\.html@'); -@define('PAT_AUTHORS', '@/'.PATH_AUTHORS.'/([0-9]+)@'); -@define('PAT_COMMENTSUB', '@/([0-9]+)[_\-][' . PAT_FILENAME . ']*\.html@i'); -@define('PAT_FEEDS', '@/'.PATH_FEEDS.'/@'); -@define('PAT_FEEDS_CATEGORIES', '@/'.PATH_FEEDS.'\/'. PATH_CATEGORIES .'/([0-9;]+)@'); -@define('PAT_FEED', '@/(index|atom|rss|b2rss|b2rdf).(rss|rdf|rss2|xml)$@'); -@define('PAT_ADMIN', '@/(' . PATH_ADMIN . '|'. PATH_ENTRIES .')(/.+)?@'); -@define('PAT_ARCHIVE', '@/'.PATH_ARCHIVE.'$@'); -@define('PAT_CATEGORIES', '@/'.PATH_CATEGORIES.'/([0-9;]+)@'); -@define('PAT_PLUGIN', '@/' . PATH_PLUGIN . '/(.*)@'); -@define('PAT_SEARCH', '@/' . PATH_SEARCH . '/(.*)@'); -@define('PAT_CSS', '@/(serendipity\.css|serendipity_admin\.css)@'); - @define('USERLEVEL_ADMIN', 255); @define('USERLEVEL_CHIEF', 1); @define('USERLEVEL_EDITOR', 0); @@ -227,6 +181,92 @@ if (empty($serendipity['serendipityHTTPPath'])) { $serendipity['serendipityHTTPPath'] = '/'; } +/* Changing this is NOT recommended, rewrite rules does not take them into account - yet */ +if (!isset($serendipity['permalinkStructure'])) { + $serendipity['permalinkStructure'] = 'archives/%id%-%title%.html'; +} + +if (!isset($serendipity['permalinkFeedCategoryStructure'])) { + $serendipity['permalinkFeedCategoryStructure'] = 'feeds/categories/%id%-%name%.rss'; +} + +if (!isset($serendipity['permalinkCategoryStructure'])) { + $serendipity['permalinkCategoryStructure'] = 'categories/%id%-%name%'; +} + +if (!isset($serendipity['permalinkAuthorStructure'])) { + $serendipity['permalinkAuthorStructure'] = 'authors/%id%-%realname%'; +} + +if (!isset($serendipity['permalinkArchivesPath'])) { + $serendipity['permalinkArchivesPath'] = 'archives'; +} + +if (!isset($serendipity['permalinkArchivePath'])) { + $serendipity['permalinkArchivePath'] = 'archive'; +} + +if (!isset($serendipity['permalinkCategoriesPath'])) { + $serendipity['permalinkCategoriesPath'] = 'categories'; +} + +if (!isset($serendipity['permalinkUnsubscribePath'])) { + $serendipity['permalinkUnsubscribePath'] = 'unsubscribe'; +} + +if (!isset($serendipity['permalinkDeletePath'])) { + $serendipity['permalinkDeletePath'] = 'delete'; +} + +if (!isset($serendipity['permalinkApprovePath'])) { + $serendipity['permalinkApprovePath'] = 'approve'; +} + +if (!isset($serendipity['permalinkFeedsPath'])) { + $serendipity['permalinkFeedsPath'] = 'feeds'; +} + +if (!isset($serendipity['permalinkPluginPath'])) { + $serendipity['permalinkPluginPath'] = 'plugin'; +} + +if (!isset($serendipity['permalinkAdminPath'])) { + $serendipity['permalinkAdminPath'] = 'admin'; +} + +if (!isset($serendipity['permalinkSearchPath'])) { + $serendipity['permalinkSearchPath'] = 'search'; +} + +/* URI paths + * These could be defined in the language headers, except that would break + * backwards URL compatibility + */ +@define('PATH_ARCHIVES', $serendipity['permalinkArchivesPath']); +@define('PATH_ARCHIVE', $serendipity['permalinkArchivePath']); +@define('PATH_CATEGORIES', $serendipity['permalinkCategoriesPath']); +@define('PATH_UNSUBSCRIBE', $serendipity['permalinkUnsubscribePath']); +@define('PATH_DELETE', $serendipity['permalinkDeletePath']); +@define('PATH_APPROVE', $serendipity['permalinkApprovePath']); +@define('PATH_FEEDS', $serendipity['permalinkFeedsPath']); +@define('PATH_PLUGIN', $serendipity['permalinkPluginPath']); +@define('PATH_ADMIN', $serendipity['permalinkAdminPath']); +@define('PATH_SEARCH', $serendipity['permalinkSearchPath']); + +/* URI patterns + * Note that it's important to use @ as the pattern delimiter. DO NOT use shortcuts + * like \d or \s, since mod_rewrite will use the regexps as well and chokes on them. + * If you add new patterns, remember to add the new rules to the *.tpl files and + * function serendipity_installFiles(). + */ +@define('PAT_FILENAME', '0-9a-z\.\_!;,\+\-'); +@define('PAT_CSS', '@/(serendipity\.css|serendipity_admin\.css)@'); +@define('PAT_FEED', '@/(index|atom|rss|b2rss|b2rdf).(rss|rdf|rss2|xml)$@'); +@define('PAT_COMMENTSUB', '@/([0-9]+)[_\-][' . PAT_FILENAME . ']*\.html@i'); + +// Apply constants/definitions from custom permalinks +serendipity_permalinkPatterns(); + /* * Load main language file again, because now we have the preferred language */ diff --git a/sql/db.sql b/sql/db.sql index f294162..85f684f 100644 --- a/sql/db.sql +++ b/sql/db.sql @@ -44,6 +44,11 @@ create table {PREFIX}comments ( referer varchar(200) default null ); +CREATE INDEX commentry_idx ON {PREFIX}comments (entry_id); +CREATE INDEX commpentry_idx ON {PREFIX}comments (parent_id); +CREATE INDEX commtype_idx ON {PREFIX}comments (type); +CREATE INDEX commstat_idx ON {PREFIX}comments (status); + # # table structure for table '{PREFIX}entries' # @@ -69,6 +74,8 @@ create table {PREFIX}entries ( CREATE {FULLTEXT_MYSQL} INDEX entry_idx on {PREFIX}entries (title,body,extended); CREATE INDEX date_idx ON {PREFIX}entries (timestamp); CREATE INDEX mod_idx ON {PREFIX}entries (last_modified); +CREATE INDEX edraft_idx ON {PREFIX}entries (isdraft); +CREATE INDEX eauthor_idx ON {PREFIX}entries (authorid); # # table structure for table '{PREFIX}references' @@ -81,6 +88,8 @@ create table {PREFIX}references ( name text ); +CREATE INDEX refentry_idx ON {PREFIX}references (entry_id); + # # Table structure for table '{PREFIX}exits' # @@ -97,6 +106,8 @@ CREATE TABLE {PREFIX}exits ( PRIMARY KEY (host,day,entry_id) ); +CREATE INDEX exits_idx ON {PREFIX}exits (entry_id,day); + # # Table structure for table '{PREFIX}referrers' # @@ -113,6 +124,8 @@ CREATE TABLE {PREFIX}referrers ( PRIMARY KEY (host,day,entry_id) ); +CREATE INDEX referrers_idx ON {PREFIX}referrers (entry_id,day); + # # Table structure for table 'serendipity_config' # @@ -136,6 +149,7 @@ CREATE TABLE {PREFIX}suppress ( ); CREATE INDEX url_idx on {PREFIX}suppress (host, ip); +CREATE INDEX urllast_idx on {PREFIX}suppress (last); CREATE TABLE {PREFIX}plugins ( name varchar(128) not null, @@ -147,6 +161,7 @@ CREATE TABLE {PREFIX}plugins ( ); CREATE INDEX pluginauthorid_idx ON {PREFIX}plugins (authorid); +CREATE INDEX pluginplace_idx ON {PREFIX}plugins (placement); CREATE TABLE {PREFIX}category ( categoryid {AUTOINCREMENT} {PRIMARY}, @@ -159,6 +174,10 @@ CREATE TABLE {PREFIX}category ( parentid int(11) DEFAULT '0' NOT NULL ); +CREATE INDEX categorya_idx ON {PREFIX}category (authorid); +CREATE INDEX categoryp_idx ON {PREFIX}category (parentid); +CREATE INDEX categorylr_idx ON {PREFIX}category (category_left, category_right); + CREATE TABLE {PREFIX}images ( id {AUTOINCREMENT} {PRIMARY}, name varchar(255) not null default '', @@ -192,3 +211,15 @@ create table {PREFIX}entryproperties ( CREATE INDEX entrypropid_idx ON {PREFIX}entryproperties (entryid); CREATE UNIQUE INDEX prop_idx ON {PREFIX}entryproperties (entryid, property); + +CREATE TABLE {PREFIX}permalinks ( + permalink varchar(255) not null default '', + entry_id int(10) {UNSIGNED} not null default '0', + type varchar(255) not null default '', + data text +); + +CREATE INDEX pl_idx ON {PREFIX}permalinks (permalink); +CREATE INDEX ple_idx ON {PREFIX}permalinks (entry_id); +CREATE INDEX plt_idx ON {PREFIX}permalinks (type); +CREATE INDEX plcomb_idx ON {PREFIX}permalinks (permalink, type); diff --git a/sql/db_update_0.9-alpha1_0.9-alpha2_mysql.sql b/sql/db_update_0.9-alpha1_0.9-alpha2_mysql.sql new file mode 100644 index 0000000..235efac --- /dev/null +++ b/sql/db_update_0.9-alpha1_0.9-alpha2_mysql.sql @@ -0,0 +1,31 @@ +CREATE TABLE {PREFIX}permalinks ( + permalink varchar(255) not null default '', + entry_id int(10) {UNSIGNED} not null default '0', + type varchar(255) not null default '', + data text +); + +CREATE INDEX pl_idx ON {PREFIX}permalinks (permalink); +CREATE INDEX ple_idx ON {PREFIX}permalinks (entry_id); +CREATE INDEX plt_idx ON {PREFIX}permalinks (type); +CREATE INDEX plcomb_idx ON {PREFIX}permalinks (permalink, type); + +CREATE INDEX commentry_idx ON {PREFIX}comments (entry_id); +CREATE INDEX commpentry_idx ON {PREFIX}comments (parent_id); +CREATE INDEX commtype_idx ON {PREFIX}comments (type); +CREATE INDEX commstat_idx ON {PREFIX}comments (status); + +CREATE INDEX edraft_idx ON {PREFIX}entries (isdraft); +CREATE INDEX eauthor_idx ON {PREFIX}entries (authorid); + +CREATE INDEX refentry_idx ON {PREFIX}references (entry_id); + +CREATE INDEX exits_idx ON {PREFIX}exits (entry_id,day); + +CREATE INDEX referrers_idx ON {PREFIX}referrers (entry_id,day); +CREATE INDEX urllast_idx on {PREFIX}suppress (last); +CREATE INDEX pluginplace_idx ON {PREFIX}plugins (placement); + +CREATE INDEX categorya_idx ON {PREFIX}category (authorid); +CREATE INDEX categoryp_idx ON {PREFIX}category (parentid); +CREATE INDEX categorylr_idx ON {PREFIX}category (category_left, category_right); diff --git a/sql/db_update_0.9-alpha1_0.9-alpha2_postgres.sql b/sql/db_update_0.9-alpha1_0.9-alpha2_postgres.sql new file mode 100644 index 0000000..235efac --- /dev/null +++ b/sql/db_update_0.9-alpha1_0.9-alpha2_postgres.sql @@ -0,0 +1,31 @@ +CREATE TABLE {PREFIX}permalinks ( + permalink varchar(255) not null default '', + entry_id int(10) {UNSIGNED} not null default '0', + type varchar(255) not null default '', + data text +); + +CREATE INDEX pl_idx ON {PREFIX}permalinks (permalink); +CREATE INDEX ple_idx ON {PREFIX}permalinks (entry_id); +CREATE INDEX plt_idx ON {PREFIX}permalinks (type); +CREATE INDEX plcomb_idx ON {PREFIX}permalinks (permalink, type); + +CREATE INDEX commentry_idx ON {PREFIX}comments (entry_id); +CREATE INDEX commpentry_idx ON {PREFIX}comments (parent_id); +CREATE INDEX commtype_idx ON {PREFIX}comments (type); +CREATE INDEX commstat_idx ON {PREFIX}comments (status); + +CREATE INDEX edraft_idx ON {PREFIX}entries (isdraft); +CREATE INDEX eauthor_idx ON {PREFIX}entries (authorid); + +CREATE INDEX refentry_idx ON {PREFIX}references (entry_id); + +CREATE INDEX exits_idx ON {PREFIX}exits (entry_id,day); + +CREATE INDEX referrers_idx ON {PREFIX}referrers (entry_id,day); +CREATE INDEX urllast_idx on {PREFIX}suppress (last); +CREATE INDEX pluginplace_idx ON {PREFIX}plugins (placement); + +CREATE INDEX categorya_idx ON {PREFIX}category (authorid); +CREATE INDEX categoryp_idx ON {PREFIX}category (parentid); +CREATE INDEX categorylr_idx ON {PREFIX}category (category_left, category_right); diff --git a/sql/db_update_0.9-alpha1_0.9-alpha2_sqlite.sql b/sql/db_update_0.9-alpha1_0.9-alpha2_sqlite.sql new file mode 100644 index 0000000..235efac --- /dev/null +++ b/sql/db_update_0.9-alpha1_0.9-alpha2_sqlite.sql @@ -0,0 +1,31 @@ +CREATE TABLE {PREFIX}permalinks ( + permalink varchar(255) not null default '', + entry_id int(10) {UNSIGNED} not null default '0', + type varchar(255) not null default '', + data text +); + +CREATE INDEX pl_idx ON {PREFIX}permalinks (permalink); +CREATE INDEX ple_idx ON {PREFIX}permalinks (entry_id); +CREATE INDEX plt_idx ON {PREFIX}permalinks (type); +CREATE INDEX plcomb_idx ON {PREFIX}permalinks (permalink, type); + +CREATE INDEX commentry_idx ON {PREFIX}comments (entry_id); +CREATE INDEX commpentry_idx ON {PREFIX}comments (parent_id); +CREATE INDEX commtype_idx ON {PREFIX}comments (type); +CREATE INDEX commstat_idx ON {PREFIX}comments (status); + +CREATE INDEX edraft_idx ON {PREFIX}entries (isdraft); +CREATE INDEX eauthor_idx ON {PREFIX}entries (authorid); + +CREATE INDEX refentry_idx ON {PREFIX}references (entry_id); + +CREATE INDEX exits_idx ON {PREFIX}exits (entry_id,day); + +CREATE INDEX referrers_idx ON {PREFIX}referrers (entry_id,day); +CREATE INDEX urllast_idx on {PREFIX}suppress (last); +CREATE INDEX pluginplace_idx ON {PREFIX}plugins (placement); + +CREATE INDEX categorya_idx ON {PREFIX}category (authorid); +CREATE INDEX categoryp_idx ON {PREFIX}category (parentid); +CREATE INDEX categorylr_idx ON {PREFIX}category (category_left, category_right);