Author |
Topic |
stone5150
Starting Member
36 Posts |
Posted - 11 June 2007 : 17:33:20
|
I figured I needed some sort of check ther, but I can't quite work out what that should be. All the ones I have tried so far besides the extra simplistic one I listed above made it so no one could delete, even a super admin.
What should it be and if not that one, then which? |
|
|
gary b
Junior Member
USA
267 Posts |
Posted - 12 June 2007 : 15:53:19
|
stone5150...
I have modified the Snitz files. I have the Author-delete capability working -- even though there are replies for the topic. Everything else seems to be operating correctly, but I have NOT done extensive testing!
The forum counts do not automatically update. That is next on the list.
If you are interested in experimenting with these changes, please let me know. I will email the asp file(s) to you. But remember -- I just got this working on my forum. Backup before testing is required.
gary b
|
|
|
stone5150
Starting Member
36 Posts |
Posted - 12 June 2007 : 16:02:40
|
That would be great. I sent you an email with my email address rather than post it here, for obvious reasons.
Thanks =o) |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 12 June 2007 : 16:15:38
|
When you guys do get something viable, please don't forget to post it here for the benefit of anyone looking for a similar solution. Nothing is more frustrating than to find a thread that is exactly what you are looking for - with the solution sent privately via email. |
|
|
gary b
Junior Member
USA
267 Posts |
Posted - 12 June 2007 : 16:31:34
|
Sometimes reminders are necessary for us 'senior citizens'...
I will do some (necessary) additional testing and confer with stone5150. Once changes look viable for wide dissemination, I will post to the MOD w/Code forum.
Thanks for the reminder, AnonJr... owe ya a beer. |
Edited by - gary b on 13 June 2007 09:29:03 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 12 June 2007 : 16:40:28
|
Not a problem. Having been that frustrated user many times in the past, I'm always trying to make sure it doesn't happen again. |
|
|
stone5150
Starting Member
36 Posts |
Posted - 12 June 2007 : 17:32:53
|
Don't I get some crdeit for the mod? |
|
|
gary b
Junior Member
USA
267 Posts |
Posted - 13 June 2007 : 09:25:20
|
This is turning out to be more complicated than I envisioned!
Status: 1. pop_delete.asp and topic.asp have been modified 2. 'Delete' icon (trashcan) is displayed for topic AUTHOR 3. Delete icon not visible for non-Author/creator of topic 4. AUTHOR can delete topics he/she created -- even if replies have been posted. 5. Have cloned 'admin_count.asp' (as count_refresh.asp) so that: a. Admin permission not needed to 'run' b. Runs automatically upon delete of topic c. Redirects to 'default.asp' at end of 'delete topic' process (# of Posts not being refreshed. Troubleshooting it now) 6. Realized that, if topic delete process runs, it "orphans" the replies for this topic!! 7. Must automate process of deleting all replies associated with the deleted topic.
Summary -- So while my changes *do* work, there is simply more to this process than making the topic go away! Once I have resolved these issues, I will post changes for evaluation.
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 13 June 2007 : 09:55:34
|
quote: Originally posted by gary b
This is turning out to be more complicated than I envisioned!
Funny how that happens.
I don't have the code in front of me, but you might want to trace the code for when a Moderator or Administrator deletes a post as that may clue you in to what needs to run to handle things like replies etc. (did that make sense? I'm cutting back on the coffee and my mind seems to wander/ramble more than it used to...) |
|
|
gary b
Junior Member
USA
267 Posts |
Posted - 13 June 2007 : 10:51:36
|
quote: (did that make sense? I'm cutting back on the coffee and my mind seems to wander/ramble more than it used to...)
Yep... especially if an Admin delete of topic automatically deletes replies!!
So, stone5150... give me a little time. Thanks AnonJr...
Did this make sense? I'm cutting back on my mind and the coffee seems to wander/ramble more than it used to...
gary b
|
|
|
modifichicci
Average Member
Italy
787 Posts |
Posted - 13 June 2007 : 11:04:24
|
I think you can simpy check the function function chkUser5(fName, fPassword, fTopic)
in pop delete, where is set permission to delete topics for admin and moderator and add a check you need (there is already a check for author but with replies <1 .. take a look..)
if cLng(rsCheck("MEMBER_ID")) = cLng(rsCheck("T_AUTHOR")) and cLng(rsCheck("T_REPLIES")) < 1 then
i think if you remove and cLng(rsCheck("T_REPLIES")) < 1 the game is done.. |
Ernia e Laparocele Forum di Ernia e Laparocele Acces - MySql Migration Tutorial Adamantine forum |
|
|
stone5150
Starting Member
36 Posts |
Posted - 13 June 2007 : 11:12:59
|
The 2 simple changes I made to pop_delete.asp and topic.asp seem to work. I don't have the orphaned comments either. That is unless I am not looking in the right places. |
|
|
modifichicci
Average Member
Italy
787 Posts |
Posted - 13 June 2007 : 11:45:40
|
the change in pop delete you have made is similar to mine, but have you check if someone can delete post he has not written? if you know the link you can pass the show icon.. With your change no control on deleting, every memebers can delete a topic whatever author is, with mine only admin, moderator or author can That is dangerous as everybody can delete topics..simpy typing the command pop delete..
|
Ernia e Laparocele Forum di Ernia e Laparocele Acces - MySql Migration Tutorial Adamantine forum |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 13 June 2007 : 12:01:30
|
quote: Originally posted by gary b
quote: (did that make sense? I'm cutting back on the coffee and my mind seems to wander/ramble more than it used to...)
Yep... especially if an Admin delete of topic automatically deletes replies!!
So, stone5150... give me a little time. Thanks AnonJr...
Did this make sense? I'm cutting back on my mind and the coffee seems to wander/ramble more than it used to...
gary b
See, now you're just having fun with me. |
|
|
gary b
Junior Member
USA
267 Posts |
Posted - 19 June 2007 : 07:29:10
|
stone5150...
I have this change working. I have tested it, but NOT extensively. I emailed the files to you.
The change: Allows Author of topic to delete the topic regardless of number of replies
What the changes do: 1. forum.asp: if User is topic author, displays 'trashcan' (delete) icon on topic listing line. No delete option if not author. 2. pop_delete.asp: code verifies User as Author and processes delete action (deletes topic, all replies, and all subscriptions) 3. Recalculates topic/reply totals after topic deletion
Please let me know if the changes work properly for you. I will then make the files available to others for testing/use.
gary b
|
|
|
Topic |
|