The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Hack for Maximum Post Count
Hello, all. We have a pretty complex aMember setup and can't really take full advantage of the VB Promotions system to create a usergroup for this specific need.
We have a newbie's corner that is designed to be a place for new members to congregate and discuss their experiences. We want to limit it to people with 150 or fewer posts. We've tried hacking the Advanced Permissions Based on Post Count mod, but it's got a lot more to it than what we need. We found a different plugin that had much fewer options, rewrote it to look for post counts and exclude the admins and moderators, but we just can't get it to work correctly. Any thoughts on what we might do differently? Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="newbie_corner" active="1"> <title>Newbie Corner Hack.</title> <description>This is a custom plugin to set the newbie corner board to be viewable only by those with 150 or fewer posts.</description> <version>1</version> <url>http://www.somesite.com</url> <versioncheckurl /> <dependencies> </dependencies> <codes> </codes> <templates> </templates> <stylevardfns> </stylevardfns> <stylevars> </stylevars> <plugins> <plugin active="1" executionorder="5"> <title>Minimum number of posts to view forum.</title> <hookname>forumdisplay_start</hookname> <phpcode><![CDATA[global $vbulletin, $foruminfo; $newbieid = '814'; $adminid = array(6,14); $maxposts = 150; if(in_array($vbulletin->$foruminfo['forumid'], $newbieid)) { if (!is_member_of($vbulletin->userinfo, $adminid)) { if ($vbulletin->userinfo['posts'] < $maxposts) { standard_error(fetch_error('numposts_message', $vbulletin->userinfo['username'], $vbulletin->userinfo['posts'])); } } } }]]></phpcode> </plugin> </plugins> <phrases> <phrasetype name="Error Messages" fieldname="error"> <phrase name="numposts_message"><![CDATA[An error has occurred {1}! You must have 150 or fewer posts in order view this forum. Your current post count is {3}.]]></phrase> </phrasetype> </phrases> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|