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.

Renaming Portal & Home

4 posters

Go down

Solved Renaming Portal & Home

Post by Sir Chivas™ Thu 4 May 2023 - 0: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 Thu 4 May 2023 - 0:53; edited 2 times in total
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Ape Thu 4 May 2023 - 0: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
Ape
Ape
Administrator
Administrator

Male Posts : 19358
Reputation : 2006
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Renaming Portal & Home

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

Fixed. Sorry about that.
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Niko Thu 4 May 2023 - 0: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;
}
Niko
Niko
Helper
Helper

Male Posts : 3243
Reputation : 251
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Sir Chivas™ likes this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Ape Thu 4 May 2023 - 1: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
Ape
Ape
Administrator
Administrator

Male Posts : 19358
Reputation : 2006
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Sir Chivas™ likes this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Sir Chivas™ Thu 4 May 2023 - 1: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 Thu 4 May 2023 - 1:13; edited 2 times in total
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Niko Thu 4 May 2023 - 1: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:
Niko
Niko
Helper
Helper

Male Posts : 3243
Reputation : 251
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

TonnyKamper likes this post

Back to top Go down

Solved Re: Renaming Portal & Home

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

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


Last edited by Sir Chivas™ on Thu 4 May 2023 - 1:26; edited 1 time in total
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Niko Thu 4 May 2023 - 1: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);
});});
Niko
Niko
Helper
Helper

Male Posts : 3243
Reputation : 251
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Sir Chivas™ and TonnyKamper like this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Ape Thu 4 May 2023 - 1: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
Ape
Ape
Administrator
Administrator

Male Posts : 19358
Reputation : 2006
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Sir Chivas™, Niko and TonnyKamper like this post

Back to top Go down

Solved Re: Renaming Portal & Home

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

None of these are changing the titles of either the Home or Portal.
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Niko Thu 4 May 2023 - 1: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
Niko
Niko
Helper
Helper

Male Posts : 3243
Reputation : 251
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Ape and TonnyKamper like this post

Back to top Go down

Solved Re: Renaming Portal & Home

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

I sent you the details, thanks Niko.
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Niko and TonnyKamper like this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Niko Thu 4 May 2023 - 1: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
Niko
Niko
Helper
Helper

Male Posts : 3243
Reputation : 251
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

TonnyKamper likes this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Sir Chivas™ Thu 4 May 2023 - 1: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.
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Niko likes this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Niko Thu 4 May 2023 - 1:39

You are welcome 1st
Niko
Niko
Helper
Helper

Male Posts : 3243
Reputation : 251
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Sir Chivas™ likes this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Sir Chivas™ Thu 4 May 2023 - 1: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 ?
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Back to top Go down

Solved Re: Renaming Portal & Home

Post by Niko Thu 4 May 2023 - 2: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
Niko
Niko
Helper
Helper

Male Posts : 3243
Reputation : 251
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Ape, Sir Chivas™ and TonnyKamper like this post

Back to top Go down

Solved Re: Renaming Portal & Home

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

Many thanks, Niko. I appreciate it. Renaming Portal & Home 1f600
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Niko likes this post

Back to top Go down

Solved Re: Renaming Portal & Home

Post by skouliki Thu 4 May 2023 - 7:31

is this now solved?
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Renaming Portal & Home

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

Yes.
Sir Chivas™
Sir Chivas™
Helper
Helper

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

https://aforums.org

Back to top Go down

Solved Re: Renaming Portal & Home

Post by skouliki Thu 4 May 2023 - 7:35

thanks @Niko

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

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

http://iconskouliki.forumgreek.com

Niko likes this post

Back to top Go down

Back to top

- Similar topics

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