![]() |
|
|
Thread Tools |
|
#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?
No members have liked this post.
|
||||
|
#2
|
||||
|
||||
|
In this line:
you should remove the $vbulletin and just use $foruminfo['forumid'] (but I'm not sure if that's the only problem).
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
||||
|
#3
|
|||
|
|||
|
That removed the 500 error we were receiving, but when testing it with a user with more than 150 posts who is not in an Administrator or Moderator, it still allows them to view the forum.
Am I using the wrong hook or is the way I'm grabbing their group ID or post count incorrect? No members have liked this post.
|
|
#4
|
||||
|
||||
|
It could this:
because $newbieid isn't an array (you probably just want to use ==).
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
||||
|
#5
|
||||
|
||||
|
OK, I tried that, but with no luck. I also removed the code to check and see if you were in the admin array and the same results. This narrows it down to not calling the forum ID, not counting the posts or not using my hooks appropriately.
Any other ideas? Here's my latest code:
No members have liked this post.
|
||||
|
#6
|
||||
|
||||
|
Oh...you have an extra closing } in there - take off one of the 3 at the end. It seems to work OK - where you're getting the forumid and posts look right.
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
|
#7
|
||||
|
||||
|
If you want you can use my mod here. You can set the post count needed to enter a forum on a forum per forum basis.
http://www.vbulletin.org/forum/showthread.php?t=249977
__________________
Unlimited PHP&HTML&BB Code Custom Pages Please do not pm/email me for free support. I provide Paid Support Only in private. Thank you ![]() My mods. No members have liked this post.
|
|
#8
|
|||
|
|||
|
Thanks to both of you. I went ahead and modified your code @borbole to meet our needs. Worked like a charm!
The following members like this post: borbole
|
|
#9
|
|||
|
|||
|
Hey, @borbole. I have a question for you about your mod. As you know I modified it to look for a maximum post count rather than a minimum post count and it works perfectly. But I am now noticing that people can still see posts from this "limited access" forum when they click on the "New Posts" link.
I want to add some code to the mod that prevents the user from seeing the posts from that forum if they don't meet the number of posts criteria but I'm not sure which hookname to tap into. I'd be glad to pay for the work, or if you wouldn't mind telling me which hookname I should be looking at to target the New Posts section, I can take a stab at it myself and share it here once I get it working. No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 08:17.



