function __construct()
 {
     qw_add_action('qw_event_q_queue', array($this, 'send_default_emails'));
     qw_add_action('qw_event_q_requeue', array($this, 'send_default_emails'));
     qw_add_action('qw_event_a_queue', array($this, 'send_default_emails'));
     qw_add_action('qw_event_a_requeue', array($this, 'send_default_emails'));
     qw_add_action('qw_event_c_queue', array($this, 'send_default_emails'));
     qw_add_action('qw_event_c_requeue', array($this, 'send_default_emails'));
     qw_add_action('qw_event_q_flag', array($this, 'send_default_emails'));
     qw_add_action('qw_event_a_flag', array($this, 'send_default_emails'));
     qw_add_action('qw_event_c_flag', array($this, 'send_default_emails'));
     qw_add_action('qw_event_u_register', array($this, 'send_default_emails'));
 }
示例#2
0
 function __construct()
 {
     qw_add_filter('init_queries', array($this, 'init_queries'));
     qw_event_hook('enqueue_css', NULL, array($this, 'css'));
     qw_event_hook('enqueue_scripts', NULL, array($this, 'scripts'));
     qw_event_hook('qw_ajax_activitylist', NULL, array($this, 'activitylist'));
     qw_event_hook('qw_ajax_messagelist', NULL, array($this, 'messagelist'));
     qw_event_hook('qw_ajax_mark_all_activity', NULL, array($this, 'mark_all_activity'));
     qw_event_hook('qw_ajax_mark_all_messages', NULL, array($this, 'mark_all_messages'));
     qw_event_hook('qw_ajax_activity_count', NULL, array($this, 'activity_count'));
     qw_event_hook('qw_ajax_messages_count', NULL, array($this, 'messages_count'));
     // qw_event_hook('language', NULL, array($this, 'language'));
     qw_event_hook('register_language', NULL, array($this, 'language'));
     // added hooks for options and option tabs
     qw_add_action('qw_theme_option_tab', array($this, 'option_tab'));
     qw_add_action('qw_theme_option_tab_content', array($this, 'option_tab_content'));
     qw_add_action('qw_reset_theme_options', array($this, 'reset_theme_options'));
     qw_event_hook('doctype', NULL, array($this, 'navigation'));
 }
示例#3
0
qw_add_action('user_event_a_approve', 'qw_notification_event');
qw_add_action('user_event_c_approve', 'qw_notification_event');
qw_add_action('user_event_q_reject', 'qw_notification_event');
qw_add_action('user_event_a_reject', 'qw_notification_event');
qw_add_action('user_event_c_reject', 'qw_notification_event');
qw_add_action('user_event_q_favorite', 'qw_notification_event');
qw_add_action('user_event_q_post', 'qw_notification_event');
qw_add_action('user_event_u_favorite', 'qw_notification_event');
qw_add_action('user_event_u_message', 'qw_notification_event');
qw_add_action('user_event_u_wall_post', 'qw_notification_event');
qw_add_action('user_event_u_level', 'qw_notification_event');
//added for related questions
qw_add_action('user_event_related', 'qw_notification_event');
qw_add_action('user_event_q_post_user_fl', 'qw_notification_event');
qw_add_action('user_event_q_post_tag_fl', 'qw_notification_event');
qw_add_action('user_event_q_post_cat_fl', 'qw_notification_event');
function qw_notification_event($postid, $userid, $effecteduserid, $params, $event)
{
    $loggeduserid = isset($userid) ? $userid : qa_get_logged_in_userid();
    if (!!$effecteduserid) {
        qw_notify_users_by_email($event, $postid, $loggeduserid, $effecteduserid, $params);
    }
}
function qw_process_emails_from_db()
{
    require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
    require_once QA_INCLUDE_DIR . 'qa-util-string.php';
    //here extract all the email contents from database and perform the email sending operation
    $email_queue_data = qw_get_email_queue();
    $email_list = qw_get_email_list($email_queue_data);
    $subs = array();