Allow only Administrators to delete a topic (Change the code)
5 posters
Page 1 of 1
Allow only Administrators to delete a topic (Change the code)
@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
Re: Allow only Administrators to delete a topic (Change the code)
Hello @smurfavr,
I did not understand what you want to do. If you could please explain with more details what you want so I could understand what you are wanting to do?
Regards,
TC.
I did not understand what you want to do. If you could please explain with more details what you want so I could understand what you are wanting to do?
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 (Change the code)
I want these two moderator buttons not to be able to use them.
Re: Allow only Administrators to delete a topic (Change the code)
Hello smurfavr
For IP button
-> ACP > Users & groups > Special rights > Special rights
-> Users IP display : Choose Administrators and save
For IP button
-> ACP > Users & groups > Special rights > Special rights
-> Users IP display : Choose Administrators and save
Re: Allow only Administrators to delete a topic (Change the code)
So you want moderators to see the IP button, but can not use it?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Allow only Administrators to delete a topic (Change the code)
@SLGray I wanted the moderators to not use the IP button. Neptune- Solve the problem.
Remained to solve the button problem, changed this post.
Remained to solve the button problem, changed this post.
Re: Allow only Administrators to delete a topic (Change the code)
Change the button?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Allow only Administrators to delete a topic (Change the code)
The moderator should not have access to the button that can change the post.
Re: Allow only Administrators to delete a topic (Change the code)
@smurfavr,
You want the Moderators not to be able to click the IP button? Your question as to what's not to change is not clear yet.
Regards,
TC.
You want the Moderators not to be able to click the IP button? Your question as to what's not to change is not clear yet.
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 (Change the code)
Clicking the IP button does not change the post.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Allow only Administrators to delete a topic (Change the code)
I was talking about disabling two buttons. One that is for the IP user @Neptune- helped me solve the problem with it. Now left to disable, the button changed this post(Modify button).
Yes.SarkZKalie wrote:You mean the "Modify" button
Re: Allow only Administrators to delete a topic (Change the code)
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 (Change the code)
@smurfavr,
The Edit button is modified in the Admin Panel in the Categories rights.
Admin Panel > General > Forum : Categories > select the category > Rights (tab) and where it says edit you can select who can edit the topics and who not to be able to.
Regards,
TC.
The Edit button is modified in the Admin Panel in the Categories rights.
Admin Panel > General > Forum : Categories > select the category > Rights (tab) and where it says edit you can select who can edit the topics and who not to be able to.
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 (Change the code)
Problem solved & topic archived.
|
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!
Similar topics
» Allow only Administrators to delete a topic
» Allow only Administrators to delete a topic
» Major Flaw in the tutorial "allow-only-administrators-to-delete-a-topic"
» With this code you can change and delete only certain messages from chat?
» I need an administrators help please forumotion sent me a delete forum message
» Allow only Administrators to delete a topic
» Major Flaw in the tutorial "allow-only-administrators-to-delete-a-topic"
» With this code you can change and delete only certain messages from chat?
» I need an administrators help please forumotion sent me a delete forum message
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum