Allow only Administrators to delete a topic
+2
Perfe <3
smurfavr
6 posters
Page 2 of 2
Page 2 of 2 • 1, 2
Allow only Administrators to delete a topic
First topic message reminder :
@TheCrow I pasted the code as written, but the moderator can still delete topics. https://help.forumotion.com/t155267-allow-only-administrators-to-delete-a-topic
@TheCrow I pasted the code as written, but the moderator can still delete topics. https://help.forumotion.com/t155267-allow-only-administrators-to-delete-a-topic
Re: Allow only Administrators to delete a topic
OliverJ wrote:Yes he/she have the rights of all these things.
Please do not hijack another member’s topic
If you have a problem with your forum please open your own thread
Re: Allow only Administrators to delete a topic
@smurfavr,
For my test forum, I used the same code and I even made my forum in Bulgarian to test it, and it still works fine. Is there any other code that may interfere with this code?
Regards,
TC.
For my test forum, I used the same code and I even made my forum in Bulgarian to test it, and it still works fine. Is there any other code that may interfere with this code?
Regards,
TC.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Allow only Administrators to delete a topic
Code works. The problem was with me. I had made a mistake and had not checked the In all the pages checkbox. I'm sorry.
Which codes from the ones you gave me to use?
This
@TheCrow Thanks for your time.
Which codes from the ones you gave me to use?
This
- Code:
// A code by :copyright:️TheCrow (2018) for Forumotion. Please do not remove these comments :
// http://help.forumotion.com/t155267-allow-only-administrators-to-delete-a-topic#1067499
$(document).ready(function () {
if (!(_userdata.user_level == 1)) {
$(function(){
if (/mode=delete/.test(window.location.href)) {
$('input.mainoption').remove();
$('<span style="display:block;text-align:center;color:red;font-weight:700;font-size:16px">Sorry but only Administrators are allowed to delete topics.</span>').insertAfter('input.liteoption');
}
});
$('a[href*="modcp?mode=delete"]').removeAttr('href').css("cursor","not-allowed");
$('a img[alt="Delete this topic"]').attr("title","Only Administrators are allowed to delete a topic"); // For Mod-Tools deletion of the entire topic
$('td.post-options a[href*="mode=delete"]').removeAttr('href').attr('style','cursor:not-allowed!important');
$('img.i_icon_delete').attr("title","Only Administrators are allowed to delete messages").css("cursor","not-allowed"); // For Messages
}
});
@TheCrow Thanks for your time.
Re: Allow only Administrators to delete a topic
Hello,
Happy to hear that it works. Yes, that will work just fine.
Is this now solved?
Happy to hear that it works. Yes, that will work just fine.
Is this now solved?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Allow only Administrators to delete a topic
There's another thing you didn't do in the code. From the button you can moderate this forum moderator can delete topics.
Re: Allow only Administrators to delete a topic
Hello,
Try this code instead:
This should fix that button too.
Regards,
TC.
Try this code instead:
- Code:
// A code by :copyright:️TheCrow (2018) for Forumotion. Please do not remove these comments :
// http://help.forumotion.com/t155267-allow-only-administrators-to-delete-a-topic#1067499
$(document).ready(function () {
if (!(_userdata.user_level == 1)) {
$(function(){
if (/mode=delete/.test(window.location.href)) {
$('input.mainoption').remove();
$('<span style="display:block;text-align:center;color:red;font-weight:700;font-size:16px">Sorry but only Administrators are allowed to delete topics.</span>').insertAfter('input.liteoption');
}
});
$('input.liteoption[name="delete"]').remove();
$('a[href*="modcp?mode=delete"]').removeAttr('href').css("cursor","not-allowed");
$('a img[alt="Delete this topic"]').attr("title","Only Administrators are allowed to delete a topic"); // For Mod-Tools deletion of the entire topic
$('td.post-options a[href*="mode=delete"]').removeAttr('href').attr('style','cursor:not-allowed!important');
$('img.i_icon_delete').attr("title","Only Administrators are allowed to delete messages").css("cursor","not-allowed"); // For Messages
}
});
This should fix that button too.
Regards,
TC.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Allow only Administrators to delete a topic
Everything works very well. Thank you very much. @TheCrow
I want to ask you for other changes to the code that I want to make in this topic or write a new topic?
I want to ask you for other changes to the code that I want to make in this topic or write a new topic?
Re: Allow only Administrators to delete a topic
Hello,
It would be best to do this in a new topic instead.
Regards,
TC.
It would be best to do this in a new topic instead.
Problem solved & topic archived.
|
Regards,
TC.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Page 2 of 2 • 1, 2
Similar topics
» Allow only Administrators to delete a topic
» Allow only Administrators to delete a topic (Change the code)
» Major Flaw in the tutorial "allow-only-administrators-to-delete-a-topic"
» I need an administrators help please forumotion sent me a delete forum message
» I delete a topic
» Allow only Administrators to delete a topic (Change the code)
» Major Flaw in the tutorial "allow-only-administrators-to-delete-a-topic"
» I need an administrators help please forumotion sent me a delete forum message
» I delete a topic
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum