vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   [SOLVED] hide the full post for a specific post for a specific user (https://vborg.vbsupport.ru/showthread.php?t=315617)

omardealo 11-25-2014 03:00 PM

[SOLVED] hide the full post for a specific post for a specific user
 
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

Code:

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

Quote:

Originally Posted by Lynne (Post 2524109)
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

Quote:

Originally Posted by Lynne (Post 2524115)
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

Quote:

Originally Posted by Lynne (Post 2524121)
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

Quote:

Originally Posted by Lynne (Post 2524252)
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 [DATE]1417103600[/DATE] at [TIME]1417103600[/TIME] ---------------

okay , Simple solution , if you want hide a post by a plugin
Thanks again Lynne

HOOK : postbit_display_complete


PHP Code:

if ($vbulletin->userinfo['userid'] ==AND $this->post['postid'] ==35
{
// Replace the template with nothing SO Postid 35 does not appear for userid 1
$this->templatename '';




All times are GMT. The time now is 09:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01056 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete