Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Limit posting in specific area by post count
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Dash Designs
Starting Member

Australia
7 Posts

Posted - 21 January 2008 :  21:23:00  Show Profile  Reply with Quote
Hi guys. I have tried searching for MODS with lots of different phrases but still no result, so I am guessing it isn't possible yet or maybe someone can tell me otherwise. Here's my problem:

I have a trading area on our forum where users can post items for sale. Every now and again someone will come in and post up and advert for their very first post after joining without introducing themselves. My forum members are annoyed that people are using it as a free advert instead of joining in the forum community, but worse still, some people have bought items to find out the guys has taken the money never to be seen again. I have posted warnings and advice but still this happens, so the gerneral concensus was they want me to make it impossible for starting members with less than say 20 posts to post in that one area. I already have the 10 post count limit for emailing members which stopped the spammers so I'm guessing this sort of thing should be possible but I just don't know how to do it myself or cannot find a MOD.

Can anyone help? Thanks in advance.<

bobby131313
Senior Member

USA
1163 Posts

Posted - 21 January 2008 :  21:29:28  Show Profile  Visit bobby131313's Homepage  Reply with Quote
I've been kicking this around also. Must have minimum of 50 posts and 14 days to Buy/Sell/Trade on the forum. But people don't read and post items for sale anyway. The busier we get (we're growing like wildfire) the more time consuming dealing with these people is, so it would be sweet if they were simply turned down from posting in those forums with less than 50 posts automagically.<

Switch the order of your title tags
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 22 January 2008 :  04:19:10  Show Profile  Reply with Quote
What you need to do is turn private forums on and set the authorisation type on the forum you want to restrict access to to "Allowed Member List". Then, in post_info.asp, add a check on the number of posts the member has made when processing their posts and add them to the list for that forum if it equals the requirement.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 22 January 2008 :  06:32:42  Show Profile  Visit AnonJr's Homepage  Reply with Quote
I seem to remember this being done before too... when you searched, did you include the archive?<
Go to Top of Page

Dash Designs
Starting Member

Australia
7 Posts

Posted - 22 January 2008 :  19:48:41  Show Profile  Reply with Quote
Shaggy: So post_info.asp is where I need to add code that check for number of posts? Will this not effect all forum areas if I hard code this page to do that? Also, will it only show the forum to the Allowed members list? If this is tha case then it will not help as the area itself is a good draw card to the site and encourages people to become active members.

AnonJr: Sorry mate, I didn't check archived topics. I will do so now.

EDIT... Just spent all morning checking the archive posts and could find nothing there either. Sorry guys.<

Edited by - Dash Designs on 22 January 2008 21:33:04
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 22 January 2008 :  21:23:06  Show Profile  Reply with Quote
I have not tested this. Add the code in red. Cahnge code in green to the topic number of the topic you wish to protect.
post_info.asp lines 951-6

if MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
	'## Forum_SQL
	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, M_POSTS, " & strDBNTSQLname
	if strAuthType = "db" then
		strSql = strSql & ", M_PASSWORD "
	end if

lines 977-1

		if strPrivateForums = "1" and ForumChkSkipAllowed = 0 then
			if not(chkForumAccess(Forum_ID,MemberID,false)) or (rs("M_POSTS")<1 AND TOPIC_ID=15772) then
				Go_Result "You are not allowed to post in this forum !", 0
			end if
		end if
<
Go to Top of Page

Dash Designs
Starting Member

Australia
7 Posts

Posted - 22 January 2008 :  21:42:27  Show Profile  Reply with Quote
Hi phy1729. Thanks for your reply. I am a bit scared to try anything that might not work as I have constant activity on the site as it is a world wide community and can't afford to let it stop working, but my question is it mentions TOPIC_ID as the number I need to change. Is that what the entire "TRADING forum" (The area within the enitire Snitz forums ap that when I created it prompts me to create a new forum) I have is called in the database? It goes by TOPIC_ID as opposed to FORUM_ID? If it is only changing the one topic then I can't really use it as there are probably around 15 new topics added every day.

<
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 22 January 2008 :  22:06:55  Show Profile  Reply with Quote
Ok I'll test it on my forum and all you need to do is change TOPIC_ID to FORUM_ID. I'll let you know how it turns out.<
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 22 January 2008 :  22:35:19  Show Profile  Reply with Quote
Alright only works if strPrivateForums is 1 so change the second code box to

		if strPrivateForums = "1" and ForumChkSkipAllowed = 0 then
			if not(chkForumAccess(Forum_ID,MemberID,false)) then
				Go_Result "You are not allowed to post in this forum !", 0
			end if
		end if

		if (rs("M_POSTS")<20 AND FORUM_ID=15772) then
			Go_Result You are not allowed to post in this forum !", 0
		end if

<

Edited by - phy1729 on 22 January 2008 22:35:47
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 22 January 2008 :  23:04:03  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Maybe I was thinking of this topic... [link]

Either way it should give you a couple of ideas.<
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 22 January 2008 :  23:11:31  Show Profile  Visit bobby131313's Homepage  Reply with Quote
Awesome thanks!

Question though, I have 6 or so forums I need to check for, what's the syntax for that? Do I just put OR in between them?
<

Switch the order of your title tags

Edited by - bobby131313 on 22 January 2008 23:13:35
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 23 January 2008 :  06:13:29  Show Profile  Visit AnonJr's Homepage  Reply with Quote
You could do that, although if the list is going to get large you could consider setting up an array in config.asp and checking to see if the forum ID is in that array. I've got some similar code at work that I'll post if I get a chance... I'm teaching classes all day so you might want to bump this tomorrow afternoon if you don't hear back from me.<
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 23 January 2008 :  08:29:17  Show Profile  Visit muzishun's Homepage  Reply with Quote
If you're not averse to getting your hands dirty in the code, you could also add an AuthType in the FORUM table. Basically set it so there is a minimum post count to get in. Would require changes to post.asp, post_info.asp, forum.asp, topic.asp, default.asp, active.asp, and maybe one or two more that I'm not thinking of. The nice thing, though, is that it would be configurable by forum, and you wouldn't have to edit the code each time you added a forum of this type (not that many people are likely to be doing so all that often).<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 23 January 2008 :  11:10:17  Show Profile  Reply with Quote
I've been testing this for the last couple of hours and everything seems to working ok.

http://www.snitzbitz.com/mods/details.asp?Version=All&mid=259

There are 4 changes in post_info.asp
You can check for a post count in as many forums as you want by adding them to an array near the top of the page. Each forum has its own post count. Works with all forums including private and moderated.

Be sure to read the instructions at the top of the referance file.

Heres how it works
'### Minimum post mod hard code ###################
'##
'## Check Admins and/or Mods post count - set to true - Will not check Top Forum Admin

const chkAdminPosts = false
const chkModPosts = false

'## Add your forum here
'## Format "2|50" seperated by comma - first number is forum id. second number is minimum posts.
'##  EXAMPLE:  aForumPostCnt=array("2|50","6|20")

aForumPostCnt=array()

'#################################################
<

    _-/Cripto9t\-_
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 23 January 2008 :  11:28:40  Show Profile  Visit muzishun's Homepage  Reply with Quote
Nice work. It does look pretty simple and straightforward. I may (at some point) go through and mash something together that creates an AuthType from the forum control panel, but your solution is simple, effective and works. Nicely done.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 23 January 2008 :  11:58:09  Show Profile  Visit bobby131313's Homepage  Reply with Quote
Works great cripto, tested it with admins, moderators, and regular users over and under 50 posts and works perfectly in all scenarios.

Thanks! <

Switch the order of your title tags
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07