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
4 posters

    Renaming Portal & Home

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 18:24

    Hi, I want to rename the home and portal titles.

    Currently using this code which works for the others but not for those two.

    Code:
    a.mainmenu[href^="/forum"] { font-size:0 !important; }
    a.mainmenu[href^="/forum"]:after {
      content:"Forum";
      font-size:12px !important;
    }

    It disappears for home. Doesn't even work for Portal. I've tried "http://sirchivas.forumotion/" "/portal" blackeye Hem


    Renaming Portal & Home Screen24

    URL: https://sirchivas.forumotion.com/



    So I may see one issue, it has the sticky when scrolling just like the toolbar, the "Forum" does appear there.


    Last edited by Sir Chivas™ on Wed 3 May 2023 - 18:53; edited 2 times in total
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Renaming Portal & Home

    Post by Ape Wed 3 May 2023 - 18:52

    Your forum link don't work/



    Renaming Portal & Home Left1212Renaming Portal & Home Center11Renaming Portal & Home Right112
    Renaming Portal & Home Ape_b110
    Renaming Portal & Home Ape1010
    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 18:53

    Fixed. Sorry about that.
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3231
    Reputation : 248
    Language : English, Italian, French
    Location : Italy

    Solved Re: Renaming Portal & Home

    Post by Niko Wed 3 May 2023 - 18:59

    Coucou @"Sir Chivas™"

    you may try with javascript, it is easier Wink
    Code:
    $(function() {
    var replaced = $('a.mainmenu.fa_navactif[href="/"]').html().replace(/Portal/g,'New Portal title');
    $('a.mainmenu.fa_navactif[href="/"]').html(replaced);

    var replaced = $('a.mainmenu[href="/forum"]').html().replace(/Forum/g,'New Forum title');
    $('a.mainmenu[href="/forum"]').html(replaced);
    });

    with CSS you are having problems because of this CSS code:
    Code:
    #navbar .mainmenu:after, #tabs a:after {
        content: ".";
        font-size: 0;
        height: 5px;
        position: absolute;
        bottom: -5px;
        left: 0;
        right: 0;
        transition: bottom 250ms;
    }

    Sir Chivas™ likes this post

    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Renaming Portal & Home

    Post by Ape Wed 3 May 2023 - 19:00

    Try this Wink
    Code:
    a.mainmenu fa_navactif[href^="/"] { font-size:0 !important; }
    a.mainmenu fa_navactif[href^="/"]:after {
    content:"Home" !important;
    font-size:12px !important;
    }



    Renaming Portal & Home Left1212Renaming Portal & Home Center11Renaming Portal & Home Right112
    Renaming Portal & Home Ape_b110
    Renaming Portal & Home Ape1010

    Sir Chivas™ likes this post

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 19:09

    Niko wrote:Coucou @"Sir Chivas™"

    you may try with javascript, it is easier Wink
    Code:
    $(function() {
    var replaced = $('a.mainmenu.fa_navactif[href="/"]').html().replace(/Portal/g,'New Portal title');
    $('a.mainmenu.fa_navactif[href="/"]').html(replaced);

    var replaced = $('a.mainmenu[href="/forum"]').html().replace(/Forum/g,'New Forum title');
    $('a.mainmenu[href="/forum"]').html(replaced);
    });

    with CSS you are having problems because of this CSS code:
    Code:
    #navbar .mainmenu:after, #tabs a:after {
        content: ".";
        font-size: 0;
        height: 5px;
        position: absolute;
        bottom: -5px;
        left: 0;
        right: 0;
        transition: bottom 250ms;
    }

    Ape wrote:Try this Wink
    Code:
    a.mainmenu fa_navactif[href^="/"] { font-size:0 !important; }
    a.mainmenu fa_navactif[href^="/"]:after {
    content:"Home" !important;
    font-size:12px !important;
    }

    Its now showing on the fixed navigation bar. But portal didn't change.
    Unfortunately both of these didn't work. If you need a test account let me know and I'll provide one.


    Last edited by Sir Chivas™ on Wed 3 May 2023 - 19:13; edited 2 times in total
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3231
    Reputation : 248
    Language : English, Italian, French
    Location : Italy

    Solved Re: Renaming Portal & Home

    Post by Niko Wed 3 May 2023 - 19:10

    @"Sir Chivas™" , I don't know if I'm allowed from the rules of this support forum (@Ape ? )

    If I am, it would be helpful, yes!

    My test preview:

    TonnyKamper likes this post

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 19:17

    It's placed, but it's not appearing like your screenshot. I still have "Home" & "Portal"


    Last edited by Sir Chivas™ on Wed 3 May 2023 - 19:26; edited 1 time in total
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3231
    Reputation : 248
    Language : English, Italian, French
    Location : Italy

    Solved Re: Renaming Portal & Home

    Post by Niko Wed 3 May 2023 - 19:18

    Give a try with these:

    new test with this
    Code:
    var replaced = $('a.mainmenu[href="/"]').html().replace(/Portal/g,'New Portal title');
    $('a.mainmenu[href="/"]').html(replaced);
     
    var replaced = $('a.mainmenu[href="/forum"]').html().replace(/Home/g,'New Forum title');
    $('a.mainmenu[href="/forum"]').html(replaced);

    or with:
    Code:
    $(function() {
    var replaced = $('a.mainmenu[href="/"]').html().replace(/Portal/g,'New Portal title');
    $('a.mainmenu[href="/"]').html(replaced);
     
    var replaced = $('a.mainmenu[href="/forum"]').html().replace(/Home/g,'New Forum title');
    $('a.mainmenu[href="/forum"]').html(replaced);
    });

    or with:
    Code:
    $(function() {$(function() {
    var replaced = $('a.mainmenu[href="/"]').html().replace(/Portal/g,'New Portal title');
    $('a.mainmenu[href="/"]').html(replaced);
     
    var replaced = $('a.mainmenu[href="/forum"]').html().replace(/Home/g,'New Forum title');
    $('a.mainmenu[href="/forum"]').html(replaced);
    });});

    Sir Chivas™ and TonnyKamper like this post

    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Renaming Portal & Home

    Post by Ape Wed 3 May 2023 - 19:22

    If the member is happy to send you a test account by PM then you can use it. Member does this at their own risk but i would say Niko is more then safe to do the work Wink



    Renaming Portal & Home Left1212Renaming Portal & Home Center11Renaming Portal & Home Right112
    Renaming Portal & Home Ape_b110
    Renaming Portal & Home Ape1010

    Sir Chivas™, Niko and TonnyKamper like this post

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 19:23

    None of these are changing the titles of either the Home or Portal.
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3231
    Reputation : 248
    Language : English, Italian, French
    Location : Italy

    Solved Re: Renaming Portal & Home

    Post by Niko Wed 3 May 2023 - 19:24

    Thanks @Ape Wink loove

    @Sir Chivas™ I saw you trying with my last three codes, but didn't work sadly.. If you can drop me a test account I will try to have a quick look Very Happy

    Ape and TonnyKamper like this post

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 19:27

    I sent you the details, thanks Niko.

    Niko and TonnyKamper like this post

    Niko
    Niko
    Helper
    Helper


    Male Posts : 3231
    Reputation : 248
    Language : English, Italian, French
    Location : Italy

    Solved Re: Renaming Portal & Home

    Post by Niko Wed 3 May 2023 - 19:33

    It is now fixed Wink
    The code used is the following:
    Code:
    $(function() {
         var replaced = $('a.mainmenu[href="/"]').html().replace(/Portal/g,'New Portal title');
       $('a.mainmenu[href="/"]').html(replaced);
     
       var replaced1 = $('a.mainmenu[href="/forum"]').html().replace(/Home/g,'New Forum title');
       $('a.mainmenu[href="/forum"]').html(replaced1);
    });

    I think the problem was in another script I corrected, that was causing a minor error.
    Due to Forumotion that compiles and joins together codes... one code's error has consequences on the other codes as well Wink

    It should be solved now, is it?

    Renaming Portal & Home Scree113

    TonnyKamper likes this post

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 19:35

    It was the "New Latest Topics," right? Yeah, it never worked for me and I forgot to remove it. Thank you once again. It works and so does the other script, many thanks.

    Niko likes this post

    Niko
    Niko
    Helper
    Helper


    Male Posts : 3231
    Reputation : 248
    Language : English, Italian, French
    Location : Italy

    Solved Re: Renaming Portal & Home

    Post by Niko Wed 3 May 2023 - 19:39

    You are welcome 1st

    Sir Chivas™ likes this post

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Wed 3 May 2023 - 19:39

    Wait
    I refreshed after renaming it and its not working again.



    Going to delete my cookies.


    It worked after deleting my browser cookies.

    Just one thing, the title that appears on the browser's tab still shows as "Portal" can we adjust it in the JavaScript ?
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3231
    Reputation : 248
    Language : English, Italian, French
    Location : Italy

    Solved Re: Renaming Portal & Home

    Post by Niko Wed 3 May 2023 - 20:09

    Add this to the code
    Code:
    if(location.href == 'https://sirchivas.forumotion.com/') { document.title = document.title.replace(/Portal/g,'Home'); }

    in your case, I was still logged in so you did it directly Wink

    Ape, Sir Chivas™ and TonnyKamper like this post

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Thu 4 May 2023 - 0:37

    Many thanks, Niko. I appreciate it. Renaming Portal & Home 1f600

    Niko likes this post

    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Renaming Portal & Home

    Post by skouliki Thu 4 May 2023 - 1:31

    is this now solved?

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: Renaming Portal & Home

    Post by Sir Chivas™ Thu 4 May 2023 - 1:34

    Yes.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Renaming Portal & Home

    Post by skouliki Thu 4 May 2023 - 1:35

    thanks @Niko

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

    Niko likes this post


      Current date/time is Sun 22 Sep 2024 - 13:30