@TheCrow Can the code change not allow the moderator to use the button, change this post and the button see the IP of the user?
- Code:
// A code by :copyright:️TheCrow (2018) for Forumotion. Please do not remove these comments :
// https://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">За съжаление само администраторите могат да изтриват теми.</span>').insertAfter('input.liteoption');
}
});
$('input.liteoption[name="delete"]').remove();
$('a[href*="modcp?mode=delete"]').removeAttr('href').css("cursor","not-allowed");
$('a img[alt="Изтрийте тази тема."]').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","Само администраторите могат да изтриват съобщения.").css("cursor","not-allowed"); // For Messages
}
});
Last edited by smurfavr on March 2nd 2020, 2:28 pm; edited 3 times in total