PDA

View Full Version : hide some posts on newreply page


omardealo
12-16-2014, 01:48 PM
Hello ,

on newreply page ,The bottom of the reply box appears the latest 10 posts
I want to hide some of these posts ...
my code is work But not as it should ..

Hook : newreply_form_reviewbit


$checkpostnewreply = $db->query_read("SELECT * FROM " . TABLE_PREFIX . " `posts_private` ");
while ($resnewreply = $db->fetch_array($checkpostnewreply))
{
$newreply_postid = $resnewreply['postid'];

if ( $vbulletin->userinfo['username'] !== $post['username'] AND $post['postid'] == $newreply_postid )
{
// replace template with nothing to hide this POSTID
$vbulletin->templatecache['newreply_reviewbit'] = '';
}
}


The problem :
if another user Wrote a post or If last post is not for you , any post will not appear for you .
What I want to do just that when Post No. = $newreply_postid does not appear and show the rest of the posts ( when $post['username'] == $vbulletin->userinfo['username'] ) .