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)

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. :)


All times are GMT. The time now is 02:07 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.01045 seconds
  • Memory Usage 1,751KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete