From 6019b968eeed9c54fd3e5fbbf69c84c7c3c4fd40 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 6 Dec 2007 11:10:36 +0000 Subject: [PATCH] Shuffle NEWS, undo Don's last patch that removed 1.3 features --- docs/NEWS | 87 +++++++++++++++++---------------- include/plugin_internal.inc.php | 37 +++++++++----- 2 files changed, 71 insertions(+), 53 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index d50b5e1..a46c6cf 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,70 +3,61 @@ Version 1.3 () ------------------------------------------------------------------------ - * Added new parameter "joinown" and "entryprops" to {serendipity_ - fetchPrintEntries} smarty function, to be able to fetch entries - according to their entryprops or other custom SQL. + * Add spartacus remote management versioning information subpage. (garvinhicking) - * Added LifeType importer (garvinhicking) - - * Updated Textile library to 2.0, by Lars Strojny - * Allow the "send mail" plugin to send mails to all registered authors (garvinhicking) - * Add spartacus remote management versioning information subpage. - (garvinhicking) + * New spam blocking method for trackbacks: ip validation. The + senders ip is compared with the ip of the host, the trackback is + set to. If they don't match, the trackback is rejected/moderated. + This should reject most of the trackback spam bots. (brockhaus) - * Patch popup-HTML-code insertion javascript to better inter- - operate with tinymce, xinha or fckeditor. Thanks to - Assen Tchorbadjiev. - - * Updated WordPress imported to be able to import from a 2.3 - structure (experimental). Also added WPXRSS import to the - generic RSS importer. (garvinhicking) + * Updated karma plugin to not track clicks of registered users + (brockhaus) - * Fix wrong entry timestamp used in comment feeds (garvinhicking) + * Made short-urls index.php?serendipity[id]=X or index.php?p=X + properly show a single entry view (garvinhicking) - * Add experimental DB layer for "SQLRelay" database proxy extension, - by Dante Mason + * Added new parameter "joinown" and "entryprops" to {serendipity_ + fetchPrintEntries} smarty function, to be able to fetch entries + according to their entryprops or other custom SQL. + (garvinhicking) - * Highlighting searched words in entries now uses str_replace instead - of slower and possibly insecure preg_replace(). Thanks to - Dietrich Raisin! - * New plugin API method "parseTemplate($filename)" to allow a sidebar- or event-plugin to fetch+display a smarty template. (garvinhicking) - * Made short-urls index.php?serendipity[id]=X or index.php?p=X - properly show a single entry view (garvinhicking) + * The archive sidebar plugin shiped with s9y now displays numbers + of articles correctly for month, catergories and so on, even + if multicategory articles are used. (brockhaus) - * Extended spam blocking plugin to handle pingbacks like trackbacks. + * Added LifeType importer (garvinhicking) + + * The recent entries sidebar plugin shiped with s9y listed entries + not accessable by the current user because of right restrictions. (brockhaus) - * Pingback receiving is working now with internal functionality in - comment.php Smarty trackback loader now loads trackbacks and - pingbacks (brockhaus) + * Patch popup-HTML-code insertion javascript to better inter- + operate with tinymce, xinha or fckeditor. Thanks to + Assen Tchorbadjiev. + + * Add experimental DB layer for "SQLRelay" database proxy extension, + by Dante Mason * On the fly update of the media database: Not only images are added but video and audio, too. (brockhaus) - * New spam blocking method for trackbacks: ip validation. The - senders ip is compared with the ip of the host, the trackback is - set to. If they don't match, the trackback is rejected/moderated. - This should reject most of the trackback spam bots. (brockhaus) - - * The recent entries sidebar plugin shiped with s9y listed entries - not accessable by the current user because of right restrictions. - (brockhaus) + * Trackbacks to links without a RDF-description now get properly + evaluated. Mostly WordPress-specific. (brockhaus) - * The archive sidebar plugin shiped with s9y now displays numbers - of articles correctly for month, catergories and so on, even - if multicategory articles are used. (brockhaus) + * Pingback receiving is working now with internal functionality in + comment.php Smarty trackback loader now loads trackbacks and + pingbacks (brockhaus) - * Trackbacks to links without a description now get properly - evaluated. (brockhaus) + * Extended spam blocking plugin to handle pingbacks like trackbacks. + (brockhaus) * Full pingback support, fallback trackback method for WordPress blogs. (brockhaus) @@ -74,6 +65,18 @@ Version 1.3 () Version 1.2.1 () ------------------------------------------------------------------------ + * Updated Textile library to 2.0, by Lars Strojny + + * Fix wrong entry timestamp used in comment feeds (garvinhicking) + + * Highlighting searched words in entries now uses str_replace instead + of slower and possibly insecure preg_replace(). Thanks to + Dietrich Raisin! + + * Updated WordPress imported to be able to import from a 2.3 + structure (experimental). Also added WPXRSS import to the + generic RSS importer. (garvinhicking) + * Fix proper encoding of '%' sign when used in post titles (garvinhicking) diff --git a/include/plugin_internal.inc.php b/include/plugin_internal.inc.php index 6de9ca0..4355c6b 100644 --- a/include/plugin_internal.inc.php +++ b/include/plugin_internal.inc.php @@ -1,4 +1,4 @@ - + @@ -400,7 +401,7 @@ class serendipity_archives_plugin extends serendipity_plugin { $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); $propbag->add('version', '1.0'); - $propbag->add('configuration', array('title', 'frequency', 'count', 'show_count')); + $propbag->add('configuration', array('title', 'frequency', 'count', 'show_count', 'hide_zero_count')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -436,6 +437,13 @@ class serendipity_archives_plugin extends serendipity_plugin { $propbag->add('default', false); break; + case 'hide_zero_count': + $propbag->add('type', 'boolean'); + $propbag->add('name', CATEGORY_PLUGIN_HIDEZEROCOUNT); + $propbag->add('description', ''); + $propbag->add('default', false); + break; + default: return false; } @@ -451,15 +459,18 @@ class serendipity_archives_plugin extends serendipity_plugin { $ts = mktime(0, 0, 0, date('m'), 1); $add_query = ''; - if (isset($serendipity['GET']['category'])) { + + $category_set = isset($serendipity['GET']['category']); + if ($category_set) { $base_query = 'C' . (int)$serendipity['GET']['category']; $add_query = '/' . $base_query; } $max_x = $this->get_config('count', 3); $show_count = serendipity_db_bool($this->get_config('show_count', false)); + $hide_zero_count = serendipity_db_bool($this->get_config('hide_zero_count', false)); $freq = $this->get_config('frequency', 'months'); - + for($x = 0; $x < $max_x; $x++) { $current_ts = $ts; switch($freq) { @@ -515,6 +526,7 @@ class serendipity_archives_plugin extends serendipity_plugin { $link = serendipity_rewriteURL(PATH_ARCHIVES . '/' . $linkStamp . $add_query . '.html', 'serendipityHTTPPath'); $html_count = ''; + $hidden_by_zero_count = false; if ($show_count) { switch($freq) { case 'months': @@ -540,22 +552,25 @@ class serendipity_archives_plugin extends serendipity_plugin { true, 'count(e.id) AS orderkey', '', - 'single' + 'single', + false, $category_set // the joins used ); if (is_array($ec)) { if (empty($ec['orderkey'])) { $ec['orderkey'] = '0'; } + $hidden_by_zero_count = $hide_zero_count && ( $ec['orderkey'] == '0'); $html_count .= ' (' . $ec['orderkey'] . ')'; } } - echo '' . $ts_title . $html_count . '
' . "\n"; - + if (!$hidden_by_zero_count) { + echo '' . $ts_title . $html_count . '
' . "\n"; + } } - echo '' . RECENT . '
' . "\n"; + echo '' . RECENT . '
' . "\n"; echo '' . OLDER . ''. "\n"; } } @@ -1132,7 +1147,7 @@ class serendipity_superuser_plugin extends serendipity_plugin { $link = $base . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] .'?/' : '') . PATH_ADMIN; $text = (($_SESSION['serendipityAuthedUser'] === true) ? SUPERUSER_OPEN_ADMIN : SUPERUSER_OPEN_LOGIN); - echo ''. $text .''; + echo ''. $text .''; } function introspect_config_item($name, &$propbag) @@ -1560,7 +1575,7 @@ class serendipity_categories_plugin extends serendipity_plugin { $categories[$cid]['feedCategoryURL'] = serendipity_feedCategoryURL($cat, 'serendipityHTTPPath'); $categories[$cid]['categoryURL'] = serendipity_categoryURL($cat, 'serendipityHTTPPath'); $categories[$cid]['paddingPx'] = $cat['depth']*6; - $categories[$cid]['catdepth'] = $cat['depth']; + $categories[$cid]['catdepth'] = $cat['depth']; if (!empty($cat_count[$cat['categoryid']])) { $categories[$cid]['true_category_name'] = $cat['category_name']; @@ -1568,7 +1583,7 @@ class serendipity_categories_plugin extends serendipity_plugin { } if (!$smarty) { - $html .= '
  • '; + $html .= '
  • '; if ($is_form) { $html .= ''; -- 2.39.5