Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 Jul 2012, 23:55
clickinmoms clickinmoms is offline
 
Join Date: Jul 2012
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?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 17 Jul 2012, 00:05
kh99's Avatar
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
In this line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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.
Reply With Quote
  #3  
Old 17 Jul 2012, 00:29
clickinmoms clickinmoms is offline
 
Join Date: Jul 2012
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?
Reply With Quote
  #4  
Old 17 Jul 2012, 01:12
kh99's Avatar
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
It could this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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.
Reply With Quote
  #5  
Old 17 Jul 2012, 06:55
clickinmoms clickinmoms is offline
 
Join Date: Jul 2012
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #6  
Old 17 Jul 2012, 11:41
kh99's Avatar
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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.
Reply With Quote
  #7  
Old 17 Jul 2012, 11:46
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
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.
Reply With Quote
  #8  
Old 17 Jul 2012, 14:34
clickinmoms clickinmoms is offline
 
Join Date: Jul 2012
Thanks to both of you. I went ahead and modified your code @borbole to meet our needs. Worked like a charm!
Reply With Quote
  #9  
Old 16 Aug 2012, 15:17
clickinmoms clickinmoms is offline
 
Join Date: Jul 2012
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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 08:17.

Layout Options | Width: Wide Color: