vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   This mod available? [Post restrictions user/forum ID] (https://vborg.vbsupport.ru/showthread.php?t=285972)

dutchbb 07-26-2012 05:19 PM

This mod available? [Post restrictions user/forum ID]
 
I've used the search but could not find anything. Is this mod available: setting post restriction for a specific user ID and specific forum IDs so he can only post in one specific forum for example.

Ty

Simon Lloyd 07-26-2012 05:32 PM

Just use if conditions in the header template
HTML Code:

<if condition="$vbulletin->userinfo['userid'] == x AND !in_array($forum['forumid'], array(1,2,3,4))">
IF I AM USER X AND I AM VIEWING A FORUM [B]NOT[/B] SHOWN IN THE ARRAY I CAN SEE THIS
</if>


dutchbb 07-26-2012 05:45 PM

Thanks, I want them to still be able to read but not post.

I know this can probably be done with usergroups and forum permissions but that would be too much of a hassle in our case, so I was wondering if a simple mod for this exists.

Simon Lloyd 07-26-2012 05:57 PM

You started out by saying "A user" but now you are talking about usergroups, search for CYB forum permissions, but to be honest you'd be better off going the permissions route with vb :)

vijayninel 07-26-2012 05:59 PM

You could try writing in a plugin for that:

Product : vbulletin
Hook Location: newreply_post_start
Title : vijay's great plugin
Execution Order: 5 should be ok
Plugin PHP Code:

PHP Code:

if (in_array($vbulletin->userinfo['userid'], array(1,2,3,4)) AND $threadinfo[forumid] != XX)
{
    
print_no_permission();



replace 1,2,3,4 with the members id and xx with the forum id.

dutchbb 07-26-2012 06:06 PM

Quote:

Originally Posted by Simon Lloyd (Post 2351659)
You started out by saying "A user" but now you are talking about usergroups, search for CYB forum permissions, but to be honest you'd be better off going the permissions route with vb :)

I'm still talking about user ID, I just pointed out this is the only way I know of how it can be done in default vb. However it requires a lot of changes, and it only applies to one single user so I don't want to do that.

So there is no mod like this made?

I'' try the above. Thanks vijayninel

Hm tried it but does not work unfortunately.

Simon Lloyd 07-26-2012 06:28 PM

@Vijay - Nice Title :D

--------------- Added [DATE]1343330965[/DATE] at [TIME]1343330965[/TIME] ---------------

Quote:

Originally Posted by dutchbb (Post 2351663)
I'' try the above. Thanks vijayninel

Hm tried it but does not work unfortunately.

In which way doesn't it work? post the code exactly as you have used it.


All times are GMT. The time now is 11:16 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.01029 seconds
  • Memory Usage 1,727KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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