示例#1
0
function __wps__news_add_wall_reply_involved_in($post_to, $post_from, $from_name, $url) {
	if ($post_to != $post_from) {
		__wps__news_add($post_from, $post_to, "<a href='".$url."'>".$from_name." ".__("has replied to a post you are involved in", WPS_TEXT_DOMAIN)."</a>");
	}
}
			// Should alerts be sent out?
			$add_alerts = $wpdb->get_var($wpdb->prepare("SELECT add_alerts FROM ".$wpdb->prefix."symposium_groups WHERE gid = %d", $subject_uid));
					
			if ($recipients) {
								
				$body = "<h1>".stripslashes($group_name)."</h1>";
				$body .= "<p>".$author_name." ".__('has added a new post to the group', WPS_TEXT_DOMAIN).":</p>";
				$body .= "<p>".stripslashes($text)."</p>";
				$body .= "<p><a href='".$url."'>".__('Go to the group post', WPS_TEXT_DOMAIN)."...</a></p>";
				foreach ($recipients as $recipient) {
					if ( $recipient->ID != $current_user->ID) {
						if ($recipient->notify == 'on') {
							__wps__sendmail($recipient->user_email, __('New Group Post', WPS_TEXT_DOMAIN), $body);
						}
						if (function_exists('__wps__news_add') && $add_alerts == 'on') {
							__wps__news_add($author_uid, $recipient->ID, "<a href='".$url."'>".__("Group post:", WPS_TEXT_DOMAIN)." ".$author_name." ".__("has posted in", WPS_TEXT_DOMAIN)." ".$group_name."</a>");							
						}
					}
				}
				
			}
			
			exit;
			
		} else {

			exit;
			
		}

	} else {