The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Allow only Administrators to delete a topic (Change the code)

5 posters

Go down

Solved Allow only Administrators to delete a topic (Change the code)

Post by smurfavr February 29th 2020, 12:26 pm

@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
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by TheCrow February 29th 2020, 1:03 pm

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.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by smurfavr February 29th 2020, 1:31 pm

I want these two moderator buttons not to be able to use them.

Allow only Administrators to delete a topic (Change the code) I10Nnri
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by Neptune- February 29th 2020, 3:56 pm

Hello smurfavr


For IP button
-> ACP > Users & groups > Special rights > Special rights
-> Users IP display : Choose Administrators and save
Neptune-
Neptune-
Forumember

Female Posts : 496
Reputation : 104
Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
Location : Scotland, UK

https://www.galaxie-series.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by smurfavr February 29th 2020, 4:32 pm

Thank you @Neptune-

Only, the button not allow the moderator to use the button, change this post
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by SLGray February 29th 2020, 8:08 pm

So you want moderators to see the IP button, but can not use it?


Allow only Administrators to delete a topic (Change the code) Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by smurfavr February 29th 2020, 9:51 pm

@SLGray I wanted the moderators to not use the IP button. Neptune- Solve the problem.

Remained to solve the button problem, changed this post.
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by SLGray February 29th 2020, 10:27 pm

Change the button?


Allow only Administrators to delete a topic (Change the code) Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by smurfavr March 1st 2020, 10:39 am

The moderator should not have access to the button that can change the post.
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by SarkZKalie March 1st 2020, 8:32 pm

You mean the "Modify" button


Allow only Administrators to delete a topic (Change the code) Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1418
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by TheCrow March 1st 2020, 9:18 pm

@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.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by SLGray March 1st 2020, 9:20 pm

Clicking the IP button does not change the post.


Allow only Administrators to delete a topic (Change the code) Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by smurfavr March 1st 2020, 11:31 pm

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).

SarkZKalie wrote:You mean the "Modify" button
Yes.
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by TheCrow March 2nd 2020, 5:51 am

Hello again @smurfavr,

Do you mean the Edit button?
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by smurfavr March 2nd 2020, 11:10 am

TheCrow wrote:Hello again @smurfavr,

Do you mean the Edit button?

Yes.
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by TheCrow March 2nd 2020, 1:42 pm

@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.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by smurfavr March 2nd 2020, 2:28 pm

Thank you all. Resolved.
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Allow only Administrators to delete a topic (Change the code)

Post by TheCrow March 2nd 2020, 3:58 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum