summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-12-13 02:44:43 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-12-13 02:44:43 +1100
commit5adfff925b144161c840f63ebb271c11c3c0c883 (patch)
tree61fb64703460ed921354c291d4fe59a5829dc529 /inc/display.php
parent7a728f4a3e59e3deb9b466418bc62bd4eca9b5d9 (diff)
Post moderation controls
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php33
1 files changed, 31 insertions, 2 deletions
diff --git a/inc/display.php b/inc/display.php
index a5bb1c70..b8a58e2b 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -119,9 +119,38 @@
$built .= ', ' . $fraction;
}
// Filename
- $built .= ', ' . $this->filename . ')</span></p>' .
+ $built .= ', ' . $this->filename . ')</span></p>' .
+
// Thumbnail
- '<a href="' . ROOT . $board['dir'] . DIR_IMG . $this->file.'"><img src="' . ROOT . $board['dir'] . DIR_THUMB . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
+ '<a href="' . ROOT . $board['dir'] . DIR_IMG . $this->file.'"><img src="' . ROOT . $board['dir'] . DIR_THUMB . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
+ }
+
+ if($mod) {
+ // Mod controls (on posts)
+ $built .= '<p style="float:right;margin:0;padding:0;font-size:80%;">';
+
+ // Delete
+ if($mod['type'] >= MOD_DELETE)
+ $built .= ' <a title="Delete" href="?/b/delete/' . $this->id . '">' . MOD_LINK_DELETE . '</a>';
+
+ // Delete all posts by IP
+ if($mod['type'] >= MOD_DELETEBYIP)
+ $built .= ' <a title="Delete all posts by IP" href="?/b/deletebyip/' . $this->id . '">' . MOD_LINK_DELETEBYIP . '</a>';
+
+ // Ban
+ if($mod['type'] >= MOD_BAN)
+ $built .= ' <a title="Ban" href="?/b/ban/' . $this->id . '">' . MOD_LINK_BAN . '</a>';
+
+ // Ban & Delete
+ if($mod['type'] >= MOD_BANDELETE)
+ $built .= ' <a title="Ban & Delete" href="?/b/ban&delete/' . $this->id . '">' . MOD_LINK_BANDELETE . '</a>';
+
+ // Delete file (keep post)
+ if($mod['type'] >= MOD_DELETEFILE)
+ $built .= ' <a title="Remove file" href="?/b/file/' . $this->id . '">' . MOD_LINK_DELETEFILE . '</a>';
+
+
+ $built .= '</p>';
}
// Body