mirror of https://github.com/BOINC/boinc.git
Reporting forum posts
Added moderator notification rule for forum topics that are reported. This report will send an email to all users in the moderator role. (DBOINCP-44)
This commit is contained in:
parent
c76b3741ea
commit
e4a0cbfd8b
|
@ -31,10 +31,10 @@ function boinc_standard_flag_default_flags() {
|
|||
$flags['abuse_comment'] = array(
|
||||
'content_type' => 'comment',
|
||||
'title' => 'Comment Abuse',
|
||||
'global' => '0',
|
||||
'global' => FALSE,
|
||||
'types' => array(
|
||||
'0' => 'news',
|
||||
'1' => 'forum',
|
||||
'0' => 'forum',
|
||||
'1' => 'news',
|
||||
),
|
||||
'flag_short' => 'Report',
|
||||
'flag_long' => 'Report this content as offensive.',
|
||||
|
@ -65,7 +65,7 @@ function boinc_standard_flag_default_flags() {
|
|||
$flags['abuse_node'] = array(
|
||||
'content_type' => 'node',
|
||||
'title' => 'Node Abuse',
|
||||
'global' => '0',
|
||||
'global' => FALSE,
|
||||
'types' => array(
|
||||
'0' => 'profile',
|
||||
'1' => 'forum',
|
||||
|
@ -191,3 +191,71 @@ function boinc_standard_node_info() {
|
|||
);
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_rules_defaults().
|
||||
*/
|
||||
function boinc_standard_rules_defaults() {
|
||||
return array(
|
||||
'rules' => array(
|
||||
'rules_offensive_content_reported' => array(
|
||||
'#type' => 'rule',
|
||||
'#set' => 'event_flag_flagged_abuse_node',
|
||||
'#label' => 'Offensive content reported',
|
||||
'#active' => 1,
|
||||
'#weight' => '0',
|
||||
'#categories' => array(
|
||||
'0' => 'moderator notification',
|
||||
'boinc_standard' => 'boinc_standard',
|
||||
),
|
||||
'#status' => 'default',
|
||||
'#conditions' => array(),
|
||||
'#actions' => array(
|
||||
'0' => array(
|
||||
'#type' => 'action',
|
||||
'#settings' => array(
|
||||
'recipients' => array(
|
||||
'0' => 6,
|
||||
),
|
||||
'from' => '',
|
||||
'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
|
||||
'message' => '[flagging_user:display-name] has reported the following [node:type] content as being offensive or inappropriate for the [:global:site-name] site:
|
||||
|
||||
[:global:site-url][node:node-path]
|
||||
|
||||
Total reports of this content: [node:flag-abuse-node-count]',
|
||||
'#eval input' => array(
|
||||
'token_rules_input_evaluator' => array(
|
||||
'subject' => array(
|
||||
'0' => 'node',
|
||||
'1' => ':global',
|
||||
),
|
||||
'message' => array(
|
||||
'0' => 'flagging_user',
|
||||
'1' => 'node',
|
||||
'2' => ':global',
|
||||
),
|
||||
'from' => array(
|
||||
'0' => ':global',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'#name' => 'rules_action_mail_to_users_of_role',
|
||||
'#info' => array(
|
||||
'label' => 'Send a mail to all users of a role',
|
||||
'module' => 'System',
|
||||
'eval input' => array(
|
||||
'0' => 'subject',
|
||||
'1' => 'message',
|
||||
'2' => 'from',
|
||||
),
|
||||
),
|
||||
'#weight' => 0,
|
||||
),
|
||||
),
|
||||
'#version' => 6003,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -82,8 +82,8 @@ function boinc_standard_menu_default_menu_links() {
|
|||
);
|
||||
// Translatables
|
||||
// Included for use with string extractors like potx.
|
||||
t('Credentials');
|
||||
t('BOINC');
|
||||
t('Credentials');
|
||||
t('Dashboard');
|
||||
t('Home');
|
||||
|
||||
|
|
|
@ -8,8 +8,9 @@ dependencies[] = "boinccore"
|
|||
dependencies[] = "boincuser"
|
||||
dependencies[] = "boincwork"
|
||||
dependencies[] = "content"
|
||||
dependencies[] = "drupal_queue"
|
||||
dependencies[] = "ctools"
|
||||
dependencies[] = "diff"
|
||||
dependencies[] = "drupal_queue"
|
||||
dependencies[] = "elysia_cron"
|
||||
dependencies[] = "exportables"
|
||||
dependencies[] = "features"
|
||||
|
@ -33,7 +34,9 @@ dependencies[] = "php"
|
|||
dependencies[] = "quote"
|
||||
dependencies[] = "r4032login"
|
||||
dependencies[] = "role_delegation"
|
||||
dependencies[] = "rules"
|
||||
dependencies[] = "strongarm"
|
||||
dependencies[] = "system"
|
||||
dependencies[] = "tableofcontents"
|
||||
dependencies[] = "tabtamer"
|
||||
dependencies[] = "taxonomy"
|
||||
|
@ -69,6 +72,7 @@ features[page_manager_pages][] = "account_dashboard"
|
|||
features[page_manager_pages][] = "boinc_user"
|
||||
features[page_manager_pages][] = "home"
|
||||
features[panels_mini][] = "dashboard_tables"
|
||||
features[rules_categories][] = "moderator notification"
|
||||
features[user_permission][] = "Use PHP input for field settings (dangerous - grant with care)"
|
||||
features[user_permission][] = "access administration pages"
|
||||
features[user_permission][] = "access all views"
|
||||
|
|
Loading…
Reference in New Issue