Decrease members post count on post deletion - نوشته شده در (5721 Views)
Average Member
modifichicci
مطلب: 787
787
Using antispam mod checking for a number of posts to allow sending mail or PM, if a memeber post and delete his posts can raise the count and then begin to spam..
But snitz code doesn't update member post count if post is deleted.
So I have modified pop_delete to update count when deleting topics, replies, forum and cat.
This is the pop_delete modified in an original snitz 06 file. Changing are marked by
' #### post count update modifichicci mod #####

and

' #### post count update modifichicci mod ##### END

pop_delete mod
It works on my sql forum, but I think no problem with access also

save file as pop_delete.asp and if you haven't made changes overwrite the old file, or compare files..
Title changed by ruirib<
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Moderator
AnonJr
مطلب: 5768
5768
Will it not decrease the post count if they delete a post made in a forum that doesn't increase the post count?
For instance, if I make a post in the testing forum here it doesn't increase my post count. Would your MOD subtract one post if I deleted said post?<
نوشته شده در
Average Member
modifichicci
مطلب: 787
787
Now if forum doesn't increase count, if deleting a post in that forum count doesn't decrease.
File updated. Thanks

(more testing are welcome..)<
نوشته شده در
Average Member
modifichicci
مطلب: 787
787
I have checked also for moderate post, if not approved or suspended their deletion doesn't affect count (as it is not affected if not approved..).
File updated.
<
نوشته شده در
Forum Moderator
AnonJr
مطلب: 5768
5768
Nice work. smile<
نوشته شده در
Advanced Member
Etymon
مطلب: 2396
2396
Thanks! Good idea! wink<
نوشته شده در
Junior Member
Hermes
مطلب: 113
113
Modifichicci I get this message when tried to delete individual post:

Microsoft VBScript compilation error '800a03ee'
Expected ')'
/forum/pop_delete.asp, line 634
canUpdate = cLng(getForumCount(Forum_Cat_Replica)

also when tried delete topic


<
ASP Snitz Forum Upute za instalaciju http://www.kairos.com.hr http://www.hermetizam.com Forum
not so newbie any more :)
نوشته شده در
Average Member
modifichicci
مطلب: 787
787
there is a missing ) at the end of the line.. and in some lines after.. sorry..

and thanks..
File updated now.<
نوشته شده در
Junior Member
Hermes
مطلب: 113
113

Yes, working now.
excellent cool
<
ASP Snitz Forum Upute za instalaciju http://www.kairos.com.hr http://www.hermetizam.com Forum
not so newbie any more :)
نوشته شده در
Support Moderator
Shaggy
مطلب: 6780
6780
Nice work, Mod' smile
Worked on this meself a couple of times over the years but never got around to finishing it off.
<
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.”
نوشته شده در
Average Member
modifichicci
مطلب: 787
787
Yes Image, that is true, I have been confused as in pop delete is used strActivePrefix because it works both on A_TABLE and TABLE, but FORUM doesn't need of archived function.
CHange the function to this

function getForumCount(fPostCount)
Dim strSql
Dim rsgetForumCount
'## Forum_SQL
if isNull(fPostCount) then exit function
strSql = "SELECT F_COUNT_M_POSTS "
strSql = strSql & "FROM " & strTablePrefix & "FORUM "
strSql = strSql & "WHERE FORUM_ID = " & cLng(fPostCount)

Set rsgetForumCount = Server.CreateObject("ADODB.Recordset")
rsgetForumCount.Open strSql, my_Conn

if rsgetForumCount.EOF or rsgetForumCount.BOF then
getForumCount = ""
else
getForumCount = rsgetForumCount("F_COUNT_M_POSTS")
end if
rsgetForumCount.Close
Set rsgetForumCount = nothing
end function

Thanks Shaggy!!
I will update the zip on snitzbitz (mod is in approve mod till now..)<
شما باید یک متن وارد کنید