From d543c70649ce31d24c227ca574a174d35e504d02 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 4 Oct 2005 10:11:02 +0000 Subject: [PATCH] * Some cleanuup of debug code * 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 | 3 +++ include/functions.inc.php | 6 ------ include/plugin_api.inc.php | 1 - include/plugin_internal.inc.php | 14 +++++++++++--- index.php | 10 +++------- lang/UTF-8/serendipity_lang_de.inc.php | 14 +++++++------- lang/serendipity_lang_de.inc.php | 14 +++++++------- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 6fa2751..c58b7f1 100644 --- 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) diff --git a/include/functions.inc.php b/include/functions.inc.php index a5701da..1266c45 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -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 **/ diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index b4e22c4..2b1bb8a 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -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'); diff --git a/include/plugin_internal.inc.php b/include/plugin_internal.inc.php index aab6564..b792d11 100644 --- a/include/plugin_internal.inc.php +++ b/include/plugin_internal.inc.php @@ -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 = ''; diff --git a/index.php b/index.php index 33c41f1..c80d67b 100644 --- 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'; diff --git a/lang/UTF-8/serendipity_lang_de.inc.php b/lang/UTF-8/serendipity_lang_de.inc.php index 2a6d7cf..0cd1483 100644 --- a/lang/UTF-8/serendipity_lang_de.inc.php +++ b/lang/UTF-8/serendipity_lang_de.inc.php @@ -784,10 +784,10 @@ @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'); diff --git a/lang/serendipity_lang_de.inc.php b/lang/serendipity_lang_de.inc.php index 4564400..c9307a8 100644 --- a/lang/serendipity_lang_de.inc.php +++ b/lang/serendipity_lang_de.inc.php @@ -784,10 +784,10 @@ @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'); -- 2.39.5