![]() |
Disable Usergroups From Deleting Posts
As requested [ Here ] by The Ghost :)
+++++++++++++++++++++++++++++++++++++++++++++++++ // +++++++ What to do? +++++++ // +++++++ Queries to Run (1) +++++++ // +++++++ File Modifications (7) +++++++ // +++++++ Templates To Add (1) +++++++ +++++++++++++++++++++++++++++++++++++++++++++++++ What does this do? It restricts usergroups from deleting posts, pertaining mainly to Super Moderators and Moderators. If you don't trust you moderators when it comes to deleting certain posts or trust their judgement then editing should be suffice enough. Here you can disable those usergroups from deleting any posts. Enjoy. ;) Edit: big thanks to Boofo for helping me sort some issues out and getting things back on track :) g-force2k2 |
I thought this hack was cool myself i'll probably be installing it on my own forum :D
Here's a screenshot of the added permission ;) thanks to The Ghost for confirming that an option like this didn't exist :p Though i know you can restrict by forums but thats a much bigger task :) Enjoy One more quick note if you disable administrators from deleting posts then they won't have access either... for security reasons all usergroups were set to no... so you have to activate the users you want to have permission ;) regular members wont' have access either way :p g-force2k2 |
Will this also stop them from deleting threads? That's what the Ghost was looking for, I think.
|
woot very nice, very helpful hack = ]
|
Quote:
g-force2k2 |
Can we get a text version of this, too, please? :)
|
Boofo it is a text version :p just open the file in word pad i just have a tendency to write all my hacks on php files :)
g-force2k2 |
Thanks! Might not be a bad idea to say that in the first message. :)
|
I have this in 2 places in the editpost.php. Which one do I add the code after?
if ($action=="deletepost") { |
sorry boofo ;\ totally missed that... i tested it on the first one but failed to see the second one... but correct me if i am wrong but if you place it on the first one can you edit the post then or does it give you an error?
g-force2k2 |
This line is in the usergroup.php not the user.php. You need to edit your instructions.
makeyesnocode("Can delete own threads by deleting the first post","candeletethread",0); |
i made an error :p i will fix the changes and update tomarrow ;\ don't have a forum to test with at the moment so i'll re add later... sorry about that...
g-force2k2 |
Quote:
g-force2k2 |
After adding it after the first occurrance, I can still edit posts so that looks good. You haven't tested this yet? Shouldn't it be in the beta section until it is fully tested at least once? :)
|
I did test it boofo ;) just didn't notice that there were two differen't if ($action=="deletepost") {
my friend allows me to test on his forum but hes not on right now ;\ i tested it but after you stated the issue about two different actions that got me... so i'll do another final test tomarrow... and i'll have to take into consideration the editing perms... but i did test and it didn't allow for deletion ;) but better sure to make sure there isn't anything added before reattaching something that is... g-force2k2 |
Oh, ok. I guess I must have misunderstood you. I will test it now and let you know if all is well. :)
|
in the editpost.php
for security purposes... find both: PHP Code:
PHP Code:
g-force2k2 |
It worked fine with just doing it after the first one. If they can't get the permisssion, they can't carry anything out. :) Go ahead and test it with both if you want and let me know how it goes. I am going to leave it as is for now. If it ain't broke, I don't want to break it. :)
|
yeah i know what you mean... but i guess better safe then sorry thanks for the help alot Boofo :) and thanks for testing the edit option for me... just so you know i reattached and added the template addon to the
PHP Code:
g-force2k2 |
No problem. Glad to help. Now I expect to see my name up in lights as the Ultimate Beta Tester (is there such a thing and if there is, isn't being proud of that a little strange?) :)
|
That templatesused line is commented out. How will adding anything to that do any good? :)
Quote:
|
Why not just use the Usergroup Forum Permissions? In there, it has an option for "Can delete own threads and posts?" for specific forums.
|
But that just pertains to their own threads and posts, doesn't it? This hack makes it so they can't delete others posts and threads. :)
|
There's an option in Forums & Moderators where you can set 'Can delete posts' to 'No' for any Moderator you want. :)
|
yeah afterlab i stated that in the second post that you can update each usergroups permissions by each forum... but i think it's more of an advantage to make it a more easier feature to work with... just my input though besides it was requested ;)
g-force2k2 |
Quote:
g-force2k2 |
Yup, I'm using this hack, but well, without the hack on my forums right now. ^_^
|
What???
Quote:
|
hi,
thx g-force2k2 for writing this hack, but the hack doesn't work in my Forum...... :ermm: I've created a Super Moderator Account and I still can delete..... I've editet both files (editpost.php and Usergroup.php) and I have added the Template. In the Groups Permission I see the function "Can Delete Post", this is set to "no", but it doesn't works....... Please help me..... thx |
Make sure you delete your cookies before logging in under another account. It might still be picking up the old cookie. :)
Quote:
|
Hi,
I tryed this, but it still don't work........ |
hi,
please help me!!! I need this hack!!! :) |
SMods can still delete threads using the pull down admin options :( Any fix for this yet?
**Edit** I just removed the option out of the pull down menu so Im all set now :p Thank you for the hack :D |
Ack! Now admins cant delete posts :paranoid: lol
|
All times are GMT. The time now is 09:15 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|