Changing Navigation-link names with Javascript question for phpbb2
4 posters
Page 1 of 1
Changing Navigation-link names with Javascript question for phpbb2
Hi dear Forumotioners,
I am trying to rename navigationlinks, because in my language the translation made them too long/wide after a thorough search I found a script and was able to figure out how to make it work for my navbar, it helped me rename the "Je hebt geen nieuwe berichten" (You have no new messages) to a simple "Mailbox" see below code:
I want a few more links changed, so I tried to add a second JS with another link, but nothing happened, tried several other links but still nothing..
It seems like I can only add that script one time, so my question is can I add more links into that one script? And if so how can I do that?
I am trying to rename navigationlinks, because in my language the translation made them too long/wide after a thorough search I found a script and was able to figure out how to make it work for my navbar, it helped me rename the "Je hebt geen nieuwe berichten" (You have no new messages) to a simple "Mailbox" see below code:
- Code:
$(function(){
$('.bodylinewidth .bodyline > table:nth-child(2) a.mainmenu[href*="/privmsg?folder=inbox"]').html('Mailbox');
});
I want a few more links changed, so I tried to add a second JS with another link, but nothing happened, tried several other links but still nothing..
It seems like I can only add that script one time, so my question is can I add more links into that one script? And if so how can I do that?
Re: Changing Navigation-link names with Javascript question for phpbb2
Try adding a coma before the semicolon and add the links you want. Just make sure to add a coma between each link code, but not the last one.


Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Changing Navigation-link names with Javascript question for phpbb2
SLGray wrote:Try adding a coma before the semicolon and add the links you want. Just make sure to add a coma between each link code, but not the last one.
Thank you @SLGray On the risk of sounding foolish what's a semicolon exactly? is it : or ; ? because I'm not sure where to put that coma..

Re: Changing Navigation-link names with Javascript question for phpbb2
Semicolon = ;


Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Changing Navigation-link names with Javascript question for phpbb2
SLGray wrote:Semicolon = ;
Ah thank you very much @SLGray would it look something like this then?
- Code:
$(function(){
$('.bodylinewidth .bodyline > table:nth-child(2) a.mainmenu[href*="/privmsg?folder=inbox"]').html('Mailbox'),;
a.mainmenu[href*="/memberlist"]').html('Leden'),;
a.mainmenu[href*="/groups"]').html('Groepen');
});
Re: Changing Navigation-link names with Javascript question for phpbb2
- Code:
$(function(){
$('.bodylinewidth .bodyline > table:nth-child(2) a.mainmenu[href*="/privmsg?folder=inbox"]').html('Mailbox'),
[href*="/memberlist"]').html('Leden'),
[href*="/groups"]').html('Groepen');
});


Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Changing Navigation-link names with Javascript question for phpbb2
SLGray wrote:
- Code:
$(function(){
$('.bodylinewidth .bodyline > table:nth-child(2) a.mainmenu[href*="/privmsg?folder=inbox"]').html('Mailbox'),
[href*="/memberlist"]').html('Leden'),
[href*="/groups"]').html('Groepen');
});
Thank you very much @SLGray but it did nothing, it even changed the first link back to what it was before..

Re: Changing Navigation-link names with Javascript question for phpbb2
- Code:
$(function(){
$('.bodylinewidth .bodyline > table:nth-child(2) a.mainmenu[href*="/privmsg?folder=inbox"]').html('Mailbox'),
$('a[href*="/memberlist"]').html('Leden');
$('a[href*="/groups"]').html('Groepen');
});
Re: Changing Navigation-link names with Javascript question for phpbb2
_Twisted_Mods_ wrote:
- Code:
$(function(){
$('.bodylinewidth .bodyline > table:nth-child(2) a.mainmenu[href*="/privmsg?folder=inbox"]').html('Mailbox'),
$('a[href*="/memberlist"]').html('Leden');
$('a[href*="/groups"]').html('Groepen');
});
Wow @_Twisted_Mods_ that worked like a charm, just awesome !



Thank you so much for your help and time

Re: Changing Navigation-link names with Javascript question for phpbb2
Problem solved & topic archived.
|

» Changing Nav Link Names?
» Changing the Default Navigation Bar Links/Names
» HELP IN CHANGING FORUM VERSION TO phpBB2 and link problem
» a question on changing the version phpbb2 to phpbb3
» Question about viewtopic_body templates in phpbb2 - username as link to profile
» Changing the Default Navigation Bar Links/Names
» HELP IN CHANGING FORUM VERSION TO phpBB2 and link problem
» a question on changing the version phpbb2 to phpbb3
» Question about viewtopic_body templates in phpbb2 - username as link to profile
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum