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.
The forum of the forums
5 posters

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

    Friendly Toucan
    Friendly Toucan
    Forumember


    Posts : 243
    Reputation : 4
    Language : English

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

    Post by Friendly Toucan February 4th 2023, 2:20 pm

    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.
    Razor12345
    Razor12345
    Support Moderator
    Support Moderator


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

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

    Post by Razor12345 February 4th 2023, 2:52 pm

    Code:
    .copyright {
      margin-bottom: -15px;
    }
    Friendly Toucan
    Friendly Toucan
    Forumember


    Posts : 243
    Reputation : 4
    Language : English

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

    Post by Friendly Toucan February 4th 2023, 3:04 pm

    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?
    Razor12345
    Razor12345
    Support Moderator
    Support Moderator


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

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

    Post by Razor12345 February 4th 2023, 3:27 pm

    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.

    sivastar, TonnyKamper and Friendly Toucan like this post

    YoshiGM
    YoshiGM
    Active Poster


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

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

    Post by YoshiGM February 4th 2023, 3:50 pm

    Hello.

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

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

    Friendly Toucan likes this post

    Friendly Toucan
    Friendly Toucan
    Forumember


    Posts : 243
    Reputation : 4
    Language : English

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

    Post by Friendly Toucan February 4th 2023, 4:44 pm

    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.
    YoshiGM
    YoshiGM
    Active Poster


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

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

    Post by YoshiGM February 4th 2023, 4:54 pm

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

    Razor12345
    Razor12345
    Support Moderator
    Support Moderator


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

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

    Post by Razor12345 February 4th 2023, 4:57 pm

    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.
    Friendly Toucan
    Friendly Toucan
    Forumember


    Posts : 243
    Reputation : 4
    Language : English

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

    Post by Friendly Toucan February 4th 2023, 5:57 pm

    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 February 5th 2023, 3:52 pm; edited 1 time in total
    skouliki
    skouliki
    Manager
    Manager


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

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

    Post by skouliki February 5th 2023, 1:26 pm

    if this thread then is solved please mark it as completed

    Friendly Toucan
    Friendly Toucan
    Forumember


    Posts : 243
    Reputation : 4
    Language : English

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

    Post by Friendly Toucan February 5th 2023, 4:06 pm

    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.

    skouliki likes this post

    Niko
    Niko
    Helper
    Helper


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

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

    Post by Niko February 5th 2023, 4:11 pm

    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>');
        }
    });

    sivastar and Friendly Toucan like this post

    Friendly Toucan
    Friendly Toucan
    Forumember


    Posts : 243
    Reputation : 4
    Language : English

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

    Post by Friendly Toucan February 5th 2023, 10:10 pm

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

    Thanks for all the help!

    Niko likes this post

    skouliki
    skouliki
    Manager
    Manager


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

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

    Post by skouliki February 5th 2023, 10:12 pm

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


      Current date/time is November 12th 2024, 3:56 am