View Full Version : [SOLVED] hide the full post for a specific post for a specific user
omardealo
11-25-2014, 03:00 PM
HELLO ,
I Use this code to hide the content of post for a specific post for a specific member , And works well .
but if I want to hide the full post ,What condition should I use?
HOOK : postbit_display_complete
if ($vbulletin->userinfo['userid']==1 AND $this->post['postid']==35)
{
$replacer = "You can not see the content";
$this->post['message'] = str_replace($post[message],$replacer,$this->post['message']);
}
Lynne
11-25-2014, 05:05 PM
Doesn't that hide the full post (postid 35)? Or do you mean you don't want to show that message ("You can not see the content") either?
omardealo
11-25-2014, 05:12 PM
Doesn't that hide the full post (postid 35)? Or do you mean you don't want to show that message ("You can not see the content") either?
i want hide full post (content+posterusername+all user info) without any message
Lynne
11-25-2014, 05:15 PM
Ah, that would be a bit more difficult especially since you will have a skip in postids (say, go from 3 to 5 instead of 3 to 4). Do you mind if the postids are not sequential?
omardealo
11-25-2014, 05:43 PM
Ah, that would be a bit more difficult especially since you will have a skip in postids (say, go from 3 to 5 instead of 3 to 4). Do you mind if the postids are not sequential?
yeah i know postids will be are not sequential , but not for all users
only userid 1 will not see postid 35 but he still see postid 1,2,3...elc 33,34,36...elc
Lynne
11-25-2014, 08:09 PM
You may want to just put a condition around the whole postbit & postbit_legacy template.
<if condition="!($post[postid]==35 AND $bbuserinfo[userid]==1)">
all the postbit code
</if>
omardealo
11-26-2014, 11:10 AM
You may want to just put a condition around the whole postbit & postbit_legacy template.
<if condition="!($post[postid]==35 AND $bbuserinfo[userid]==1)">
all the postbit code
</if>
thanx , it's working well :up: , can i do the same code by a plugin .. becouse if i used your code i must edit every style template [postbit & postbit_legacy]
Lynne
11-26-2014, 04:38 PM
I would guess so, but I don't know the plugin code off the top of my head. Perhaps someone else will have it.
omardealo
11-26-2014, 06:18 PM
I would guess so, but I don't know the plugin code off the top of my head. Perhaps someone else will have it.
okay ...
you have a very good help here :up: thank you anyway
--------------- Added 1417103600 at 1417103600 ---------------
okay , Simple solution , if you want hide a post by a plugin
Thanks again Lynne
HOOK : postbit_display_complete
if ($vbulletin->userinfo['userid'] ==1 AND $this->post['postid'] ==35)
{
// Replace the template with nothing SO Postid 35 does not appear for userid 1
$this->templatename = '';
}
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.