]> git.mjollnir.org Git - s9y.git/commitdiff
Major update, commit custom permalink patch and some DB updates.
authorgarvinhicking <garvinhicking>
Sun, 22 May 2005 15:37:11 +0000 (15:37 +0000)
committergarvinhicking <garvinhicking>
Sun, 22 May 2005 15:37:11 +0000 (15:37 +0000)
Please report any updates, as from now "alpha" means "alpha". :)

54 files changed:
comment.php
docs/NEWS
include/admin/category.inc.php
include/admin/configuration.inc.php
include/admin/upgrader.inc.php
include/admin/users.inc.php
include/functions.inc.php
include/functions_config.inc.php
include/functions_entries.inc.php
include/functions_installer.inc.php
include/functions_permalinks.inc.php [new file with mode: 0644]
include/functions_smarty.inc.php
include/plugin_api.inc.php
include/plugin_internal.inc.php
include/tpl/config_local.inc.php
include/tpl/htaccess_cgi_rewrite.tpl
include/tpl/htaccess_rewrite.tpl
index.php
lang/serendipity_lang_bg.inc.php
lang/serendipity_lang_cn.inc.php
lang/serendipity_lang_cs.inc.php
lang/serendipity_lang_cz.inc.php
lang/serendipity_lang_da.inc.php
lang/serendipity_lang_de.inc.php
lang/serendipity_lang_en.inc.php
lang/serendipity_lang_es.inc.php
lang/serendipity_lang_fa.inc.php
lang/serendipity_lang_fi.inc.php
lang/serendipity_lang_fr.inc.php
lang/serendipity_lang_is.inc.php
lang/serendipity_lang_it.inc.php
lang/serendipity_lang_ja.inc.php
lang/serendipity_lang_ko.inc.php
lang/serendipity_lang_nl.inc.php
lang/serendipity_lang_no.inc.php
lang/serendipity_lang_pt.inc.php
lang/serendipity_lang_ro.inc.php
lang/serendipity_lang_ru.inc.php
lang/serendipity_lang_tn.inc.php
lang/serendipity_lang_tw.inc.php
lang/serendipity_lang_zh.inc.php
plugins/serendipity_event_karma/serendipity_event_karma.php
plugins/serendipity_event_livesearch/serendipity_event_livesearch.php
plugins/serendipity_event_mailer/serendipity_event_mailer.php
plugins/serendipity_event_statistics/serendipity_event_statistics.php
plugins/serendipity_plugin_comments/serendipity_plugin_comments.php
plugins/serendipity_plugin_history/serendipity_plugin_history.php
plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php
serendipity_admin.php
serendipity_config.inc.php
sql/db.sql
sql/db_update_0.9-alpha1_0.9-alpha2_mysql.sql [new file with mode: 0644]
sql/db_update_0.9-alpha1_0.9-alpha2_postgres.sql [new file with mode: 0644]
sql/db_update_0.9-alpha1_0.9-alpha2_sqlite.sql [new file with mode: 0644]

index 6c3d79b3e1413b59fbba69e107b90b6fb8d5779e..1647c711d796473feacfe540baf2339f04442a2c 100644 (file)
@@ -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(
index 324bb0ab397c682de0271dd8ea49313d08c5ffc5..dc38f0650c3bf8857ca5daee35398c8c8bf5330e 100644 (file)
--- 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
index f81f3c261c85795a2af886df3c1a6a252d47bafb..172ddfbe31a912a73eeb04c86c0f0b119e180090 100644 (file)
@@ -32,10 +32,7 @@ if (isset($_POST['SAVE'])) {
         if ( $sql ) {
             echo '<div class="serendipityAdminMsgError">'. sprintf(CATEGORY_ALREADY_EXIST, htmlspecialchars($name)) .'</div>';
         } 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 '<div class="serendipityAdminMsgSuccess">'. CATEGORY_SAVED .'</div>';
         }
 
@@ -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 '<div class="serendipityAdminMsgSuccess">'. CATEGORY_SAVED .'</div>';
                 }
             }
@@ -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 '<div class="serendipityAdminMsgSuccess">'. ($remaining_cat ? sprintf(CATEGORY_DELETED_ARTICLES_MOVED, (int)$serendipity['GET']['cid'], $remaining_cat) : sprintf(CATEGORY_DELETED,(int)$serendipity['GET']['cid'])) .'</div>';
                 $serendipity['GET']['adminAction'] = 'view';
             }
index c6953deb9bf8fa9051f110ef9f0faf5406793f4f..561ea95b42d9c7e8696fec245953b23dd3eab115 100644 (file)
@@ -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 '<span class="serendipityAdminMsgError">- ' . implode('<br />', $res) . '</span><br /><br />';
         } 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 . '<br />';
                 }
+
+                serendipity_buildPermalinks();
             }
+
             echo '<br /><div class="serendipityAdminMsgSuccess">'. WRITTEN_N_SAVED .'</div>';
         }
 
index ede20b1e98bc941d95895ad1981dee2c04ba6063..76e2d4f5d75d46accfe142c7f3bc154aff48c2ba 100644 (file)
@@ -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
         <br /><br /><a href="<?php echo $upgradeLoc; ?>" class="serendipityPrettyButton"><?php echo SERENDIPITY_UPGRADER_PROCEED_DOIT ?></a> <?php if ($showAbort) { ?><a href="<?php echo $abortLoc; ?>" class="serendipityPrettyButton"><?php echo SERENDIPITY_UPGRADER_PROCEED_ABORT ?></a><?php } ?>
 <?php } else { ?>
         <strong><?php echo SERENDIPITY_UPGRADER_NO_UPGRADES ?></strong>
-        <br /><br /><a href="<?php echo $abortLoc; ?>" class="serendipityPrettyButton"><?php echo SERENDIPITY_UPGRADER_CONSIDER_DONE ?></a>
+        <br /><br /><a href="<?php echo $upgradeLoc; ?>" class="serendipityPrettyButton"><?php echo SERENDIPITY_UPGRADER_CONSIDER_DONE ?></a>
 <?php }
     }
 }
index a72300bb1cfca4d8222b9d32f0051bf81888b56a..25e9c497a3cf84c9f2df1075bdf08f27420951ae 100644 (file)
@@ -70,6 +70,13 @@ if (isset($_POST['SAVE_EDIT'])) {
                 }
             }
         }
+        $pl_data = array(
+            'authorid' => $serendipity['POST']['authorid'],
+            'username' => $_POST['username'],
+            'realname' => $_POST['realname'],
+            'email'    => $_POST['email']
+        );
+        serendipity_updatePermalink($pl_data, 'author');
         printf('<div class="serendipityAdminMsgSuccess">' . MODIFIED_USER . '</div>', $_POST['realname']);
     }
 }
index feb4e38f7f5d3e1d82b33b8bcdcb1fad5f879960..eb2a7ed65eda23b926ea914f5551157386157085 100644 (file)
@@ -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 = '&amp;' . str_replace('&', '&amp;', $uri['query']);
-    }
-    $uri['path'] = str_replace($serendipity['serendipityHTTPPath'], '', $uri['path']);
-    $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst;
-    $url = str_replace(
-        array(
-            $serendipity['indexFile'] . '&amp;', 
-            '"',
-            "'",
-            '<',
-            '>'
-        ),
-        
-        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);
index 7d353d272352d6631415cd20efb0f78b1cd3a676..87d0ed08397604be5f628bcb32454bf34e696fb9 100644 (file)
@@ -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");
     }
index 9b99f9f4cfa981ba9b489c348f951f4333263197..b1b0715d54f0cc414cfd7d959aa914d37a3e4dec 100644 (file)
@@ -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&amp;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'] .'&amp;serendipity[cview]='. VIEWMODE_THREADED;
             $entry['link_viewmode_linear']   = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] .'?url='. $entry['commURL'] .'&amp;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('&#160;', $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<a href="%s" title="%s">%s</a><br />',
                           str_repeat('&#160;', $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']));
                     }
index b3cef230aa77e0637997eb37a5a10ea21a61a3d1..fc6632c8f80a46159cd27963b6d92567701a8370 100644 (file)
@@ -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']);
+            }
 ?>
                         <tr>
                             <td style="border-bottom: 1px #000000 solid" align="left" valign="top" width="75%">
@@ -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 (file)
index 0000000..c43f786
--- /dev/null
@@ -0,0 +1,439 @@
+<?php # $Id: functions.inc.php 85 2005-05-10 10:11:05Z garvinhicking $
+# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
+# All rights reserved.  See LICENSE file for licensing details
+
+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_permalinkPatterns($return = false) {
+    global $serendipity;
+    
+    $PAT = array();
+
+    $PAT['UNSUBSCRIBE']              = '@/'  . $serendipity['permalinkUnsubscribePath'].'/(.*)/([0-9]+)@';
+    $PAT['APPROVE']                  = '@/'  . $serendipity['permalinkApprovePath'].'/(.*)/(.*)/([0-9]+)@';
+    $PAT['DELETE']                   = '@/'  . $serendipity['permalinkDeletePath'].'/(.*)/(.*)/([0-9]+)@';
+    $PAT['ARCHIVES']                 = '@/'  . $serendipity['permalinkArchivesPath'].'([/A-Za-z0-9]+)\.html@';
+    $PAT['FEEDS']                    = '@/'  . $serendipity['permalinkFeedsPath'].'/@';
+    $PAT['ADMIN']                    = '@/(' . $serendipity['permalinkAdminPath'] . '|entries)(/.+)?@';
+    $PAT['ARCHIVE']                  = '@/'  . $serendipity['permalinkArchivePath'].'$@';
+    $PAT['CATEGORIES']               = '@/'  . $serendipity['permalinkCategoriesPath'].'/([0-9;]+)@';
+    $PAT['PLUGIN']                   = '@/('  . $serendipity['permalinkPluginPath'] . '|plugin)/(.*)@';
+    $PAT['SEARCH']                   = '@/'  . $serendipity['permalinkSearchPath'] . '/(.*)@';
+    $PAT['PERMALINK']                = '@'   . serendipity_makePermalinkRegex($serendipity['permalinkStructure'], 'entry') . '@i';
+    $PAT['PERMALINK_CATEGORIES']     = '@'   . serendipity_makePermalinkRegex($serendipity['permalinkCategoryStructure'], 'category') . '@i';
+    $PAT['PERMALINK_FEEDCATEGORIES'] = '@'   . serendipity_makePermalinkRegex($serendipity['permalinkFeedCategoryStructure'], 'category') . '@i';
+    $PAT['PERMALINK_AUTHORS']        = '@'   . serendipity_makePermalinkRegex($serendipity['permalinkAuthorStructure'], 'author') . '@i';
+
+    if ($return) {
+        return $PAT;
+    } else {
+        foreach($PAT AS $constant => $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 = '&amp;' . str_replace('&', '&amp;', $uri['query']);
+    }
+    $uri['path'] = str_replace($serendipity['serendipityHTTPPath'], '', $uri['path']);
+    $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst;
+    $url = str_replace(
+        array(
+            $serendipity['indexFile'] . '&amp;',
+            '"',
+            "'",
+            '<',
+            '>'
+        ),
+
+        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();
+    }
+}
+
index d17f3071bf0da1134e976ece49087adb17725996..ff30240c19e6262239f34a83540a00eab3fdbe04 100644 (file)
@@ -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,
index 65aaac8c036567da9a026556ca54f76449644c4a..ada97575ed432dee330daffcdee8c1092ca67894 100644 (file)
@@ -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
index 95dd6b4b7d848a597475b9f93bbbefb7fe66b257..195832d498f70167f97c7c3f80c24951be4d5bf5 100644 (file)
@@ -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 .= '<a href="'. serendipity_rewriteURL(PATH_FEEDS .'/'. PATH_CATEGORIES .'/'. serendipity_makePermalink(PERM_FEEDS_CATEGORIES, array('id' => $cat['categoryid'], 'title' => $cat['category_name']))) .'"><img src="'. $image .'" alt="XML" style="border: 0px" /></a> ';
+                    $html .= '<a href="'. serendipity_feedCategoryURL($cat, 'serendipityHTTPPath') .'"><img src="'. $image .'" alt="XML" style="border: 0px" /></a> ';
                 }
-                $html .= '<a href="'. serendipity_rewriteURL(PATH_CATEGORIES . '/' . serendipity_makePermalink(PERM_CATEGORIES, array('id' => $cat['categoryid'], 'title' => $cat['category_name'])), 'serendipityHTTPPath') .'" title="'. $cat['category_name'] .'" style="padding-left: '. $cat['depth']*6 .'px">'. $cat['category_name'] .'</a>';
+                $html .= '<a href="'. serendipity_categoryURL($cat, 'serendipityHTTPPath') .'" title="'. $cat['category_name'] .'" style="padding-left: '. $cat['depth']*6 .'px">'. $cat['category_name'] .'</a>';
                 $html .= '</div>' . "\n";
             }
         }
index fa52e73877f78a9ed4a0c7781fc9b42b7be2bc29..6d917a91bff1550b48f698137128a6b2f769950e 100644 (file)
                                 ));
 
 
+    $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,
index 860c2f05b9715c57700d412cd884ddbb3300205b..603ac61a96cf6eb8b9ccb30a784daf989cb4b587 100644 (file)
@@ -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]
index 6e863a4feea2038e541d8e17ff8be2288b186277..cce5d1d8ac2868f83fb281dadb7ef510b0f15096 100644 (file)
@@ -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]
index 85d49c2903d0f255de76ac66233bde67deb8b3fe..c2f1502a2dcf12a61361e9f48decfe4410088df0 100644 (file)
--- 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;
         }
index 869c419020ff0edf1421a305acf18b23576c9dd0..e9e6af3db1f850601dc3f0b304d399ffdbb8fa5e 100644 (file)
 @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
+?>
index de6bf3971c456eb5471c2da217d707c38bca9831..afc1037157820e694c9f4384cce3f4b46905052d 100644 (file)
 @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
+?>
index e283ee14f7837010b256580cb0bb474754d9a342..4590b8b3d884aa083257cd5791b49309bae6d0c2 100644 (file)
 @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
index f9add4c771620dcfb95cb1e0989341cb85931f67..6231ad0a0acdd58fc0ff91fed1e1327d79114906 100644 (file)
 @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
index f134ee7e12c1b1ae8a8b7748a643c1ef14782d33..71b98e9758c8a52ce1acca3ed441999e84016369 100644 (file)
 @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 : */
 ?>
index 2979ddde39c09279b3e4d5c66edc774948e87326..83f8b8a9da755677670cca041adb9bcb48e433b2 100644 (file)
 @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
+?>
index bb8e7bf1161f36cf98ffea7b22354fc00c8e24e4..cc46ad989e3c35f02bae0d549e2756264a545a18 100644 (file)
 @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
+?>
index 0b7c4a4f7f291b61473ca61be360134473364a76..00cc76934d4c5d651eea8a4acabcfe8b05ce2e1e 100644 (file)
 @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
index 39ebed5ce8027ea14ed88291d8594664da7b3e65..2bb4b6ff575d01bb55a70df5ca724e7986e0a6c9 100644 (file)
 @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
+?>
index 6fc64660c011afe473733b4b4bcd132dd9930d1f..12a6c6e77242e7c114d7a61301c9b98d2b120327 100644 (file)
 @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
+?>
index aa9be6cef04f2762ee5f9b3e43c06df287c5abf8..098ba95dbb231364fa46cb2b6fe83fa3907e0983 100644 (file)
 @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
index 8a9b89e46ec49deeb6621139592092eb78cb2aa0..25c0adb4ea312b3ed7ba74c9edcdfe0cc2d2c570 100644 (file)
 @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
+?>
index 16423d74b703719fe9ff7214f8a837d9a1629ab8..4737900da15e9626ff75ce8c0941814035f95855 100644 (file)
 @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
+?>
index 7bcb19e264f49ca489407fab39e4f8c8bc651cd0..563b84ebd3031f2d2d4dcc670a6e28a1ca6083d6 100644 (file)
@@ -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 : */
 ?>
index 72305f70095a8924f3cef9f83508d941930be7f8..2bd8a0bce8d17fe048811ce07ac92a4162fb72f6 100644 (file)
 @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
+?>
index 701c9235f929f86fd2cefbab50f46d20433212a4..5cd4f57b6b76580784641441b818ec3b52e1e5e4 100644 (file)
 @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
+?>
index 07d97b7312b9f665999537cbaf3a0cee07ab4209..d6d72cf4d62419b81876b2e14d44d13ed4dd104d 100644 (file)
 @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
+?>
index 19f469583808600ef1f3460c87823450e6924cac..8e7dfa747b7616a6d4be7d4e61122cb995e4f02f 100644 (file)
 @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
+?>
index c21fac93e0529a09605b54c7c15510eb7d7a73b5..80a3f13b76b84f099920acf1a3212f78b33813c0 100644 (file)
 @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
+?>
index b9f7cb7c546dba587f149f11d3fd968dd81eeac7..27da55b576aa06de6f8703277beacbe15b475f18 100644 (file)
 @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
+?>
index ff2f54bb9f21eacdd35bf7c09517a60f59650f3a..cdb97629ed34703522cb5e61373929127ee1ff12 100644 (file)
 @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
+?>
index 339faad2b59c0a0c41004de523d05e501a0a1a0e..da5921202a48ab9abccd02e2d7aff5c5a7507f9e 100644 (file)
 @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
+?>
index 0ac6a7edd182f127d9ebd58e7c45a3a7a01e454f..3b95c73c1d0bcc9390462056a878cdd3126b45f6 100644 (file)
 @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
+?>
index 08a9625cf64be716349161256a64dbef73833ff3..b64a88f811540961b39e640daac1aa0ebfe15de8 100644 (file)
@@ -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) {
     ?>
-        <dt><strong><a href="<?php echo serendipity_archiveURL($row['id'], $row['title'], 'serendipityHTTPPath'); ?>"><?php echo htmlspecialchars($row['title']); ?></a></strong></dt>
+        <dt><strong><a href="<?php echo serendipity_archiveURL($row['id'], $row['title'], 'serendipityHTTPPath', true, array('timestamp' => $row['timestamp'])); ?>"><?php echo htmlspecialchars($row['title']); ?></a></strong></dt>
         <dd><?php echo $row['no']; ?> <?php echo constant('PLUGIN_KARMA_STATISTICS_' . strtoupper($rows[0]) . '_NO'); ?></dd>
     <?php
                             }
index a90233b3258e7b9ac73ad63412d535b90aae1c05..fa953e2dae72da770a1f7b1957f3d5ac2a55fc3a 100644 (file)
@@ -29,7 +29,7 @@ class serendipity_event_livesearch extends serendipity_event
         $propbag->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 '<?xml version="1.0" encoding="utf-8" ?>';
                                 echo '<div class="serendipity_livesearch_result">';
                                 foreach($res AS $id => $entry) {
-                                    echo '<div class="serendipity_livesearch_row"><a href="' . serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL') . '">' . htmlspecialchars($entry['title']) . '</a></div>';
+                                    echo '<div class="serendipity_livesearch_row"><a href="' . serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])) . '">' . htmlspecialchars($entry['title']) . '</a></div>';
                                 }
                                 echo '</div>';
                             }
index 45c0690c2b907228cd4353730b1869fe649377cb..d353e733da40901962a6bc6a41cd45d7a3d9c4ee 100644 (file)
@@ -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']);
index 8f43c14858a305274c0941e07cba6ccb253e68b4..4bce669030f254fbc5a106bb7c802f7352a6d81b 100644 (file)
@@ -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) {
 ?>
-            <dt><strong><a href="<?php echo serendipity_archiveURL($com_stat['id'], $com_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $com_stat['title']; ?></a></strong></dt>
+            <dt><strong><a href="<?php echo serendipity_archiveURL($com_stat['id'], $com_stat['title'], 'serendipityHTTPPath', true, array('timestamp' => $com_stat['timestamp'])); ?>"><?php echo $com_stat['title']; ?></a></strong></dt>
             <dd><?php echo $com_stat['postings']; ?> <?php echo PLUGIN_EVENT_STATISTICS_OUT_COMMENTS2; ?></dd>
 <?php
                         }
@@ -378,7 +378,7 @@ class serendipity_event_statistics extends serendipity_event
                     if (is_array($subscriber_rows)) {
                         foreach($subscriber_rows AS $subscriber => $subscriber_stat) {
 ?>
-            <dt><strong><a href="<?php echo serendipity_archiveURL($subscriber_stat['id'], $subscriber_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $subscriber_stat['title']; ?></a></strong></dt>
+            <dt><strong><a href="<?php echo serendipity_archiveURL($subscriber_stat['id'], $subscriber_stat['title'], 'serendipityHTTPPath', true, array('timestamp' => $subscriber_stat['timestamp'])); ?>"><?php echo $subscriber_stat['title']; ?></a></strong></dt>
             <dd><?php echo $subscriber_stat['postings']; ?> <?php echo PLUGIN_EVENT_STATISTICS_OUT_TOPSUBSCRIBERS2; ?></dd>
 <?php
                         }
@@ -399,7 +399,7 @@ class serendipity_event_statistics extends serendipity_event
                     if (is_array($tb_rows)) {
                         foreach($tb_rows AS $tb => $tb_stat) {
 ?>
-            <dt><strong><a href="<?php echo serendipity_archiveURL($tb_stat['id'], $tb_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $tb_stat['title']; ?></a></strong></dt>
+            <dt><strong><a href="<?php echo serendipity_archiveURL($tb_stat['id'], $tb_stat['title'], 'serendipityHTTPPath', true, array('timestamp' => $tb_stat['timestamp'])); ?>"><?php echo $tb_stat['title']; ?></a></strong></dt>
             <dd><?php echo $tb_stat['postings']; ?> <?php echo PLUGIN_EVENT_STATISTICS_OUT_TOPTRACKBACK2; ?></dd>
 <?php
                         }
@@ -465,7 +465,7 @@ class serendipity_event_statistics extends serendipity_event
                     if (is_array($length_rows)) {
                         foreach($length_rows AS $tb => $length_stat) {
 ?>
-            <dt><strong><a href="<?php echo serendipity_archiveURL($length_stat['id'], $length_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $length_stat['title']; ?></a></strong></dt>
+            <dt><strong><a href="<?php echo serendipity_archiveURL($length_stat['id'], $length_stat['title'], 'serendipityHTTPPath', true, array('timestamp' => $length_stat['timestamp'])); ?>"><?php echo $length_stat['title']; ?></a></strong></dt>
             <dd><?php echo $length_stat['full_length']; ?> <?php echo PLUGIN_EVENT_STATISTICS_OUT_CHARS2; ?></dd>
 <?php
                         }
index 87be61597ef5195935aa774d8a9272677fb137af..e41a0741f6b7cead3d6ca9c9e96fa7d6447c39df 100644 (file)
@@ -46,7 +46,7 @@ class serendipity_plugin_comments extends serendipity_plugin
         $propbag->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,
-                  ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject'], 'baseURL') .'#c' . $row['comment_id'] . '" title="' . htmlspecialchars($row['subject']) . '">'
+                  ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject'], 'baseURL', true, array('timestamp' => $row['entrystamp'])) .'#c' . $row['comment_id'] . '" title="' . htmlspecialchars($row['subject']) . '">'
                       . htmlspecialchars($row['subject'])
                       . '</a><br />' . "\n"
                       . htmlspecialchars(serendipity_strftime($dateformat, $row['stamp'])) . '<br />' . "\n"
index 833bd62cdc11fc9b8410c9385b14edd5bf4e192e..77ba1e29d085b6b819125835e69dd02dd1f3c6ad 100644 (file)
@@ -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) ?
index aa729b95950510d2351cd4b962ba8a7c9ee315c2..265f3ca33ac1d3a455f8013cb9bf4ad250ce7325 100644 (file)
@@ -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 '<a href="' . $entryLink . '" title="' . htmlspecialchars($entry['title']) . '">' . $entry['title'] . '</a><br />'
index 56a3e83b7189b15c6abbe5bafa734fa8e730b5a2..6ed3f47dba4bf0c449e0444f9da1884708303a24 100644 (file)
@@ -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';
index 6b3242d774f5b3063be14639996edc3441e7e6c3..79144fccf6e7617c0c0d4a3a8328b22fca03811d 100644 (file)
@@ -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
  */
index f294162f061295c76e71bdbec2b489222bff8d1d..85f684f0e4dd2e2af475a263d08048d4d859df3e 100644 (file)
@@ -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 (file)
index 0000000..235efac
--- /dev/null
@@ -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 (file)
index 0000000..235efac
--- /dev/null
@@ -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 (file)
index 0000000..235efac
--- /dev/null
@@ -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);