vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Restricting new threads/post to members with less than x number of posts (https://vborg.vbsupport.ru/showthread.php?t=324605)

Snowhog 03-06-2017 12:02 AM

Restricting new threads/post to members with less than x number of posts
 
I want to be able to restrict new threads/posts in one of our forums based on the member having less than x number of posts to their credit. Can this be done? Is there a MOD that has this feature?

MarkFL 03-06-2017 02:24 AM

1 Attachment(s)
Hey Paul! :)

I have attached a product that should do just what you want. Give it a try, and let me know if there are any issues, or there are any features you'd like added. ;)

Once you import the product, you'll have to visit the settings to enable the product, and to define your forums and their minimum post counts. Everything is explained in the settings.

Once I know you are happy with it, I will publish it and cite you as the co-author since it was your idea. :up:

Snowhog 03-06-2017 02:27 AM

Thank you. Won't get to it tonight; just to tired (did a 3 hour, 41.8 mile bicycle ride this afternoon). But tomorrow I'll install it and let you know.

Much appreciated, as always!

MarkFL 03-06-2017 02:37 AM

Quote:

Originally Posted by Snowhog (Post 2583292)
Thank you. Won't get to it tonight; just to tired (did a 3 hour, 41.8 mile bicycle ride this afternoon). But tomorrow I'll install it and let you know.

Much appreciated, as always!

Wow! I'm more tired now just thinking about a 41.8 mile bike ride! :eek: :p

Stratis 03-06-2017 10:42 AM

More complicated many options.. And this one to https://vborg.vbsupport.ru/showthread.php?t=233979 :)
Marks is easier

Snowhog 03-06-2017 01:34 PM

Quote:

Originally Posted by MarkFL (Post 2583291)
Hey Paul! :)

I have attached a product that should do just what you want. Give it a try, and let me know if there are any issues, or there are any features you'd like added. ;)

Once you import the product, you'll have to visit the settings to enable the product, and to define your forums and their minimum post counts. Everything is explained in the settings.

Once I know you are happy with it, I will publish it and cite you as the co-author since it was your idea. :up:

Installed. I'm looking at the settings now, and what you put together is the opposite of what I want.

This MOD allows one to set 'minimum' posts a member must have before they are permitted to post to specified forums. I have, at this time, a single forum area I want to limit who can post to.

The forum I want to limit members posting in is called Help the New Guy. I want to be able to set a 'maximum' number of posts a member can have and still be permitted to post in this forum. Once they have more than x number of posts (the 'maximum' allowed), they would be blocked from posting in this forum; they would have to choose among the many other 'topic specific' forums we have.

So, say I set a limit of 50 posts. Any member who has 50 or less posts would be able to post in this forum. Once any member reaches 51 or more posts, they would be blocked from being able to post in this forum.

MarkFL 03-06-2017 01:43 PM

When you said:

Quote:

Originally Posted by Snowhog (Post 2583289)
I want to be able to restrict new threads/posts in one of our forums based on the member having less than x number of posts to their credit. Can this be done? Is there a MOD that has this feature?

I thought you meant the restriction would be imposed on those having less than x posts. :eek:

Snowhog 03-06-2017 01:45 PM

That's the problem with trying to communicate only in written form. One has to be very careful, doing their best to 'say' what they want the other person to 'hear'.

Did my last post make my need any clearer?

MarkFL 03-06-2017 02:03 PM

Quote:

Originally Posted by Snowhog (Post 2583312)
That's the problem with trying to communicate only in written form. One has to be very careful, doing their best to 'say' what they want the other person to 'hear'.

Did my last post make my need any clearer?

Yes, and so what I'll do is add a second setting that allows for defining a maximum post count. But let me ask you, in this "Help The New Guy" forum, you want only those with a low post count to be able to help the new guy? Should this restriction just be on posting new threads but not on posting replies to existing threads?

Snowhog 03-06-2017 02:13 PM

Quote:

Originally Posted by MarkFL (Post 2583314)
Yes, and so what I'll do is add a second setting that allows for defining a maximum post count. But let me ask you, in this "Help The New Guy" forum, you want only those with a low post count to be able to help the new guy? Should this restriction just be on posting new threads but not on posting replies to existing threads?

Ah, I hadn't thought about that aspect. Hmm.

Okay, yes, I want to restrict creation of 'new threads' in this forum based on a member having no more than x posts, but anyone can reply to the threads in this forum.

MarkFL 03-06-2017 02:23 PM

Okay, I will see what I can do. :)

MarkFL 03-08-2017 03:04 PM

1 Attachment(s)
Hey Paul,

I have updated the product (and attached it here), and instead of adding more settings, I allowed more flexibility in the existing setting. Now you can define whether new threads, new replies, or both are restricted, and whether the post count is a maximum or a minimum.

For your application, where X is the forumid of your "Help The New Guy" forum, enter into the setting "Forumids And Their Restrictions" the following:

Code:

X|threads|max|50
Let me know if this fits the bill, and if you need any additional features. :)

Snowhog 03-08-2017 04:06 PM

Thank you. It's installed and set as active, specifying 15|threads|max|50.

The only thing left would be for a message to be displayed to an affected member, such as:

Quote:

15|threads|max|50|You are not permitted to create your new thread here. Please use a topic specific forum.
Settings for the message box itself would need to be added, but I think that would be simple enough, as several of your other MODs already have the coding to do that.

I remain extremely grateful for your assistance and believe in supporting those from whom I derive a benefit. Free support isn't free; there is always a cost, even if it is just the expenditure of time put in to making something available for others 'at no cost'. A persons time and talents are a valued commodity and should not be taken for granted.

I can't support you directly here, so I've made a contribution to http://mathhelpboards.com. It's the very least I can do for the assistance you've provided and that I've benefited from.

MarkFL 03-08-2017 05:28 PM

Quote:

Originally Posted by Snowhog (Post 2583460)
Thank you. It's installed and set as active, specifying 15|threads|max|50.

The only thing left would be for a message to be displayed to an affected member...

A message is already displayed to affected users. :)

Quote:

Originally Posted by Snowhog (Post 2583460)
Settings for the message box itself would need to be added, but I think that would be simple enough, as several of your other MODs already have the coding to do that.

I could add an "Additional CSS" setting to be applied to the message element. :)

Quote:

Originally Posted by Snowhog (Post 2583460)
I remain extremely grateful for your assistance and believe in supporting those from whom I derive a benefit. Free support isn't free; there is always a cost, even if it is just the expenditure of time put in to making something available for others 'at no cost'. A persons time and talents are a valued commodity and should not be taken for granted.

I can't support you directly here, so I've made a contribution to http://mathhelpboards.com. It's the very least I can do for the assistance you've provided and that I've benefited from.

While not necessary, that is certainly appreciated! :up:

Snowhog 03-08-2017 06:37 PM

Ah, okay.

Are these the only two elements in the .xml file that handle the message?

Code:

                        <phrase name="markfl_rfbpc_nonewreplies" date="1488990604" username="MarkFL" version="1.0"><![CDATA[Your post count prohibits you from posting new replies in this forum!]]></phrase>
                        <phrase name="markfl_rfbpc_nonewthreads" date="1488990639" username="MarkFL" version="1.0"><![CDATA[Your post count prohibits you from posting new threads in this forum!]]></phrase>


MarkFL 03-08-2017 07:00 PM

1 Attachment(s)
Quote:

Originally Posted by Snowhog (Post 2583479)
Ah, okay.

Are these the only two elements in the .xml file that handle the message?

Code:

                        <phrase name="markfl_rfbpc_nonewreplies" date="1488990604" username="MarkFL" version="1.0"><![CDATA[Your post count prohibits you from posting new replies in this forum!]]></phrase>
                        <phrase name="markfl_rfbpc_nonewthreads" date="1488990639" username="MarkFL" version="1.0"><![CDATA[Your post count prohibits you from posting new threads in this forum!]]></phrase>


Yes, those are the only phrases controlling the user messages.

I have attached an update which will allow you to add CSS to the message elements. :)

For example, when I add the following CSS to the "Message CSS" setting:

Code:

width: 75%;
padding: 5px;
border: 1px solid #FF0000;
border-radius: 6px;
background :#FFFF00;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.75);

Then, I get the following:

https://vborg.vbsupport.ru/attachmen...1&d=1489006711

Snowhog 03-08-2017 07:20 PM

Your screenshot raises a question:

As your MOD is written, at what point does the check against the members post count occur? It looks as if, based on the screenshot, it happens when they enter the affected forum. If that is the case, that isn't good. Anyone, regardless of post count, should be able to enter the forum and read it's content. Only affected members should be prevented from creating within the forum.

Or am I misleading myself by the screenshot; by what I see?

MarkFL 03-08-2017 07:26 PM

The screenshot just shows that the message explains to the user why there are no "Post New Thread" buttons...they can still browse the threads, and if the restriction is only on creating new threads, they can still reply to the existing threads. :)

Snowhog 03-08-2017 08:28 PM

Okay, I tested by logging in with a testing user account (with 51 posts).

When I select (go into) our Help the New Guy forum I see the banner message at the top of the Thread Listing as shown in your screenshot and the Post New Thread button is absent. When I click on any of the threads, the banner message isn't displayed.

So, this looks quite nice and accomplishes what I wanted. Good job!

MarkFL 03-08-2017 10:03 PM

Quote:

Originally Posted by Snowhog (Post 2583487)
Okay, I tested by logging in with a testing user account (with 51 posts).

When I select (go into) our Help the New Guy forum I see the banner message at the top of the Thread Listing as shown in your screenshot and the Post New Thread button is absent. When I click on any of the threads, the banner message isn't displayed.

So, this looks quite nice and accomplishes what I wanted. Good job!

Alright...good deal!Thank you for the feedback. ;)

I'll likely go over it for a bit to see if there's anything I missed and then publish it. :)

MarkFL 03-09-2017 05:20 PM

I have updated and published the product here:

Restricted Forums By Post Count

:)

Prince 09-08-2019 06:28 PM

Does this mod or is there a mod that restricts users from even seeing a forum or sub-forum based on either being logged in or post count?

HM666 09-09-2019 12:27 AM

Quote:

Originally Posted by Prince (Post 2600588)
Does this mod or is there a mod that restricts users from even seeing a forum or sub-forum based on either being logged in or post count?

You could set that up within vB without installing anything new. You can create a usergroup that has access to that particular forum and if you want you can make it where no other usergroups other than staff can see or post in that forum. As for post count when you create the usergroup create a usergroup promotion that will give access after they reach the post count amount. As for being logged in you can restrict forums so they are not seen when someone is logged out.


All times are GMT. The time now is 04:54 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.01270 seconds
  • Memory Usage 1,801KB
  • 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
  • (4)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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