[pLog-svn] r5493 - in plog/branches/lifetype-1.2/class: action/admin plugin

oscar at devel.lifetype.net oscar at devel.lifetype.net
Tue Jun 5 16:22:35 EDT 2007


Author: oscar
Date: 2007-06-05 16:22:35 -0400 (Tue, 05 Jun 2007)
New Revision: 5493

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminpreviewpostaction.class.php
   plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php
Log:
Implemented feature request http://bugs.lifetype.net/view.php?id=1324 -- added a new event called EVENT_ARTICLE_PREVIEW that is thrown just before a post preview is generated.


Modified: plog/branches/lifetype-1.2/class/action/admin/adminpreviewpostaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminpreviewpostaction.class.php	2007-06-05 18:42:12 UTC (rev 5492)
+++ plog/branches/lifetype-1.2/class/action/admin/adminpreviewpostaction.class.php	2007-06-05 20:22:35 UTC (rev 5493)
@@ -81,6 +81,9 @@
 			// a real article just fetched from the database (even though it makes no difference
 			// to the class itself whence the article came from :)
 			
+			// throw the EVENT_ARTICLE_PREVIEW event in case a plugin wants to do something with it
+			$this->notifyEvent( EVENT_ARTICLE_PREVIEW, Array( "article" => &$article ));
+			
 			// the 'random' parameter in the array is to provide the view with a random view id
 			// every time that we run the preview, otherwise when caching is enabled we would always be
 			// getting the same page!!

Modified: plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php
===================================================================
--- plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php	2007-06-05 18:42:12 UTC (rev 5492)
+++ plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php	2007-06-05 20:22:35 UTC (rev 5493)
@@ -187,4 +187,6 @@
 	define( "EVENT_POST_DELETE_PERMISSION", ++$eventValue );
     define( "EVENT_PROCESS_BLOG_ADMIN_TEMPLATE_OUTPUT", ++$eventValue );
     define( "EVENT_POST_ADMIN_PURGE_TEMP_FOLDER", ++$eventValue );
+	// generation of a post preview
+	define( "EVENT_ARTICLE_PREVIEW", ++$eventValue );
 ?>
\ No newline at end of file



More information about the pLog-svn mailing list