Commit f30fd6c4 authored by Shawn Kwang's avatar Shawn Kwang

Drupal: Changed flags machine names to 1, 2, 3.

Modified logic when flags are locked: now user sees link as 'Locked'.
Removed flag_access function.
parent 9aff2b7f
......@@ -27,21 +27,196 @@ function boinc_standard_ctools_plugin_api() {
*/
function boinc_standard_flag_default_flags() {
$flags = array();
// Exported flag: "Comment Abuse".
$flags['abuse_comment'] = array(
// Exported flag: "Comment Abuse 1".
$flags['abuse_comment_1'] = array(
'content_type' => 'comment',
'title' => 'Comment Abuse',
'title' => 'Comment Abuse 1 SPAM',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as SPAM',
'flag_long' => 'Flag this comment as SPAM.',
'flag_message' => '',
'unflag_short' => 'Unflag as SPAM',
'unflag_long' => 'Unflag this comment as SPAM.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'access_author' => '',
'show_on_comment' => 0,
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Comment Abuse 2 LINK".
$flags['abuse_comment_2'] = array(
'content_type' => 'comment',
'title' => 'Comment Abuse 2 LINK',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as abusive link',
'flag_long' => 'Flag this comment with abusive link.',
'flag_message' => '',
'unflag_short' => 'Unflag as abusive link',
'unflag_long' => 'Unflag this comment with abusive link.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'access_author' => '',
'show_on_comment' => 0,
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Comment Abuse 3 Hostile".
$flags['abuse_comment_3'] = array(
'content_type' => 'comment',
'title' => 'Comment Abuse 3 Hostile',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as hostile',
'flag_long' => 'Flag this comment as hostile.',
'flag_message' => '',
'unflag_short' => 'Unflag as hostile',
'unflag_long' => 'Unflag this comment as hostile.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'access_author' => '',
'show_on_comment' => 0,
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Comment Abuse 4 Not Kid Friendly".
$flags['abuse_comment_4'] = array(
'content_type' => 'comment',
'title' => 'Comment Abuse 4 Not Kid Friendly',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as not kid-friendly',
'flag_long' => 'Flag this comment as not kid-friendly.',
'flag_message' => '',
'unflag_short' => 'Unflag as not kid-friendly',
'unflag_long' => 'Unflag this comment as not kid-friendly.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'access_author' => '',
'show_on_comment' => 0,
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Comment Abuse 5 Other".
$flags['abuse_comment_5'] = array(
'content_type' => 'comment',
'title' => 'Comment Abuse 5 Other',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as other',
'flag_long' => 'Flag this comment - other reason',
'flag_message' => '',
'unflag_short' => 'Unflag as other',
'unflag_long' => 'Unflag this comment - other reason',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'access_author' => '',
'show_on_comment' => 0,
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Comment Abuse meta".
$flags['abuse_comment_meta'] = array(
'content_type' => 'comment',
'title' => 'Comment Abuse meta',
'global' => '0',
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Report',
'flag_long' => 'Report this content as offensive.',
'flag_long' => 'Report comment.',
'flag_message' => '',
'unflag_short' => 'Cancel report',
'unflag_long' => 'Cancel reporting this content as offensive.',
'unflag_short' => 'Cancel Report',
'unflag_long' => 'Cancel Report on comment.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
......@@ -62,21 +237,211 @@ function boinc_standard_flag_default_flags() {
),
'api_version' => 2,
);
// Exported flag: "Node Abuse".
$flags['abuse_node'] = array(
// Exported flag: "Node Abuse 1 SPAM".
$flags['abuse_node_1'] = array(
'content_type' => 'node',
'title' => 'Node Abuse 1 SPAM',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as SPAM',
'flag_long' => 'Flag this content SPAM.',
'flag_message' => '',
'unflag_short' => 'Unflag as SPAM',
'unflag_long' => 'Unflag this content as SPAM.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 2 Link".
$flags['abuse_node_2'] = array(
'content_type' => 'node',
'title' => 'Node Abuse',
'title' => 'Node Abuse 2 Link',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'profile',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Report as abusive link',
'flag_long' => 'Flag this content as abusive link.',
'flag_message' => '',
'unflag_short' => 'Unflag as abusive link',
'unflag_long' => 'Unflag this content as abusive link.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 3 Hostile".
$flags['abuse_node_3'] = array(
'content_type' => 'node',
'title' => 'Node Abuse 3 Hostile',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as hostile',
'flag_long' => 'Flag this content as hostile.',
'flag_message' => '',
'unflag_short' => 'Unflag as hostile',
'unflag_long' => 'Unflag this content as hostile.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 4 Not Kid Friendly".
$flags['abuse_node_4'] = array(
'content_type' => 'node',
'title' => 'Node Abuse 4 Not Kid Friendly',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as not kid-friendly',
'flag_long' => 'Flag this content as not kid-friendly.',
'flag_message' => '',
'unflag_short' => 'Unflag as kid-friendly',
'unflag_long' => 'Unflag this content as not kid-friendly.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 5 Other".
$flags['abuse_node_5'] = array(
'content_type' => 'node',
'title' => 'Node Abuse 5 Other',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Flag as other',
'flag_long' => 'Flag this content - other reason.',
'flag_message' => '',
'unflag_short' => 'Unflag as other',
'unflag_long' => 'Unflag this content - other reason.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse meta".
$flags['abuse_node_meta'] = array(
'content_type' => 'node',
'title' => 'Node Abuse meta',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'flag_short' => 'Report',
'flag_long' => 'Report this content as offensive.',
'flag_long' => 'Report content',
'flag_message' => '',
'unflag_short' => 'Cancel report',
'unflag_long' => 'Cancel reporting this content as offensive.',
'unflag_short' => 'Cancel Report',
'unflag_long' => 'Cancel report of content',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
......@@ -100,33 +465,155 @@ function boinc_standard_flag_default_flags() {
),
'api_version' => 2,
);
// Exported flag: "User Abuse".
$flags['abuse_user'] = array(
// Exported flag: "User Abuse 1 SPAM".
$flags['abuse_user_1'] = array(
'content_type' => 'user',
'title' => 'User Abuse',
'global' => '0',
'title' => 'User Abuse 1 SPAM',
'global' => FALSE,
'types' => array(),
'flag_short' => 'Report User',
'flag_long' => 'Report this user as offensive.',
'flag_short' => 'Report User SPAM',
'flag_long' => 'Report this user profile as SPAM.',
'flag_message' => '',
'unflag_short' => 'Remove Report',
'unflag_long' => 'Remove your report about this user.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => '2',
'0' => 2,
),
'unflag' => array(
'0' => '2',
'0' => 2,
),
),
'weight' => 0,
'show_on_profile' => 0,
'access_uid' => '',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "User Abuse 2 Link".
$flags['abuse_user_2'] = array(
'content_type' => 'user',
'title' => 'User Abuse 2 Link',
'global' => FALSE,
'types' => array(),
'flag_short' => 'Report as abusive link',
'flag_long' => 'Report user profile as abusive link.',
'flag_message' => '',
'unflag_short' => 'Remove Report',
'unflag_long' => 'Remove your report about this user.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_profile' => 0,
'access_uid' => '',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "User Abuse 3 Not Kid Friendly".
$flags['abuse_user_3'] = array(
'content_type' => 'user',
'title' => 'User Abuse 3 Not Kid Friendly',
'global' => FALSE,
'types' => array(),
'flag_short' => 'Report as not kid-friendly',
'flag_long' => 'Report this user profile as not kid-friendly.',
'flag_message' => '',
'unflag_short' => 'Remove Report',
'unflag_long' => 'Remove your report about this user.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_profile' => 0,
'access_uid' => '',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "User Abuse 4 Other".
$flags['abuse_user_4'] = array(
'content_type' => 'user',
'title' => 'User Abuse 4 Other',
'global' => FALSE,
'types' => array(),
'flag_short' => 'Other',
'flag_long' => 'Report this user profile - other reason.',
'flag_message' => '',
'unflag_short' => 'Remove Report',
'unflag_long' => 'Remove your report about this user.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_profile' => 0,
'access_uid' => '',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "User Abuse Meta".
$flags['abuse_user_meta'] = array(
'content_type' => 'user',
'title' => 'User Abuse Meta',
'global' => FALSE,
'types' => array(),
'flag_short' => 'Report User',
'flag_long' => 'Report User',
'flag_message' => '',
'unflag_short' => 'Cancel Report',
'unflag_long' => 'Cancel report of user',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'show_on_profile' => TRUE,
'show_on_profile' => 1,
'access_uid' => '',
'flag_confirmation' => 'Are you sure you want to report this user as offensive?',
'unflag_confirmation' => 'Are you sure you want to remove your report of this user?',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
......
......@@ -75,9 +75,23 @@ features[fieldgroup][] = "page-group_boinctranslate_opts"
features[filter_formats][] = "php_code"
features[filter_formats][] = "plain_text"
features[filter_formats][] = "rich_text"
features[flag][] = "abuse_comment"
features[flag][] = "abuse_node"
features[flag][] = "abuse_user"
features[flag][] = "abuse_comment_1"
features[flag][] = "abuse_comment_2"
features[flag][] = "abuse_comment_3"
features[flag][] = "abuse_comment_4"
features[flag][] = "abuse_comment_5"
features[flag][] = "abuse_comment_meta"
features[flag][] = "abuse_node_1"
features[flag][] = "abuse_node_2"
features[flag][] = "abuse_node_3"
features[flag][] = "abuse_node_4"
features[flag][] = "abuse_node_5"
features[flag][] = "abuse_node_meta"
features[flag][] = "abuse_user_1"