2005-01-18 13:00:38 +00:00
|
|
|
<?php
|
|
|
|
|
2006-06-16 23:53:56 +00:00
|
|
|
/**
|
|
|
|
* Show the links for possible moderation actions related to a single post
|
|
|
|
**/
|
2007-02-08 19:54:05 +00:00
|
|
|
function post_moderation_links($post,$admin=0,$tokens){
|
|
|
|
|
2006-06-16 23:53:56 +00:00
|
|
|
if ($post->isHidden()){
|
2007-02-08 19:54:05 +00:00
|
|
|
$x = " - <a href=\"forum_moderate_post_action.php?action=unhide&id=".$post->getID()."$tokens\">[undelete post]</a>";
|
2005-01-18 13:00:38 +00:00
|
|
|
} else {
|
2007-02-08 19:54:05 +00:00
|
|
|
$x = " - <a href=\"forum_moderate_post.php?action=hide&id=".$post->getID()."$tokens\">[delete post]</a> ";
|
2005-01-18 13:00:38 +00:00
|
|
|
}
|
2007-02-08 19:54:05 +00:00
|
|
|
$x.= " - <a href=\"forum_moderate_post.php?action=move&id=".$post->getID()."$tokens\">[move post]</a>";
|
2006-10-17 05:40:33 +00:00
|
|
|
if ($admin == 1) {
|
2007-02-08 19:54:05 +00:00
|
|
|
$x .= " - <a href=forum_moderate_post.php?action=banish_user&id=".$post->getID()."&userid=".$post->getOwnerID()."$tokens>[banish author]</a>";
|
2006-10-17 05:40:33 +00:00
|
|
|
}
|
2006-06-16 23:53:56 +00:00
|
|
|
return $x;
|
2005-01-18 13:00:38 +00:00
|
|
|
}
|
|
|
|
|
2006-06-16 23:53:56 +00:00
|
|
|
/**
|
|
|
|
* Show the links for possible moderation actions related to an entire thread
|
|
|
|
**/
|
2005-01-18 13:00:38 +00:00
|
|
|
function show_thread_moderation_links($thread){
|
2006-06-16 23:53:56 +00:00
|
|
|
echo "<a href=\"forum_moderate_thread.php?action=hide&id=".$thread->getID()."\">Hide thread</a><br>";
|
|
|
|
if($thread->sticky) {
|
|
|
|
echo "<a href=\"forum_moderate_thread_action.php?action=desticky&id=".$thread->getID()."\">De-sticky thread</a><br>";
|
|
|
|
} else {
|
|
|
|
echo "<a href=\"forum_moderate_thread_action.php?action=sticky&id=".$thread->getID()."\">Make thread sticky</a><br>";
|
|
|
|
}
|
2005-01-18 13:00:38 +00:00
|
|
|
}
|
2006-08-08 20:32:37 +00:00
|
|
|
?>
|