diff options
Diffstat (limited to 'mod/reportedcontent')
| -rw-r--r--[-rwxr-xr-x] | mod/reportedcontent/graphics/icon_reportthis.gif | bin | 570 -> 570 bytes | |||
| -rw-r--r-- | mod/reportedcontent/languages/en.php | 6 | ||||
| -rw-r--r-- | mod/reportedcontent/manifest.xml | 10 | ||||
| -rw-r--r-- | mod/reportedcontent/start.php | 11 | ||||
| -rw-r--r-- | mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php (renamed from mod/reportedcontent/views/default/admin/utilities/reportedcontent.php) | 2 | ||||
| -rw-r--r-- | mod/reportedcontent/views/default/forms/reportedcontent/add.php | 2 | ||||
| -rw-r--r-- | mod/reportedcontent/views/default/object/reported_content.php | 54 | ||||
| -rw-r--r-- | mod/reportedcontent/views/default/reportedcontent/admin_css.php | 20 | ||||
| -rw-r--r-- | mod/reportedcontent/views/default/widgets/reportedcontent/content.php | 5 |
9 files changed, 68 insertions, 42 deletions
diff --git a/mod/reportedcontent/graphics/icon_reportthis.gif b/mod/reportedcontent/graphics/icon_reportthis.gif Binary files differindex 0590f96e6..0590f96e6 100755..100644 --- a/mod/reportedcontent/graphics/icon_reportthis.gif +++ b/mod/reportedcontent/graphics/icon_reportthis.gif diff --git a/mod/reportedcontent/languages/en.php b/mod/reportedcontent/languages/en.php index 407717082..c2e197879 100644 --- a/mod/reportedcontent/languages/en.php +++ b/mod/reportedcontent/languages/en.php @@ -8,7 +8,7 @@ $english = array( 'item:object:reported_content' => 'Reported items', - 'admin:utilities:reportedcontent' => 'Reported content', + 'admin:administer_utilities:reportedcontent' => 'Reported content', 'reportedcontent' => 'Reported content', 'reportedcontent:this' => 'Report this', 'reportedcontent:this:tooltip' => 'Report this page to an administrator', @@ -23,8 +23,8 @@ $english = array( 'reportedcontent:archived' => 'The report has been archived', 'reportedcontent:visit' => 'Visit reported item', 'reportedcontent:by' => 'Report by', - 'reportedcontent:objecttitle' => 'Object title', - 'reportedcontent:objecturl' => 'Object url', + 'reportedcontent:objecttitle' => 'Page title', + 'reportedcontent:objecturl' => 'Page url', 'reportedcontent:reason' => 'Reason for report', 'reportedcontent:description' => 'Why are you reporting this?', 'reportedcontent:address' => 'Location of the item', diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index a219fce7f..e96620b01 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -2,15 +2,15 @@ <plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8"> <name>Reported Content</name> <author>Core developers</author> - <version>1.7</version> + <version>1.8</version> + <category>bundled</category> <description>Adds the option for users to report content and for admins to check it out.</description> <website>http://www.elgg.org/</website> <copyright>See COPYRIGHT.txt</copyright> - <license>GNU Public License version 2</license> + <license>GNU General Public License version 2</license> <requires> - <type>elgg_version</type> - <version>2010030101</version> + <type>elgg_release</type> + <version>1.8</version> </requires> <activate_on_install>true</activate_on_install> - <admin_interface>advanced</admin_interface> </plugin_manifest> diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php index b92ab0f30..8b18a4d64 100644 --- a/mod/reportedcontent/start.php +++ b/mod/reportedcontent/start.php @@ -21,7 +21,7 @@ function reportedcontent_init() { // Extend footer with report content link if (elgg_is_logged_in()) { - $href = "javascript:elgg.forward('pg/reportedcontent/add'"; + $href = "javascript:elgg.forward('reportedcontent/add'"; $href .= "+'?address='+encodeURIComponent(location.href)"; $href .= "+'&title='+encodeURIComponent(document.title));"; @@ -30,15 +30,16 @@ function reportedcontent_init() { 'href' => $href, 'title' => elgg_echo('reportedcontent:this:tooltip'), 'text' => elgg_view_icon('report-this') . elgg_echo('reportedcontent:this'), - 'section' => 'alt', 'priority' => 500, + 'section' => 'alt', )); } elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'reportedcontent_user_hover_menu'); // Add admin menu item - elgg_register_admin_menu_item('reportedcontent', 'utilities'); + // @todo Might want to move this to a 'feedback' section. something other than utils + elgg_register_admin_menu_item('administer', 'reportedcontent', 'administer_utilities'); elgg_register_widget_type( 'reportedcontent', @@ -59,6 +60,7 @@ function reportedcontent_init() { * Serves the add report page * * @param array $page Array of page routing elements + * @return bool */ function reportedcontent_page_handler($page) { // only logged in users can report things @@ -75,6 +77,7 @@ function reportedcontent_page_handler($page) { $body = elgg_view_layout('one_sidebar', $params); echo elgg_view_page(elgg_echo('reportedcontent:this'), $body); + return true; } /** @@ -85,7 +88,7 @@ function reportedcontent_user_hover_menu($hook, $type, $return, $params) { $profile_url = urlencode($user->getURL()); $name = urlencode($user->name); - $url = "pg/reportedcontent/add/?address=$profile_url&title=$name"; + $url = "reportedcontent/add?address=$profile_url&title=$name"; if (elgg_is_logged_in() && elgg_get_logged_in_user_guid() != $user->guid) { $item = new ElggMenuItem( diff --git a/mod/reportedcontent/views/default/admin/utilities/reportedcontent.php b/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php index 32f108312..ed52a536d 100644 --- a/mod/reportedcontent/views/default/admin/utilities/reportedcontent.php +++ b/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php @@ -5,7 +5,7 @@ * @package ElggReportedContent */ -$list = elgg_list_entities(array('types' => 'object', 'subtypes' => 'reported_content')); +$list = elgg_list_entities(array('type' => 'object', 'subtype' => 'reported_content')); if (!$list) { $list = '<p class="mtm">' . elgg_echo('reportedcontent:none') . '</p>'; } diff --git a/mod/reportedcontent/views/default/forms/reportedcontent/add.php b/mod/reportedcontent/views/default/forms/reportedcontent/add.php index 0b1716a35..f9986849d 100644 --- a/mod/reportedcontent/views/default/forms/reportedcontent/add.php +++ b/mod/reportedcontent/views/default/forms/reportedcontent/add.php @@ -48,7 +48,7 @@ $owner = elgg_get_logged_in_user_entity(); )); ?> </div> -<div> +<div class="elgg-foot"> <?php echo elgg_view('input/submit', array( 'value' => elgg_echo('reportedcontent:report'), diff --git a/mod/reportedcontent/views/default/object/reported_content.php b/mod/reportedcontent/views/default/object/reported_content.php index 044a40012..cc33f54fb 100644 --- a/mod/reportedcontent/views/default/object/reported_content.php +++ b/mod/reportedcontent/views/default/object/reported_content.php @@ -21,13 +21,15 @@ if ($report->state == 'archived') { ?> <div class="reported-content <?php echo $reportedcontent_background; ?>"> - <div class="clearfix controls"> + <div class="clearfix"> + <div class="clearfix controls"> <?php if ($report->state != 'archived') { $params = array( 'href' => $archive_url, 'text' => elgg_echo('reportedcontent:archive'), 'is_action' => true, + 'is_trusted' => true, 'class' => 'elgg-button elgg-button-action', ); echo elgg_view('output/url', $params); @@ -36,41 +38,45 @@ if ($report->state == 'archived') { 'href' => $delete_url, 'text' => elgg_echo('reportedcontent:delete'), 'is_action' => true, + 'is_trusted' => true, 'class' => 'elgg-button elgg-button-action', ); echo elgg_view('output/url', $params); ?> - </div> - <p> - <b><?php echo elgg_echo('reportedcontent:by'); ?>:</b> - <?php echo elgg_view('output/url', array( - 'href' => $reporter->getURL(), - 'text' => $reporter->name - )); - ?>, - <?php echo elgg_view_friendly_time($report->time_created); ?> - </p> - <p> - <b><?php echo elgg_echo('reportedcontent:objecttitle'); ?>:</b> - <?php echo $report->title; ?> - <br /> - <?php echo elgg_view('output/url', array( - 'href' => "#report-$report->guid", - 'text' => elgg_echo('reportedcontent:moreinfo'), - 'class' => "elgg-toggler", - )); - ?> - </p> - <div class="hidden" id="report-<?php echo $report->getGUID();?>"> + </div> + <p> + <b><?php echo elgg_echo('reportedcontent:by'); ?>:</b> + <?php echo elgg_view('output/url', array( + 'href' => $reporter->getURL(), + 'text' => $reporter->name, + 'is_trusted' => true, + )); + ?>, + <?php echo elgg_view_friendly_time($report->time_created); ?> + </p> + <p> + <b><?php echo elgg_echo('reportedcontent:objecttitle'); ?>:</b> + <?php echo $report->title; ?> <p> <b><?php echo elgg_echo('reportedcontent:objecturl'); ?>:</b> <?php echo elgg_view('output/url', array( 'href' => $report->address, - 'text' => elgg_echo('reportedcontent:visit') + 'text' => elgg_echo('reportedcontent:visit'), + 'is_trusted' => true, )); ?> </p> <p> + <?php echo elgg_view('output/url', array( + 'href' => "#report-$report->guid", + 'text' => elgg_echo('reportedcontent:moreinfo'), + 'rel' => "toggle", + )); + ?> + </p> + </div> + <div class="report-details hidden" id="report-<?php echo $report->getGUID();?>"> + <p> <b><?php echo elgg_echo('reportedcontent:reason'); ?>:</b> <?php echo $report->description; ?> </p> diff --git a/mod/reportedcontent/views/default/reportedcontent/admin_css.php b/mod/reportedcontent/views/default/reportedcontent/admin_css.php index 02c235a99..1ed240f3b 100644 --- a/mod/reportedcontent/views/default/reportedcontent/admin_css.php +++ b/mod/reportedcontent/views/default/reportedcontent/admin_css.php @@ -8,10 +8,12 @@ /* REPORTED CONTENT */ .reported-content { - margin: 5px 0 0 0; + margin: 5px 0 0; padding: 5px 7px 3px 9px; + -webkit-border-radius: 5px; -moz-border-radius: 5px; + border-radius: 5px; } .reported-content p { margin: 0; @@ -26,5 +28,19 @@ } .reported-content .controls { float: right; - margin: 14px 5px 0 0; + margin: 5px 0 0 10px; +} +.report-details { + background-color: white; + padding: 5px; + margin-bottom: 5px; + max-width: 500px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.elgg-widget-content .reported-content .elgg-button { + display: block; + margin: 5px; } diff --git a/mod/reportedcontent/views/default/widgets/reportedcontent/content.php b/mod/reportedcontent/views/default/widgets/reportedcontent/content.php index 4f8906ef2..0095decca 100644 --- a/mod/reportedcontent/views/default/widgets/reportedcontent/content.php +++ b/mod/reportedcontent/views/default/widgets/reportedcontent/content.php @@ -4,9 +4,10 @@ */ $list = elgg_list_entities(array( - 'types' => 'object', - 'subtypes' => 'reported_content', + 'type' => 'object', + 'subtype' => 'reported_content', 'limit' => $vars['entity']->num_display, + 'pagination' => false, )); if (!$list) { $list = '<p class="mtm">' . elgg_echo('reportedcontent:none') . '</p>'; |
