Index: trunk/wp-content/plugins/xpressme/include/notify_functions.php
===================================================================
--- trunk/wp-content/plugins/xpressme/include/notify_functions.php	(revision 61)
+++ trunk/wp-content/plugins/xpressme/include/notify_functions.php	(revision 61)
@@ -0,0 +1,40 @@
+<?php
+	
+function onaction_publish_post_notify($post_id)
+{
+	include_once ABSPATH . '/include/notification.inc.sub.php';
+	do_PostNotifications($post_id,'newpost');
+}
+function onaction_edit_post_notify($post_id)
+{
+	include_once ABSPATH . '/include/notification.inc.sub.php';
+	do_PostNotifications($post_id,'editpost');
+}
+
+function onaction_comment_notify($commentID){
+	global $wpdb;
+	$status = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_ID = $commentID");
+	$post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $commentID");
+
+	if ($status ==1){
+		include_once ABSPATH . '/include/notification.inc.sub.php';
+		do_CommentNotifications($commentID, $post_id);
+	} else {
+		require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ;
+		$notification_handler =& xoops_gethandler( 'notification' ) ;
+		$notification_handler->triggerEvent( 'global' , 0 , 'waiting') ;
+	}
+}
+
+function onaction_comment_apobe_notify($commentID){
+	global $wpdb;
+	$comment_type = $wpdb->get_var("SELECT comment_type FROM $wpdb->comments WHERE comment_ID = $commentID");
+	$status = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_ID = $commentID");
+	if(is_null($status)) return;
+	//	$status = wp_get_comment_status($commentID);
+	if ($status == 1){
+			onaction_comment_notify($commentID);
+	}
+}
+
+?>
Index: trunk/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- trunk/wp-content/plugins/xpressme/xpressme.php	(revision 57)
+++ trunk/wp-content/plugins/xpressme/xpressme.php	(revision 61)
@@ -37,4 +37,13 @@
 add_action("the_content",	"set_post_views_count");
 
+//XOOPS notifiction
+require_once dirname( __FILE__ ).'/include/notify_functions.php' ;
+add_action("private_to_published",	"onaction_publish_post_notify");
+//	add_action("edit_post",	"onaction_edit_post_notify");
+add_action("comment_post",	"onaction_comment_notify");
+//	add_action("approve_comment" , "onaction_comment_apobe_notify");
+add_action("wp_set_comment_status" , "onaction_comment_apobe_notify");
+
+
 
 //require_once('../include/custom_functions.php');
