]> git.mjollnir.org Git - s9y.git/commitdiff
* Some cleanuup of debug code
authorgarvinhicking <garvinhicking>
Tue, 4 Oct 2005 10:11:02 +0000 (10:11 +0000)
committergarvinhicking <garvinhicking>
Tue, 4 Oct 2005 10:11:02 +0000 (10:11 +0000)
* Do not put authors plugin as default plugin
* Obsolete function serendipity_fetchAuthors (fetchUsers does the same)
* Document new code in NEWS
* Make title of authors plugin configurable
* German translation

docs/NEWS
include/functions.inc.php
include/plugin_api.inc.php
include/plugin_internal.inc.php
index.php
lang/UTF-8/serendipity_lang_de.inc.php
lang/serendipity_lang_de.inc.php

index 6fa27516651095c290a0d43d3a391daadb62d357..c58b7f1c3d34b9770a2dc4ad88534ac5bcfb335f 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 0.9-beta2 ()
 ------------------------------------------------------------------------
 
+    * Allow per-author XML feeds, added bundled sidebar plugin to show
+      (multiple) authors. (jtate)
+
     * Enhance entryproperties plugin so that single entries can hide
       their content from the RSS feeds. (garvinhicking)
 
index a5701da99c4cab8c958cbb263ec1fb56c8f87522..1266c45eb65ca6b3df57ee2298ed7696b5447080 100644 (file)
@@ -339,12 +339,6 @@ function serendipity_fetchAuthor($author) {
     return serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors WHERE " . (is_numeric($author) ? "authorid={$author};" : "username='" . serendipity_db_escape_string($author) . "';"));
 }
 
-function serendipity_fetchAuthors() {
-    global $serendipity;
-
-    return serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors ORDER BY realname ASC;");
-}
-
 /**
 * Split up a filename
 **/
index b4e22c4ff3b2c8863adb0ce15fddb8120c441342..2b1bb8a30158fcef30f8d302f9a8e0ea2293994e 100644 (file)
@@ -35,7 +35,6 @@ class serendipity_plugin_api {
         serendipity_plugin_api::create_plugin_instance('@serendipity_quicksearch_plugin');
         serendipity_plugin_api::create_plugin_instance('@serendipity_archives_plugin');
         serendipity_plugin_api::create_plugin_instance('@serendipity_categories_plugin');
-        serendipity_plugin_api::create_plugin_instance('@serendipity_authors_plugin');
         serendipity_plugin_api::create_plugin_instance('@serendipity_syndication_plugin');
         serendipity_plugin_api::create_plugin_instance('@serendipity_superuser_plugin');
         serendipity_plugin_api::create_plugin_instance('@serendipity_plug_plugin');
index aab656401a32b493dc5c053170e4b44a3f6b9b2d..b792d11a1a6980c732c4d40dbe881d4bc3f3554c 100644 (file)
@@ -1352,7 +1352,7 @@ class serendipity_authors_plugin extends serendipity_plugin {
         $propbag->add('stackable',     true);
         $propbag->add('author',        'Serendipity Team');
         $propbag->add('version',       '2.0');
-        $propbag->add('configuration', array('image', 'allow_select'));
+        $propbag->add('configuration', array('image', 'allow_select', 'title'));
         $propbag->add('groups',        array('FRONTEND_VIEWS'));
     }
 
@@ -1360,6 +1360,13 @@ class serendipity_authors_plugin extends serendipity_plugin {
     {
         global $serendipity;
         switch($name) {
+            case 'title':
+                $propbag->add('type',          'string');
+                $propbag->add('name',          TITLE);
+                $propbag->add('description',   TITLE);
+                $propbag->add('default',       AUTHORS);
+                break;
+
             case 'allow_select':
                 $propbag->add('type',         'boolean');
                 $propbag->add('name',         AUTHORS_ALLOW_SELECT);
@@ -1383,6 +1390,8 @@ class serendipity_authors_plugin extends serendipity_plugin {
     function generate_content(&$title) {
         global $serendipity;
 
+       $title = $this->get_config('title', $this->title);
+
         $sort = $this->get_config('sort_order');
         if ($sort == 'none') {
             $sort = '';
@@ -1390,8 +1399,7 @@ class serendipity_authors_plugin extends serendipity_plugin {
             $sort .= ' ' . $this->get_config('sort_method');
         }
         $is_form = serendipity_db_bool($this->get_config('allow_select'));
-        $authors = serendipity_fetchAuthors();
-        $title = $this->title;
+        $authors = serendipity_fetchUsers();
 
         $html       = '';
 
index 33c41f12039f80f8c3a0353e05b0db25949ccc87..c80d67beb660a181d34c6d38aa8c47f478e25819 100644 (file)
--- a/index.php
+++ b/index.php
@@ -351,18 +351,14 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
 
     include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
 } else if ($is_multiauth || preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) {
-    if($is_multiauth) {
-        print "POST: ";
-        print_r($serendipity['POST']);
-        print "\n";
+    if ($is_multiauth) {
         $serendipity['GET']['viewAuthor'] = implode(';', $serendipity['POST']['multiAuth']);
-        $serendipity['uriArguments'][] = PATH_AUTHORS;
-        $serendipity['uriArguments'][]  = serendipity_db_escape_string($serendipity['GET']['viewAuthor']) . '-multi';
+        $serendipity['uriArguments'][]    = PATH_AUTHORS;
+        $serendipity['uriArguments'][]    = serendipity_db_escape_string($serendipity['GET']['viewAuthor']) . '-multi';
     } elseif (preg_match('@/([0-9;]+)@', $uri, $multimatch)) {
         $is_multiauth = true;
         $serendipity['GET']['viewAuthor'] = $multimatch[1];
     }
-    print_r($serendipity['GET']);
 
     $serendipity['GET']['action'] = 'read';
 
index 2a6d7cf49fd2a607dc7ca9223c4990fb988c72bc..0cd148369b441e65d6a7dcbc1f5ae7a0d721e6c4 100644 (file)
 @define('USERCONF_CHECK_PASSWORD_DESC', 'Falls Sie das Passwort im vorhergehenden Feld ändern, müssen Sie das aktuelle Password in diesem Feld eingeben.');
 @define('USERCONF_CHECK_PASSWORD_ERROR', 'Sie haben kein gültiges derzeitiges Passwort angegeben, und sind daher nicht berechtigt, das neue Passwort umzusetzen. Ihre Einstellungen wurden nicht gespeichert.');
 @define('ERROR_XSRF', 'Ihr Browser hat keinen gültigen HTTP-Referrer übermittelt. Dies kann entweder daher kommen, dass ihr Browser/Proxy nicht korrekt konfiguriert ist, oder dass Sie Opfer einer "Cross Site Request Forgery (XSRF)" waren, mit der man Sie ungewollten Änderungen zwingen wollte. Die angeforderte Aktion konnte daher nicht durchgeführt werden.');
-@define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', 'Here you can define the relative URL structure beginning from your base URL to where RSS-feeds from specific users may be viewed. You can use the variables %id%, %realname%, %username%, %email% and any other characters.');
-@define('INSTALL_PERMALINK_FEEDAUTHOR', 'Permalink RSS-Feed Author URL structure');
-@define('INSTALL_PERMALINK_AUTHORSPATH', 'Path to authors');
-@define('AUTHORS', 'Authors');
-@define('AUTHORS_ALLOW_SELECT', 'Allow visitors to display multiple authors at once?');
-@define('AUTHORS_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each author in this sidebar plugin.  Users can check those boxes and see entries matching their selection.');
-@define('AUTHOR_PLUGIN_DESC', 'Shows a list of authors');
+@define('INSTALL_PERMALINK_FEEDAUTHOR', 'Permalink-Struktur für RSS-Autoren-Feed URLs');
+@define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', 'Legt die relative URL-Struktur fest (beginnend mit der Stamm-URL), mit der gewählte RSS-Feeds von Autoren dargestellt werden. Die Variablen %id%, %realname%, %username%, %email% und jede anderen normalen Zeichen sind möglich.');
+@define('INSTALL_PERMALINK_AUTHORSPATH', 'Pfad zu den Autoren');
+@define('AUTHORS', 'Autoren');
+@define('AUTHORS_ALLOW_SELECT', 'Ermöglicht Besuchern, Einträge mehrerer Autoren gleichzeitig darzustellen?');
+@define('AUTHORS_ALLOW_SELECT_DESC', 'Falls diese Option aktiviert ist, wird eine Checkbox neben jedem Autoren angezeigt, damit Besucher mehrere Autoren gleichzeitig auswählen können.');
+@define('AUTHOR_PLUGIN_DESC', 'Zeigt die Liste aller Autoren');
index 45644002b05fa75ac2cf81d134fbf181bf69bcec..c9307a874880b5861bdc47ac52868b581db8bd56 100644 (file)
 @define('USERCONF_CHECK_PASSWORD_DESC', 'Falls Sie das Passwort im vorhergehenden Feld ändern, müssen Sie das aktuelle Password in diesem Feld eingeben.');
 @define('USERCONF_CHECK_PASSWORD_ERROR', 'Sie haben kein gültiges derzeitiges Passwort angegeben, und sind daher nicht berechtigt, das neue Passwort umzusetzen. Ihre Einstellungen wurden nicht gespeichert.');
 @define('ERROR_XSRF', 'Ihr Browser hat keinen gültigen HTTP-Referrer übermittelt. Dies kann entweder daher kommen, dass ihr Browser/Proxy nicht korrekt konfiguriert ist, oder dass Sie Opfer einer "Cross Site Request Forgery (XSRF)" waren, mit der man Sie ungewollten Änderungen zwingen wollte. Die angeforderte Aktion konnte daher nicht durchgeführt werden.');
-@define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', 'Here you can define the relative URL structure beginning from your base URL to where RSS-feeds from specific users may be viewed. You can use the variables %id%, %realname%, %username%, %email% and any other characters.');
-@define('INSTALL_PERMALINK_FEEDAUTHOR', 'Permalink RSS-Feed Author URL structure');
-@define('INSTALL_PERMALINK_AUTHORSPATH', 'Path to authors');
-@define('AUTHORS', 'Authors');
-@define('AUTHORS_ALLOW_SELECT', 'Allow visitors to display multiple authors at once?');
-@define('AUTHORS_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each author in this sidebar plugin.  Users can check those boxes and see entries matching their selection.');
-@define('AUTHOR_PLUGIN_DESC', 'Shows a list of authors');
+@define('INSTALL_PERMALINK_FEEDAUTHOR', 'Permalink-Struktur für RSS-Autoren-Feed URLs');
+@define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', 'Legt die relative URL-Struktur fest (beginnend mit der Stamm-URL), mit der gewählte RSS-Feeds von Autoren dargestellt werden. Die Variablen %id%, %realname%, %username%, %email% und jede anderen normalen Zeichen sind möglich.');
+@define('INSTALL_PERMALINK_AUTHORSPATH', 'Pfad zu den Autoren');
+@define('AUTHORS', 'Autoren');
+@define('AUTHORS_ALLOW_SELECT', 'Ermöglicht Besuchern, Einträge mehrerer Autoren gleichzeitig darzustellen?');
+@define('AUTHORS_ALLOW_SELECT_DESC', 'Falls diese Option aktiviert ist, wird eine Checkbox neben jedem Autoren angezeigt, damit Besucher mehrere Autoren gleichzeitig auswählen können.');
+@define('AUTHOR_PLUGIN_DESC', 'Zeigt die Liste aller Autoren');