T O P I C R E V I E W |
Dash Designs |
Posted - 21 January 2008 : 21:23:00 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.< |
15 L A T E S T R E P L I E S (Newest First) |
Dash Designs |
Posted - 30 January 2008 : 07:06:52 Sorry for the delay on this one, time is at a premium for me these days!
I have applied the mod that cripto9t suggested and the whole thing works perfectly. Much appreciated mate!
Thanks also to phy1729 for your time as well.
Big thanks to all who input to this forum, it's a great resource thanks to your efforts.< |
bobby131313 |
Posted - 23 January 2008 : 11:58:09 Works great cripto, tested it with admins, moderators, and regular users over and under 50 posts and works perfectly in all scenarios.
Thanks! < |
muzishun |
Posted - 23 January 2008 : 11:28:40 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.< |
cripto9t |
Posted - 23 January 2008 : 11:10:17 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()
'################################################# < |
muzishun |
Posted - 23 January 2008 : 08:29:17 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).< |
AnonJr |
Posted - 23 January 2008 : 06:13:29 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.< |
bobby131313 |
Posted - 22 January 2008 : 23:11:31 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? < |
AnonJr |
Posted - 22 January 2008 : 23:04:03 Maybe I was thinking of this topic... [link]
Either way it should give you a couple of ideas.< |
phy1729 |
Posted - 22 January 2008 : 22:35:19 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
< |
phy1729 |
Posted - 22 January 2008 : 22:06:55 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.< |
Dash Designs |
Posted - 22 January 2008 : 21:42:27 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.
< |
phy1729 |
Posted - 22 January 2008 : 21:23:06 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
< |
Dash Designs |
Posted - 22 January 2008 : 19:48:41 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.< |
AnonJr |
Posted - 22 January 2008 : 06:32:42 I seem to remember this being done before too... when you searched, did you include the archive?< |
Shaggy |
Posted - 22 January 2008 : 04:19:10 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.
< |