]> git.mjollnir.org Git - s9y.git/commitdiff
Allow to view and fetch multiple categories. Categories plugin
authorgarvinhicking <garvinhicking>
Sat, 30 Apr 2005 10:41:02 +0000 (10:41 +0000)
committergarvinhicking <garvinhicking>
Sat, 30 Apr 2005 10:41:02 +0000 (10:41 +0000)
can allow viewers to select multiple categories to view.

Multiple categories are separated by ";" inside the URL. Values are still
turned to (int)s later on.

29 files changed:
docs/NEWS
include/functions.inc.php
include/functions_entries.inc.php
include/plugin_internal.inc.php
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
serendipity_config.inc.php

index 46d72980be42650502988d2a07e8a3616e19bc67..b28667e2b435bad72b832c79831df5b5efce440d 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,10 @@
 Version 0.9 ()
 ------------------------------------------------------------------------
 
+    * Allow to view and fetch multiple categories. Categories plugin
+      can allow viewers to select multiple categories to view.
+      (garvinhicking)
+
     * Added hooks into the image selector admin popup for plugins to
       support additional options. serendipity_event_imageselectorplus
       accesses those hooks already. (garvinhicking)
index 254f0413a92b4b8ec63bda75b4da357539c37c85..5bf13d7242bbc19ad326f7a3117bc14ae84e63b3 100644 (file)
@@ -664,7 +664,7 @@ 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);
+    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') {
index 9e7557698e92ca6691708cba685cbb6f7958b0c7..ecd9e634019d4e9a2c708f1f3263c7033a5afd9d 100644 (file)
@@ -13,6 +13,22 @@ function serendipity_fetchCategoryRange($categoryid) {
     return array('category_left' => $res[0]['category_left'], 'category_right' => $res[0]['category_right']);
 }
 
+function serendipity_getMultiCategoriesSQL($cats) {
+    global $serendipity;
+
+    $mcategories   = explode(';', $cats);
+    $cat_sql_array = array();
+    foreach($mcategories AS $categoryid) {
+        $categoryid  = (int)$categoryid;
+
+        if ($categoryid != 0) {
+            $cat_sql_array[] = " c.category_left BETWEEN " . implode(' AND ', serendipity_fetchCategoryRange($categoryid));
+        }
+    }
+
+    return implode(' OR ', $cat_sql_array);
+}
+
 function serendipity_fetchCategoryInfo($categoryid, $categoryname = '') {
     global $serendipity;
 
@@ -29,7 +45,7 @@ function serendipity_fetchCategoryInfo($categoryid, $categoryname = '') {
 
         $ret = serendipity_db_query($query);
         return $ret[0];
-    } else if (is_numeric($categoryid)) {
+    } else {
         $query = "SELECT
                          c.authorid,
                          c.categoryid,
@@ -38,7 +54,7 @@ function serendipity_fetchCategoryInfo($categoryid, $categoryname = '') {
                          c.category_icon,
                          c.parentid
                     FROM {$serendipity['dbPrefix']}category AS c
-                   WHERE categoryid = {$categoryid}";
+                   WHERE categoryid = " . (int)$categoryid;
 
         $ret = serendipity_db_query($query);
         return $ret[0];
@@ -154,14 +170,11 @@ function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fet
 
 
     if (isset($serendipity['GET']['category'])) {
-        $categoryid  = (int)$serendipity['GET']['category'];
-
-        if ($categoryid != 0) {
-            if (!empty($cond['and'])) {
-                $cond['and'] .= " AND c.category_left BETWEEN " . implode(' AND ', serendipity_fetchCategoryRange($categoryid));
-            } else {
-                $cond['and'] = "WHERE c.category_left BETWEEN " . implode(' AND ', serendipity_fetchCategoryRange($categoryid));
-            }
+        $cat_sql = serendipity_getMultiCategoriesSQL($serendipity['GET']['category']);
+        if (!empty($cond['and'])) {
+            $cond['and'] .= " AND ($cat_sql)";
+        } else {
+            $cond['and'] = "WHERE ($cat_sql)";
         }
     }
 
index 738dee3302c97308fd2febfcb07367139f4aed9a..95dd6b4b7d848a597475b9f93bbbefb7fe66b257 100644 (file)
@@ -130,21 +130,17 @@ 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'])) {
-            $categoryid  = serendipity_db_escape_string($serendipity['GET']['category']);
-
-            if (is_numeric($categoryid)) {
-                $base_query   = 'C' . $categoryid;
-                $add_query    = '/' . $base_query;
-                $querystring = "SELECT timestamp
-                                  FROM {$serendipity['dbPrefix']}category c,
-                                       {$serendipity['dbPrefix']}entrycat ec,
-                                       {$serendipity['dbPrefix']}entries e
-                                       {$cond['joins']}
-                                       {$cond['and']}
-                                   AND e.id          = ec.entryid
-                                   AND c.categoryid  = ec.categoryid
-                                   AND c.category_left BETWEEN " . implode(' AND ', serendipity_fetchCategoryRange($categoryid));
-            }
+            $base_query   = 'C' . $categoryid;
+            $add_query    = '/' . $base_query;
+            $querystring = "SELECT timestamp
+                              FROM {$serendipity['dbPrefix']}category c,
+                                   {$serendipity['dbPrefix']}entrycat ec,
+                                   {$serendipity['dbPrefix']}entries e
+                                   {$cond['joins']}
+                                   {$cond['and']}
+                               AND e.id          = ec.entryid
+                               AND c.categoryid  = ec.categoryid
+                               AND (" . serendipity_getMultiCategoriesSQL($serendipity['GET']['category']) . ")";
         }
 
         if (!isset($querystring)) {
@@ -954,7 +950,7 @@ class serendipity_categories_plugin extends serendipity_plugin {
         $propbag->add('stackable',     true);
         $propbag->add('author',        'Serendipity Team');
         $propbag->add('version',       '1.0');
-        $propbag->add('configuration', array('authorid', 'image', 'sort_order', 'sort_method'));
+        $propbag->add('configuration', array('authorid', 'image', 'sort_order', 'sort_method', 'allow_select'));
     }
 
     function introspect_config_item($name, &$propbag)
@@ -977,6 +973,13 @@ class serendipity_categories_plugin extends serendipity_plugin {
                 $propbag->add('default',     'all');
                 break;
 
+            case 'allow_select':
+                $propbag->add('type',         'boolean');
+                $propbag->add('name',         CATEGORIES_ALLOW_SELECT);
+                $propbag->add('description',  CATEGORIES_ALLOW_SELECT_DESC);
+                $propbag->add('default',      true);
+                break;
+            
             case 'sort_order':
                 $select = array();
                 $select['category_name']        = CATEGORY;
@@ -1023,15 +1026,27 @@ class serendipity_categories_plugin extends serendipity_plugin {
         } else {
             $sort .= ' ' . $this->get_config('sort_method');
         }
+        $is_form = serendipity_db_bool($this->get_config('allow_select'));
         $categories = serendipity_fetchCategories(empty($which_category) ? 'all' : $which_category, '', $sort);
         $title = $this->title;
+
         $html       = '';
+
+        if ($is_form) {
+            $html .= '<form action="' . $serendipity['baseURL'] . $serendipity['indexFile'] . '" method="POST"><div>';
+        }
+
         $image = $this->get_config('image', serendipity_getTemplateFile('img/xml.gif'));
         $image = (($image == "'none'" || $image == 'none') ? '' : $image);
         if (is_array($categories) && count($categories)) {
             $categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
             foreach ( $categories as $cat ) {
                 $html .= '<div style="padding-bottom: 2px;">';
+                
+                if ($is_form) {
+                    $html .= '<input style="width: 15px" type="checkbox" name="serendipity[multiCat][]" value="' . $cat['categoryid'] . '" />';
+                }
+
                 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> ';
                 }
@@ -1040,6 +1055,10 @@ class serendipity_categories_plugin extends serendipity_plugin {
             }
         }
 
+        if ($is_form) {
+            $html .= '<br /><input type="submit" name="serendipity[isMultiCat]" value="' . GO . '" /><br />';
+        }
+
         $html .= sprintf(
             '<br /><a href="%s" title="%s">%s</a>',
 
@@ -1048,6 +1067,9 @@ class serendipity_categories_plugin extends serendipity_plugin {
             ALL_CATEGORIES
         );
 
+        if ($is_form) {
+            $html .= '</div></form>';
+        }
         print $html;
     }
 }
index 7aba63722e9f3d543866b845efb31f42b4c2210c..a38b2764bc0d572a42a638b12545c83b02055e2b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -57,6 +57,11 @@ if (preg_match(PAT_APPROVE, $uri, $res) && $serendipity['serendipityAuthedUser']
     }
 }
 
+if (isset($serendipity['POST']['isMultiCat']) && is_array($serendipity['POST']['multiCat'])) {
+    $is_multicat = true;
+} else {
+    $is_multicat = false;
+}
 
 if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range']) && is_numeric($serendipity['GET']['range'])) {
     $_args = $serendipity['uriArguments'];
@@ -214,7 +219,17 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
 } else if (preg_match(PAT_PLUGIN, $uri, $matches)) {
     serendipity_plugin_api::hook_event('external_plugin', $matches[1]);
     exit;
-} else if (preg_match(PAT_CATEGORIES, $uri, $matches)) {
+} else if ($is_multicat || preg_match(PAT_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];
+    }
+    $serendipity['GET']['action'] = 'read';
+
     $_args = $serendipity['uriArguments'];
 
     /* Attempt to locate hidden variables within the URI */
@@ -229,8 +244,6 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
         }
     }
 
-    $serendipity['GET']['category'] = $matches[1];
-    $serendipity['GET']['action'] = 'read';
     $cInfo = serendipity_fetchCategoryInfo($serendipity['GET']['category']);
     $serendipity['head_title']    = $cInfo['category_name'];
     $serendipity['head_subtitle'] = $serendipity['blogTitle'];
index 01cb697946ab10d6f19583c7a525e7efb2c95ab0..020dd666d13e9081ccd14399e11642aa948b0501 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
-
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 188f115449a537e868f484b1e41a66769fba96cd..a873f63df1655ed1dd54d7404e584f8a185aa1d3 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index b652589adab39d6d96e8cbe327818b6b774660b6..169f84ed62a7201049eec9ad604136b3477d2a37 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 20537a4b2917b2ef8e4f61af01bf41bdf51f602a..a6cc8e7917706b9b3a37718e0a9f3cf615f8d186 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 7472e6d91768906ba57fe1859f6c8b848bde6b88..ce08f4b8a9beb4c35f9b56e17c0f6d152335577c 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
index 1338a02c8cbcd4328e162066e9d1a0934e73a925..c21cefb7d8d8ae86d76bf4626197152c6f9f888a 100644 (file)
 
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index fa03cd59e4482b05c15124551bdd0aceed13090f..96c43f47db54ddc03da6e02d4e112fa48c08bf40 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images');
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 960c7c0d3f963a93da1430adae2e736bcc4b1317..faa415522ad15c1d240fcc87eb62755cc6152dc2 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index e46eaf205434473fa2553f8b7a7bce7d1c2cae95..207c215de19bb232b3b4b27e69b3b363fb073fb2 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 43b27e166d2be5d00a619b6719b29d4b855a915f..fe83884cb702a5712c43c90f46a18f6f7bbdc47a 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 436c1d093891c2e0da51db58b89000a35c9d8af0..d7f419dca48eb2b54adc0d588fd1ad985005ccdf 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 3364d61822342d7c4e6faf2ee2447c0a8c6dd7d9..0e656b6c930a0a0e19f3c95e7efb0d9b4a98a09f 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 47c8663ac40249f3dcbb09bd913176491155446c..51f6e53c6d879d0c8863b61859d3ca1065fbafa4 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 526ee47c20383c92b29454b885a699c28c991abb..c394727d2570174e2ab191e2042a95224fcb95fa 100644 (file)
@@ -668,6 +668,8 @@ Serendipity のアップグレードステージを無視しました。正し
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
index 5291960b87a775cb289da2a2f85ab5267a67b368..a762f87c5d60971fdb7eb8636ec643be2b9a1302 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index cd3a66d93975b39e1a2b7ad97f24dfd4b46983c2..8e28c1854cd21c97ae89ca967c8a71e3a7a22eea 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index c14f42e0a16f6bbcbd6b3cf49fb4a817f79ac9e0..aae73a8df19011fddd10ca133c9b326574c595ba 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 ?>
\ No newline at end of file
index e99b637892512fdea38fe9f4e8431a07b00a09a6..9accc362aff0b77dbd1a6c1d7a959a622b9909c3 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 30a72bfb4af39e4d9785d2ca556bf70535f22a27..be1a2c3236d0986a6f0eec957b476417261c512c 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index d60ec509aadce8b835a396e32dcfffaad383d522..eea05db8b177808d745c599a617c859d0fd09f64 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 18b354bfe793cdf9b26a208babe391ce4db14496..96332425efb93924c7b000d72e8a8e24e4183069 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 6cfb8060ac893d82e6f3918b788f71f8fe63debf..e02772cd3049ac16ea76b4c4a74ac22638169dac 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index ad1394d7b2c385d911eb015cb4879c30c8da4a6e..19ec59e0e4907d1324d1a578fc8bf4f188326d65 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('BACKEND_TITLE', 'Additional information in Plugin Configuration screen'); // Translate
 @define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
+@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
 
 /* vim: set sts=4 ts=4 expandtab : */
 ?>
\ No newline at end of file
index 4eb38e8a269d2a026e59bc870a1ca8bc27e295d0..9403951e077959075f285cef98734202c8dfaead 100644 (file)
@@ -138,11 +138,11 @@ include($serendipity['serendipityPath'] . 'include/lang.inc.php');
 @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_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_CATEGORIES', '@/'.PATH_CATEGORIES.'/([0-9;]+)@');
 @define('PAT_PLUGIN', '@/' . PATH_PLUGIN . '/(.*)@');
 @define('PAT_SEARCH', '@/' . PATH_SEARCH . '/(.*)@');
 @define('PAT_CSS', '@/(serendipity\.css|serendipity_admin\.css)@');