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.

Does the "Administrator Panel"-link have a CSS-name?

5 posters

Go down

Solved Does the "Administrator Panel"-link have a CSS-name?

Post by Friendly Toucan Sat 4 Feb - 9:20

Hello,

I just added a "return to top"-button below this very link, but the space between them is too much.

If this link has a CSS-code, then I think I could fix this issue with "margin-bottom".

But if not, how can I fix this?

Thanks.
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Razor12345 Sat 4 Feb - 9:52

Code:
.copyright {
  margin-bottom: -15px;
}
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1583
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Friendly Toucan Sat 4 Feb - 10:04

Hey,

I tried that code before. Putting "-35px" moves the icon to the perfect spot. But, because regular members don't have the "admin link", this code moves the icon up too much for them.

If you go have a look, you will see that the icon is way to high up for you, even if it is in the perfect spot for me.

Any ideas?
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Razor12345 Sat 4 Feb - 10:27

Unfortunately, I can offer you only JS code. In it we check - if there is a link to the admin panel, then we add one margin, if not - another.

AP - Display - Templates - General - overall_footer_end

At the end of template, insert this code:

Code:
 <script>
  window.addEventListener('load',function() {
  let btnTop = document.querySelector('.copyright strong a');
  if (btnTop) {
  document.querySelector('.copyright').style.marginBottom = '-35px';
  } else { document.querySelector('.copyright').style.marginBottom = '-5px';
  }
  });
  </script>

In this line the parameter of margin if there is a link to the admin panel

Code:
document.querySelector('.copyright').style.marginBottom = '-35px';

In this line the parameter of margin if there is no link to the admin panel

Code:
  } else { document.querySelector('.copyright').style.marginBottom = '-5px';

The code is worked, when the page is fully loaded.
Remove the codes you inserted in the CSS.
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1583
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine

sivastar, TonnyKamper and Friendly Toucan like this post

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by YoshiGM Sat 4 Feb - 10:50

Hello.

I use this CSS in my forum to modify the Administration Panel link:

Code:
p.copyright strong a {
YOUR PROPERTIES HERE
}

YoshiGM
YoshiGM
Active Poster

Male Posts : 1562
Reputation : 146
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Friendly Toucan likes this post

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Friendly Toucan Sat 4 Feb - 11:44

Hello again,

Razor12345 wrote:The code is worked, when the page is fully loaded.
Remove the codes you inserted in the CSS.

Very, very cool. The only problem is that this only changes the icon on the main page. On all other pages it is still a bit messed up. :/ Thoughts?

YoshiGM wrote:
Code:
p.copyright strong a {
YOUR PROPERTIES HERE
}

Cool, tried this, but couldn't find any good results with it.
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by YoshiGM Sat 4 Feb - 11:54

You can tell me what do want to do with the administration panel link and i will adapt the code ^^!

YoshiGM
YoshiGM
Active Poster

Male Posts : 1562
Reputation : 146
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Razor12345 Sat 4 Feb - 11:57

Very, very cool. The only problem is that this only changes the icon on the main page. On all other pages it is still a bit messed up. :/ Thoughts?

A visual demonstration on my test forum - https://testtesttest.forumotion.me . Everything is working correctly on all pages.
I can't say anything in your case as the forum is closed for guests.

The overall_footer_end template is common to all pages on the forum. It cannot work only on the home page.

Also:

Razor12345 wrote:
The code is worked, when the page is fully loaded.
Remove the codes you inserted in the CSS.
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1583
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Friendly Toucan Sat 4 Feb - 12:57

Hey,

YoshiGM wrote:You can tell me what do want to do with the administration panel link and i will adapt the code ^^!

There is a large gap between this link and the "return to top"-button that I added below it. If you could somehow close that gap, without affecting regular members who don't see this gap because they don't have that link, then that would be cool.

Thanks.

Exclamation Edit: I just opened a new thread here:

https://help.forumotion.com/t162061-can-i-change-the-administrator-panel-link-into-my-own-custom-image

If what I'm asking for in this new thread is possible, then I will close this old thread. But if you still have a solution for this thread, I will still check it out. Exclamation


Last edited by Friendly Toucan on Sun 5 Feb - 10:52; edited 1 time in total
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by skouliki Sun 5 Feb - 8:26

if this thread then is solved please mark it as completed
skouliki
skouliki
Manager
Manager

Female Posts : 15391
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Friendly Toucan Sun 5 Feb - 11:06

skouliki wrote:if this thread then is solved please mark it as completed

Nope, that's not what I wrote. But I will make sure to mark it as such when that is the case. bye

Also, I have decided to not go for the JS way, because I don't like the look of the way it loads.

So if someone would like to try solving this, then I guess it would have to be tested on a test forum, as I somewhat mentioned in my post above.

Thanks.
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

skouliki likes this post

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Niko Sun 5 Feb - 11:11

If this code was working, we can just apply it for admins-only, it that was the problem

Razor12345 wrote:
Code:
.copyright {
  margin-bottom: -15px;
}

Javascript:
Code:
$(function() {
    if(_userdata["user_level"] == 1) {
        $('head').append('<style>.copyright { margin-bottom: -15px; }</style>');
    }
});
Niko
Niko
Helper
Helper

Male Posts : 3286
Reputation : 254
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

sivastar and Friendly Toucan like this post

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by Friendly Toucan Sun 5 Feb - 17:10

This problem is now solved, and I'm marking it as such.

Thanks for all the help!
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Niko likes this post

Back to top Go down

Solved Re: Does the "Administrator Panel"-link have a CSS-name?

Post by skouliki Sun 5 Feb - 17:12

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

Female Posts : 15391
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

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