Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Cyb - Advanced Permissions Based on Post Count Details »»
Cyb - Advanced Permissions Based on Post Count
Version: 4.4, by Valter Valter is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 01-09-2009 Last Update: Never Installs: 801
Uses Plugins Auto-Templates
 
No support by the author.

Info:
This product allows you to set permissions based on user?s post count for:
-viewing forum (threads listing),
-viewing threads content,
-creating new threads,
-replying to threads,
-viewing attachments,
-Viewing/Posting links/images and e-mail addresses,
-sending private messages,
-sending e-mails,
-posting Visitor messages
-viewing Albums
-creating new Albums
-posting Picture comments
-viewing Social Groups
-creating new Social Groups
-posting Group messages

This will disallow members with no permissions to view forums/threads/posts/links through normal view, printthread, search, archive*, thread preview. Note that you can set Forum/Thread Permissions for each forum/sub-forum separately. Screenshot shows additional options in Forum Manager and error messages shown to user when trying to view restricted area.

*-When you set in some forum "Minimum Post Count To View Thread Listing In This Forum" option to different value than "0" guests will not be able to see thread listing in that forum through Archive. For logged-in users this function works normally regarding user's post count.
-When you set in some forum "Minimum Post Count To View Threads Content In This Forum" option to different value than "0" guests will not be able to read threads in that forum through Archive. For logged-in users this function works normally regarding user's post count.

How it works and why it's better than vB Promotions system...
First of all it's very easy to use.

Forum is shown on forumhome but if you have no needed post count you'll see lock icon and predefined error message when try to access. When you set this via vB Promotions system forum is hidden on forumhome and you must create additional usergroup to make all this working.

When user collect needed amount of posts he will be able to access protected forum immediately. When you set this via vB Promotions system then user must wait until Promotions task is executed ... then he will be able to access protected forum. How much time user must wait it depends on settings in AdminCP/Scheduled Tasks... and if you set this to run every minute it pushes your server. If you set it to 2 or more minutes then user must wait more and more... and nobody like it.

Thanks to:
grog6 - plugin was inspired by his original hack for vB 3.0.x.
macooper - for help with creating first version of plugin for vB 3.5.0.

Installation:
Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]

To set options:
Go to: AdminCP > vBulletin Options > Cyb Advanced Permissions Based on User's Post Count - set options here

Versions:
v1.0 - Sep 16.2005.
-First release
v1.1 - Sep 19.2005.
-Updated to disallow users to view forum or threads through printthread or archive
-Changed modification name to "Access Permissions Based on User's Post Count"
v1.2 ? Oct 10.2005.
-Added option to set permissions based on user's post count for creating threads
-Added option to set permissions based on user's post count for posting replies
-Added plugin for archive. No more need to edit any files (this was optional step in v1.1).
v2.0 - Nov 20.2005.
-Now user can not search posts in restricted areas.
-Now "Locked" icon is shown on forumhome for restricted forums (if "Show Lock Icons to Users" is choosen in vB Options).
-Fixed ALL known bugs.
v2.1 - Nov 21.2005.
-Bug fixed - search problems
v2.5 - Jan 29.2006.
-Added Attachment Permissions
-Added Private Messages Permissions
-Added ability to turn off whole system or some parts
v2.5.1 - Jan 30.2006.
-Fixed version info
-Fixed forum manager error
v2.5.2 - Feb 26.2006.
-Archive bug fixed.
*When you set in some forum "Minimum Post Count To View Thread Listing In This Forum" option to different value than "0" guests will not be able to see thread listing in that forum through Archive. For logged-in users this function works normally regarding user's post count.
*When you set in some forum "Minimum Post Count To View Threads Content In This Forum" option to different value than "0" guests will not be able to read threads in that forum through Archive. For logged-in users this function works normally regarding user's post count.
v2.6 - May 02.2006.
-In previous version it was possible to view part of thread when you move mouse over thread title (if configured that users can see thread listing but not thread content)... this is fixed now, please upgrade
-Added e-mail permissions
-Hack renamed from "Access Permissions Based on User's Post Count" to "Cyb Advanced Permissions Based on User's Post Count"
v2.7 - May 04.2006.
-Attachments permissions bug fixed
v2.8 - May 26.2006.
-Added - Now users with no permissions to send PMs can post PMs to usergroups you choose
-Added - Link Posting Permissions. Member must have x posts before can post links.
-Added - Now you can easily exclude usergroups from any restrictions (see screenshots)
v2.9 - May 27.2006.
-Added ability to hide last post info for choosen forums
-"To view attachments..." phrase is now more flexible. Now required post count number must NOT be at the end. Add {1} where you wish to show required post count number and add {2} where you wish to show user's post count in phrase.
v3.0 - May 31.2006.
-Bug fixed. Usergroups who are excluded from "Forum/Thread Permissions" will be able to see last post info in forums where you have choose to hide it.
v3.1 - June 03.2006.
-Added "Excluded groups" to PMs Permissions
-Users with no permissions to send PMs (except to allowed usergroups you choose) will see note on New PM page (see screenshots)
v3.2 - Aug 04. 2006.
- Release of this hack for vB v3.6
v3.3 - Aug 05. 2006.
- Attachment Permissions error message fixed
v3.4 - Aug 24. 2006.
- Fixed bug in "Links Posting Permissions" (user can post link when replying to thread)
- Added "Product Version Checking" - https://vborg.vbsupport.ru/showthread.php?t=124679
v3.5 - Aug 25. 2006.
- Another "Link Permissions" bug fixed
v3.6 - Sep 02. 2006.
- If user has no permissions to view forum/thread he will see standard no permission message instead of "post count needed" one
- Fixed error messages for archive
- Added: "Links Viewing Permissions" (regular post view, printthread view, thread preview, archive view)
- Added: Forums can be excluded from "Links Posting Permissions" restrictions
- Added: Forums can be excluded from "Attachment Permissions" restrictions
v3.7 - Sep 04. 2006.
- Added ability to easily set forum/thread-permissions to the same level for all existing forums (only SuperAdmin can do this)
v3.8 - Sep 20. 2006.
- Fixed bug (posting links permissions doesn't work)
v3.9 - Feb 23. 2007.
- Fixed bug (guests can't see attachments even there are no post count requirements)
- Fixed bug (links not hidden in showpost)
- In "Links Posting Permissions" added option to additionally disallow members to post e-mail addresses
- Several code improvements for better compatibility
v4.0 - Apr 04. 2007.
-Post count requirements to view attachments, view links/images, and post links/images, moved to Forum Manager (different settings for individual forums possible)
-Quote is now enabled when user has no permissions to view links/images but they are not shown inside quote tags.
-You must not rebuild forum info manually after setting up parameters for all forums ("Global-set" page). This is now done automatically.
-"Links/Images Viewing Permissions" much better hides links/images, now including ones in search results post titles and notification e-mails.
-Added option to hide links/images in signatures
-Fixed bug (vBulletin RSS Feed Robot stops working when post count is required to create threads)
-"Global-set" page improved with new options, list of forums with current settings, quick forum edit links,...
-General code cleanup, optimizations, improvements,...
v4.1 - Aug 18. 2007.
-Fixed bug with errors in Archive
-Group membership checking works now for supplementary usergroups too
-Some minor security and compatibility improvements...
v4.2 - Sep 01. 2007.
-Definitely fixed bug with blocking RSS Poster
-Improved "Attachments Viewing Permissions" (now user can not download attachment when attachment id is known)
-New in "Attachments Viewing Permissions": Option to allow users to view image thumbnails, but not full size images
-New in "Private Messages Sending Permissions": With no-permissions error affected user gets list of allowed recipients too
-Minor bug fixes...
v4.3 - May 01. 2008.
-CSRF protection added
-Compatible with vBulletin 3.7 Gold (may not work with Beta/RC releases)
-Fixed bug where some users are not able to import product
v4.4 - Jun 19. 2008.
-"Last post info" automatically hidden for users who are not able to acces forum
-Fixed bug where e-mails posting permissions does not work properly
-New: Minimum post count to post Visitor messages
-New: Minimum post count to view Albums
-New: Minimum post count to post Picture comments
-New: Minimum post count to create new Albums
-New: Minimum post count to view Social Groups
-New: Minimum post count to create new Social Groups
-New: Minimum post count to post Group messages
-Minor bug fixes...


PLEASE click INSTALL if you use this plugin

Download Now

File Type: zip Cyb - Advanced Permissions Based on Post Count 4.4.zip (12.1 KB, 4137 views)

Screenshots

File Type: png attach.png (7.5 KB, 0 views)
File Type: png create thread.png (18.5 KB, 0 views)
File Type: jpg view forum.jpg (15.8 KB, 0 views)
File Type: jpg lastpost.jpg (55.6 KB, 0 views)
File Type: jpg pms1.jpg (28.6 KB, 0 views)
File Type: jpg globalset.jpg (48.1 KB, 0 views)
File Type: jpg acp.jpg (103.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
wfouly

Comments
  #162  
Old 12-13-2011, 09:35 PM
Ghostt Ghostt is offline
 
Join Date: Oct 2009
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i will try

/edit.
yes enabling the view forum restriction option fixed it!

thank you very much.
Reply With Quote
  #163  
Old 12-13-2011, 09:45 PM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're welcome.
Reply With Quote
Благодарность от:
Max Taxable
  #164  
Old 12-18-2011, 09:15 PM
angeljs's Avatar
angeljs angeljs is offline
 
Join Date: Aug 2005
Location: UK
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fab...just what I need. I've had an influx of spammers join lately posting rubbish. This should slow them down a little.
Reply With Quote
  #165  
Old 02-05-2012, 04:37 PM
OmerE OmerE is offline
 
Join Date: Jan 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are a few issues with the PM limitations part of this add-on (they are trivial to circumvent), please see my post here:
https://vborg.vbsupport.ru/showpost....&postcount=178
Reply With Quote
  #166  
Old 02-20-2012, 01:14 PM
sailnet sailnet is offline
 
Join Date: Oct 2009
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

due to a rash of spammers showing up recently and sending PM's to my membrs are they've met their posts count requirements I'd like to extend this mod to also include a minimum number of days that someone must be a forum member before they can send PM's.

can someone give me some guidance as to how to add this code?

thanks in advance.
Reply With Quote
  #167  
Old 02-20-2012, 03:44 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sailnet View Post
due to a rash of spammers showing up recently and sending PM's to my membrs are they've met their posts count requirements I'd like to extend this mod to also include a minimum number of days that someone must be a forum member before they can send PM's.

can someone give me some guidance as to how to add this code?

thanks in advance.
You (of course) need to add a check for days registered wherever the posts are checked. You could do something like:

Code:
$min_days = 3;
$days_registered = floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400);

Then add "AND ($days_registered >= $min_days)" in the appropriate places. You could also create a new option and use it to set $min_days (or in place of $min_days) instead of using a constant.
Reply With Quote
  #168  
Old 02-20-2012, 04:38 PM
sailnet sailnet is offline
 
Join Date: Oct 2009
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
You (of course) need to add a check for days registered wherever the posts are checked. You could do something like:

Code:
$min_days = 3;
$days_registered = floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400);

Then add "AND ($days_registered >= $min_days)" in the appropriate places. You could also create a new option and use it to set $min_days (or in place of $min_days) instead of using a constant.
thank you very much! - any leads on which module in the cyb mod I would put this type of code in? I'm modify the notice message to the user telling them their have no been registered long enough or do not have enough posts to be entitled to send PM's to other users.

thanks in advance.
Reply With Quote
  #169  
Old 02-20-2012, 08:34 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sailnet View Post
thank you very much! - any leads on which module in the cyb mod I would put this type of code in? I'm modify the notice message to the user telling them their have no been registered long enough or do not have enough posts to be entitled to send PM's to other users.

thanks in advance.
Are you adding this check to the mod or creating a different one? If you're adding it, then look at each plugin and find everywhere $vbulletin->userdata[posts] is checked and add this (there were multiple places when I glanced at the code). If you want to have two separate notices then you may have to copy an 'if' block and duplicate it. (It might be easier to change the message to say "and/or you haven't been registered long enough", but that's up to you of course).

I don't want to post the entire solution because I've been told some mod authors don't like that.
Reply With Quote
  #170  
Old 02-20-2012, 08:44 PM
sailnet sailnet is offline
 
Join Date: Oct 2009
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well I did find this module that looks like the once that needs to be modifed

PHP Code:
    <plugin active="1" product="fsvpboupc">
        <
title><![CDATA[Cyb APBOUPC P5 (SR)]]></title>
        <
hookname>parse_templates</hookname>
        <
phpcode><![CDATA[
        if (
$vbulletin->options['apboupc_global_enable'] AND ($vbulletin->options['apboupc_pm_amount']>0) AND (THIS_SCRIPT=='private'))
        {
            if ((
$vbulletin->options['apboupc_pm_amount'] !='0') AND ($vbulletin->options['apboupc_pm_amount'] > $vbulletin->userinfo[posts]) AND (!is_member_of($vbulletin->userinfosplit(','$vbulletin->options['apboupc_pm_excludedgroups']))))
            {
                
$apboupc_pmsnote construct_phrase($vbphrase['apboupc_pm_note'], $vbulletin->options['apboupc_pm_amount']);
                
$vbulletin->templatecache['pm_newpm'] = str_replace('$vbphrase[separate_multiple_names]''$vbphrase[separate_multiple_names]<br /><br />$apboupc_pmsnote'$vbulletin->templatecache['pm_newpm']);
            }
        }]]></
phpcode>
    </
plugin
Reply With Quote
  #171  
Old 02-20-2012, 09:59 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, if you create a new options called apboupc_pm_days and a new phrase called apboupc_pm_note_days, you might do something like this:

PHP Code:

    
<plugin active="1" product="fsvpboupc">
        <
title><![CDATA[Cyb APBOUPC P5 (SR)]]></title>
        <
hookname>parse_templates</hookname>
        <
phpcode><![CDATA[
        if (
$vbulletin->options['apboupc_global_enable'] AND (THIS_SCRIPT=='private') AND (!is_member_of($vbulletin->userinfosplit(','$vbulletin->options['apboupc_pm_excludedgroups']))))
        {
            if (
$vbulletin->options['apboupc_pm_days'] > 0)
            {
                
$days_registered floor((TIMENOW $vbulletin->userinfo['joindate']) / 86400);
                if (
$days_registered >= $vbulletin->options['apboupc_pm_days'])
                {
                    
$apboupc_pmsnote construct_phrase($vbphrase['apboupc_pm_note_days'], $vbulletin->options['apboupc_pm_daye']);
                    
$vbulletin->templatecache['pm_newpm'] = str_replace('$vbphrase[separate_multiple_names]''$vbphrase[separate_multiple_names]<br /><br />$apboupc_pmsnote'$vbulletin->templatecache['pm_newpm']);
                }                    
            }
            if ((
$vbulletin->options['apboupc_pm_amount'] !='0') AND ($vbulletin->options['apboupc_pm_amount'] > $vbulletin->userinfo[posts]))
            {
                
$apboupc_pmsnote construct_phrase($vbphrase['apboupc_pm_note'], $vbulletin->options['apboupc_pm_amount']);
                
$vbulletin->templatecache['pm_newpm'] = str_replace('$vbphrase[separate_multiple_names]''$vbphrase[separate_multiple_names]<br /><br />$apboupc_pmsnote'$vbulletin->templatecache['pm_newpm']);
            }
        }]]></
phpcode>
    </
plugin
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08111 seconds
  • Memory Usage 2,410KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (8)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete