Weird Request. - Posted (1583 Views)
Junior Member
spyderuk
Posts: 211
211
I have a member that is currently posting in the forum then deleting the post just to increase their post count's. I have sat and watched him do it from active users, seen new post, then it's gone. Have reduced post count in profile then get moaning pm's from him, then he goes and does it again.
I was wondering if anyone could help with a line of code or the edit for the exisiting code to go in post.asp (is it?) that would check for members id before increasing the post count and if it was that member ID then -1 from the post count? tongue
A bit messy I know but would be apreciated if anyone could help!<
Snitz 3.4.05. Mods Installed, Additional Smilies, Poll's, PM's, Email All Users, Today/Yesterday, Active Users 4, Portal Mod, My Own Google, Referer Mod, Avatars, Intergrated Conqueror Chat, Usergroups, IPGate, File Attachment Mod & Image Resize Mod. Next Mod? My Snitz Forum wink
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Forum Admin
HuwR
Posts: 20611
20611
look in inc_func_count.asp for the doUCount function<
Posted
Junior Member
spyderuk
Posts: 211
211
Ah so the proposed change would go in here somewhere? Maybe an if, else statement. Sorry my asp knowledge is very bad.
sub doUCount(sUser_Name)
'## Forum_SQL - Update Total Post for user
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_POSTS = M_POSTS + 1 "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(sUser_Name, "SQLString") & "'"

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub<
Snitz 3.4.05. Mods Installed, Additional Smilies, Poll's, PM's, Email All Users, Today/Yesterday, Active Users 4, Portal Mod, My Own Google, Referer Mod, Avatars, Intergrated Conqueror Chat, Usergroups, IPGate, File Attachment Mod & Image Resize Mod. Next Mod? My Snitz Forum wink
Posted
Senior Member
bobby131313
Posts: 1163
1163

You have a whole lot more patience than me. He'd get one warning then I'd push the button. shockbigsmile
<
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
Or as punishment (after a warning of course) you could use the UserGroup MOD to set his access to all forums to "Read Only" for a week...<
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
Originally posted by spyderuk
Ah so the proposed change would go in here somewhere? Maybe an if, else statement. Sorry my asp knowledge is very bad.
sub doUCount(sUser_Name)
'## Forum_SQL - Update Total Post for user
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_POSTS = M_POSTS + 1 "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(sUser_Name, "SQLString") & "'"

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
Even though I agree with the previous comments about locking him without many hesitations, you could code it like this:
Code:

sub doUCount(sUser_Name)
'## Forum_SQL - Update Total Post for user
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_POSTS = M_POSTS + 1 "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(sUser_Name, "SQLString") & "'"
If MemberId<>xxx then my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if end sub
<
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
Correct me if I'm wrong, but wouldn't that only execute the query if the Member ID is the one in question? thereby only incrementing that member's post count?<
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
Originally posted by AnonJr
Correct me if I'm wrong, but wouldn't that only execute the query if the Member ID is the one in question? thereby only incrementing that member's post count?
Where? coolbigsmiletongue<
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
Nothin like a quick edit. wink I mean, it must have been the lack of sleep blurring the code... tongue<
Posted
Junior Member
spyderuk
Posts: 211
211
Thanks for the code. I'm getting grief now of other members cos my co Admin decided to put him on probation for 4 weeks! Ah well.
Would that edit result in no post increase as I was thinking of a Minus post count for that 1 user?
AnonJr I use usergroups to make a "Probation Area" They don't even get to see the other forums and in conjuction with the IP gate mod they get blocked from accessing all PM related pages bigsmile<
Snitz 3.4.05. Mods Installed, Additional Smilies, Poll's, PM's, Email All Users, Today/Yesterday, Active Users 4, Portal Mod, My Own Google, Referer Mod, Avatars, Intergrated Conqueror Chat, Usergroups, IPGate, File Attachment Mod & Image Resize Mod. Next Mod? My Snitz Forum wink
Posted
Support Moderator
Shaggy
Posts: 6780
6780
A better option may be to decrement a member's post count if one of their posts is deleted either by themself or a staff member. This way, only the legitimate posts this particular member made would be counted towards their total. For even more fun, don't tell anyone what you've done and watch htis member post & delete fruitlessly for a while before they realise what you've done! wink
I posted the necessary changes to pop_delete.asp a while back, you should be able to find them with a search.
<
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.”
You Must enter a message