aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/views/default/reportedcontent
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-12 21:25:57 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-12 21:25:57 +0000
commitf1230a2c6b8bf0586447e4f9bad2089b7cc3b8bf (patch)
tree96e13233a5635166126b0fccf06a110edda79ca7 /mod/reportedcontent/views/default/reportedcontent
parent70d21050c08ddf8ee5253b6e6cd6c16fa125ef74 (diff)
downloadelgg-f1230a2c6b8bf0586447e4f9bad2089b7cc3b8bf.tar.gz
elgg-f1230a2c6b8bf0586447e4f9bad2089b7cc3b8bf.tar.bz2
report content added as a core plugin. Still needs a couple of bits wired up.
git-svn-id: https://code.elgg.org/elgg/trunk@1867 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/views/default/reportedcontent')
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/form.php71
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/listing.php24
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/user_report.php6
3 files changed, 101 insertions, 0 deletions
diff --git a/mod/reportedcontent/views/default/reportedcontent/form.php b/mod/reportedcontent/views/default/reportedcontent/form.php
new file mode 100644
index 000000000..64a06bb63
--- /dev/null
+++ b/mod/reportedcontent/views/default/reportedcontent/form.php
@@ -0,0 +1,71 @@
+<?php
+
+ /**
+ * Elgg report content plugin form
+ *
+ * @package ElggReportContent
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ $guid = 0;
+ $title = get_input('title',"");
+ $description = "";
+ $address = get_input('address',"");
+ if ($address == "previous")
+ $address = $_SERVER['HTTP_REFERER'];
+ $tags = array();
+ $access_id = 0;
+ $shares = array();
+ $owner = $vars['user'];
+
+?>
+
+ <form action="<?php echo $vars['url']; ?>action/reportedcontent/add" method="post">
+
+ <p>
+ <label>
+ <?php echo elgg_echo('reportedcontent:title'); ?>
+ <?php
+
+ echo elgg_view('input/text',array(
+ 'internalname' => 'title',
+ 'value' => $title,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <label>
+ <?php echo elgg_echo('reportedcontent:address'); ?>
+ <?php
+
+ echo elgg_view('input/url',array(
+ 'internalname' => 'address',
+ 'value' => $address,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <label>
+ <?php echo elgg_echo('reportedcontent:description'); ?>
+ <?php
+
+ echo elgg_view('input/longtext',array(
+ 'internalname' => 'description',
+ 'value' => $description,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <input type="submit" value="<?php echo elgg_echo('report'); ?>" />
+ </p>
+
+ </form> \ No newline at end of file
diff --git a/mod/reportedcontent/views/default/reportedcontent/listing.php b/mod/reportedcontent/views/default/reportedcontent/listing.php
new file mode 100644
index 000000000..1976d0946
--- /dev/null
+++ b/mod/reportedcontent/views/default/reportedcontent/listing.php
@@ -0,0 +1,24 @@
+<?php
+
+ if($vars['entity']){
+
+ foreach($vars['entity'] as $report){
+
+ //get the user making the report
+ $user = get_user($report->owner_guid)->name;
+ $user_url = get_user($report->owner_guid)->getURL();
+
+ echo "<div class=\"reported_content\">";
+ echo "<p class=\"reported_detail\"><b>" . elgg_echo('reportedcontent:by') . ": </b><a href=\"{$user_url}\">" . $user . "</a>, " . friendly_time($report->time_created) . "</p>";
+ echo "<p class=\"reported_detail\"><b>" . elgg_echo('reportedcontent:objecttitle') . ": </b>" . $report->title . "</p>";
+ echo "<p class=\"reported_detail\"><b>" . elgg_echo('reportedcontent:objecturl') . ": </b><a href=\"{$report->address}\">" . $report->address . "</a></p>";
+ echo "<p class=\"reported_detail\"><b>" . elgg_echo('reportedcontent:reason') . ": </b>" .$report->description . "</p>";
+ echo "<p class=\"reported_detail\">[<a href=\"\">" . elgg_echo('reportedcontent:archive') . "</a>] - [<a href=\"\">" . elgg_echo('reportedcontent:delete') . "</a>]</p>";
+ echo elgg_view_comments($report);
+ echo "</div>";
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/mod/reportedcontent/views/default/reportedcontent/user_report.php b/mod/reportedcontent/views/default/reportedcontent/user_report.php
new file mode 100644
index 000000000..6077ca620
--- /dev/null
+++ b/mod/reportedcontent/views/default/reportedcontent/user_report.php
@@ -0,0 +1,6 @@
+
+<p class="user_menu_profile">
+<?php
+ echo "<a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>";
+?>
+</p> \ No newline at end of file