Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21886
Modified Files:
NEWS serendipity_functions.inc.php serendipity_plugin_api.php
Log Message:
news adjusted to -pl1
added plugin api changes from jonathan arkell
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- NEWS 14 May 2004 19:05:48 -0000 1.124
+++ NEWS 15 May 2004 11:00:16 -0000 1.125
@@ -3,11 +3,16 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Plugin API: Introduced function 'is_event_plugin' for easier
+ integration (Jonathan Arkell)
+
+ * New event hook 'entry_display' inside of serendipity_printEntries().
+ Can be used to force entries not being shown by setting the
+ $eventData['clean_page'] variable to 'true'. (Jonathan Arkell)
+
* Don't show "expand"/"toggle all" buttons if there are only one section
availiable (tomsommer)
- * Fixed trackbacks not associated to the right entry id (garvinhicking)
-
* Redesigned admin interface for editing entries: Adjust items per
page, sort order, filter mode, combined EDIT+DELETE interface into
one. Introduced new css classes "serendipity_admin_list_item_even"
@@ -85,6 +90,13 @@
* Configuration is now language-dependant. (garvinhicking)
+Version 0.6-pl1 (May 15th, 2004)
+------------------------------------------------------------------------
+
+ * Fixed trackbacks not associated to the right entry id (garvinhicking)
+
+ * Fixed typo in Creative Common Plugin (Jonathan Arkell)
+
Version 0.6 (May 12th, 2004)
------------------------------------------------------------------------
Index: serendipity_plugin_api.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_plugin_api.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- serendipity_plugin_api.php 13 Apr 2004 10:00:36 -0000 1.18
+++ serendipity_plugin_api.php 15 May 2004 11:00:19 -0000 1.19
@@ -145,11 +145,11 @@
continue;
}
- if ($event_only && strncmp($f, 'serendipity_event_', 18) != 0) {
+ if ($event_only && !serendipity_plugin_api::is_event_plugin($f)) {
continue;
}
- if (!$event_only && strncmp($f, 'serendipity_event_', 18) == 0) {
+ if (!$event_only && serendipity_plugin_api::is_event_plugin($f)) {
continue;
}
@@ -175,11 +175,11 @@
continue;
}
- if ($event_only && strncmp($f, 'serendipity_event_', 18) != 0) {
+ if ($event_only && !serendipity_plugin_api::is_event_plugin($f)) {
continue;
}
- if (!$event_only && strncmp($f, 'serendipity_event_', 18) == 0) {
+ if (!$event_only && serendipity_plugin_api::is_event_plugin($f)) {
continue;
}
@@ -349,6 +349,12 @@
return $title;
}
+ /* conditional to see if the named plugin is an event plugin
+ Refactoring: decompose conditional */
+ function is_event_plugin($name) {
+ return (strstr($name, '_event_'));
+ }
+
function &get_event_plugins($instance = false) {
global $serendipity;
@@ -572,7 +578,7 @@
foreach($this->dependencies AS $dependency => $mode) {
$exists = serendipity_plugin_api::exists($dependency);
if (!$exists) {
- if (strncmp($dependency, 'serendipity_event_', 18) == 0) {
+ if (serendipity_plugin_api::is_event_plugin($dependency)) {
$keys[] = serendipity_plugin_api::create_plugin_instance($dependency, null, 'event', $authorid);
} else {
$keys[] = serendipity_plugin_api::create_plugin_instance($dependency, null, 'right', $authorid);
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.267
retrieving revision 1.268
diff -u -d -r1.267 -r1.268
--- serendipity_functions.inc.php 14 May 2004 08:19:54 -0000 1.267
+++ serendipity_functions.inc.php 15 May 2004 11:00:17 -0000 1.268
@@ -927,6 +927,12 @@
function serendipity_printEntries($entries, $extended = 0, $preview = false) {
global $serendipity;
+ serendipity_plugin_api::hook_event('entry_display', $entries);
+
+ if (isset($entries['clean_page']) && $entries['clean_page'] === true) {
+ return; // no display of this item
+ }
+
/* pre-walk the array to collect them keyed by date */
$bydate = array();
if (!is_array($entries) || $entries[0] == false) {
|