Author |
Topic |
|
spyderuk
Junior Member
United Kingdom
211 Posts |
Posted - 12 August 2006 : 10:40:38
|
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?
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
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 12 August 2006 : 12:41:23
|
look in inc_func_count.asp for the doUCount function< |
|
|
spyderuk
Junior Member
United Kingdom
211 Posts |
Posted - 12 August 2006 : 15:12:16
|
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
|
|
|
bobby131313
Senior Member
USA
1163 Posts |
Posted - 12 August 2006 : 19:16:09
|
You have a whole lot more patience than me. He'd get one warning then I'd push the button.
< |
Switch the order of your title tags |
Edited by - bobby131313 on 12 August 2006 19:16:27 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 12 August 2006 : 19:30:39
|
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...< |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 12 August 2006 : 20:05:25
|
quote: 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:
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
< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 12 August 2006 : 23:00:49
|
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?< |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 12 August 2006 : 23:15:24
|
quote: 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? < |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 13 August 2006 : 11:55:40
|
Nothin like a quick edit. I mean, it must have been the lack of sleep blurring the code... < |
|
|
spyderuk
Junior Member
United Kingdom
211 Posts |
Posted - 13 August 2006 : 12:51:01
|
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 < |
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
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 14 August 2006 : 07:32:17
|
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!
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.” |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 14 August 2006 : 08:28:47
|
That is not what the postcount is for, so decrementing when a post is deleted is not correct< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 14 August 2006 : 09:13:57
|
Ay, I know, but there are some, like me, who prefer to do it the incorrect way.
< |
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.” |
|
|
spyderuk
Junior Member
United Kingdom
211 Posts |
Posted - 16 August 2006 : 12:41:01
|
I think it is the fun way to deal with the phantom posters that make 30 new posts and delete around 25 of them.
Shaggy, That sounds spot on! I'll have to search harder, Cheers < |
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
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 16 August 2006 : 12:58:23
|
Note that this will effect all users and will decrement their post count whether they delete their own posts or it's down my a mod/admin. If that's not what you want to do, then go with Rui's suggestion.
< |
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.” |
|
|
|
Topic |
|