vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to allow only ONE MEMBER to START THREADS on ONE of my sub forums? (https://vborg.vbsupport.ru/showthread.php?t=284408)

vithorius 06-14-2012 09:31 AM

How to allow only ONE MEMBER to START THREADS on ONE of my sub forums?
 
Hi! (sorry for my poor english as it is not my main language...)


How do I set only ONE MEMBER (coule change in the future) to be able to START THREADS on a forum?


I have THREE Sub-forums on one of my many categories and I want to set only ONE MEMBER per EACH of the three sub-forums to be able to start threads...


How do I do it? :confused:


Thank you so very much. :up: :up:

kh99 06-14-2012 10:04 AM

I haven't tried it, but I think this will work:

1) In the Usergroup Manager, create 3 new groups "based off of Registered Users", one for each of the forums. You don't need to change any of the permissions.

2) In Usergroups > Forum Permissions, for each forum where you want to control thread creation, click edit next to "Registered Users" and set "Can Post Threads" to No. Also do this for any other usergroups that shoudn't be able to create threads there.

3) Also in Usergroups > Forum Permissions, for each of your 3 forums, click the "Edit" link next to the usergroup you created for that forum, and set "Can Post Threads" to Yes.

4) In Users > Search for Users, find the "thread creating" user for each forum, and add the new usergroup for that forum to the user by clicking the check box in the "Additional Usergroups" section.

The result will be that 3 users will each have 1 secondary usergroup that allows them to create threads in one forum.

There may be a way to do this using access masks so that you wouldn't need the new usergroups, but I'd have to test that to know if it would work.

vithorius 06-14-2012 02:08 PM

Thank you so very much for your help kh99!

Unfortunately, I forgot to say that I would not want to create a new usergroup for each user, just as you said:

Quote:

Originally Posted by kh99 (Post 2339475)
There may be a way to do this using access masks so that you wouldn't need the new usergroups, but I'd have to test that to know if it would work.




There might be a way to do it without creating new user groups?

Who has a clue? :confused:

kh99 06-14-2012 03:44 PM

I don't have time to try it right now, but what I was thinking was just to set "Can Post Threads" to No like i mentioned, then find (in the user manager) the user you want to grant permission to and choose "Edit Forum Permissions (Access Mask)" from the Quick User Links dropdown, and select "Yes" next to the forum where you want that user to be able to create threads. I really don't know if it will work or not. If it doesn't, then you may be stuck with usergroups or else writing a custom plugin.

Simon Lloyd 06-14-2012 08:36 PM

How many users? if it's only one or two then wrap the "New Thread" code in conditionals like this
find in forumdisplay
HTML Code:

<if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow" class="newcontent_buttons">Start New Thread</a><else />&nbsp;</if></td>
        <if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>

and replace with
HTML Code:

<if condition="in_array($forum['forumid'], array(1,2,3))">
<!-- Show this to forum 1, 2 and 3 -->
<if condition="$bbuserinfo['userid'] == 1">
<if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow" class="newcontent_buttons">Start New Thread</a><else />&nbsp;</if></td>
        <if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</if>
<else />
<if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow" class="newcontent_buttons">Start New Thread</a><else />&nbsp;</if></td>
        <if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>

</if>

I assume this is vb4?
EDIT: Never mind, i should learn to read, code now adjusted for vb3

vithorius 06-15-2012 10:57 AM

Wow dear Simon Lloyd! Thank you so very much. Will try it as soon as I get home...

I I want to allow "USER A" inside ONLY "FORUM 1", and then "USER B" ONLY inside "FORUM 2", I must use 2 (two) conditionals (one for each forum?) and probably should not use the array?

Hummm... Sorry, (I'm not a good programmer) bu the array will do it for me, in the next 'IF', right?

Or should I use another 'IF' to try to make a third conditional (for "USER C")?

Thank you!

vithorius 07-26-2012 08:12 AM

Any programmer out there to give a little help, please?

Simon Lloyd 07-26-2012 12:52 PM

Just repeat the IF statements for each forumid!

vithorius 07-26-2012 02:03 PM

Thank You!


All times are GMT. The time now is 10:40 PM.

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.01196 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_html_printable
  • (1)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