The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

What is the coding for editing a link in the navigational bar?

View previous topic View next topic Go down

Solved What is the coding for editing a link in the navigational bar?

Post by Doktoroktopus on February 25th 2013, 3:29 am

http://imageshack.us/photo/my-images/209/club1kjhomessagelinks.jpg

We just want to find a way to edit this because it's way too long...

Also, if someone knows how to change the colour, I'd love to know what the coding for that is too... just want to turn it from grey to black.

Doktoroktopus
Forumember

Posts : 81
Reputation : 1
Language : English

http://www.club1kjho.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by Cassius Dio on February 25th 2013, 3:14 pm

Hi! Very Happy

You can change the color of navigation bar text, adding in CSS Stylesheet this code:
Code:
a.mainmenu{
color: black !important;
}

For editing the links from menu, add in JavaScript codes management:
Code:
$(document).ready(function(){
$('a.mainmenu:contains("No private messages")').text("You have no PM");
});

For editing other link just add before }); this code:
Code:
$('a.mainmenu:contains("Old text")').text("New text");
Just change Old text and New text with the text you need.

Cassius Dio
Forumember

Male Posts : 581
Reputation : 79
Language : Romanian &English
Location : Yellow Submarine

http://beatles.forummo.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by Doktoroktopus on February 26th 2013, 3:54 am

Hey!

Very Happy

I've never used Javascript before. I created a new script and put the code in there and saved, and it was all good but the change wasn't made on the front page of my site, where I wanted it. I checked the box that said 'front page'.

Any ideas?

Doktoroktopus
Forumember

Posts : 81
Reputation : 1
Language : English

http://www.club1kjho.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by SLGray on February 26th 2013, 4:48 am

Did you activate JavaScript Management? It is above where it list the JavaScript codes you have created.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by Doktoroktopus on February 26th 2013, 5:12 am

@SLGray wrote:Did you activate JavaScript Management? It is above where it list the JavaScript codes you have created.

http://imageshack.us/photo/my-images/850/screencapjavascript.jpg/

EDIT: Yes, I did activate JavaScript Management. I thought it showed it in the cap.

Yes, I'm so sorry if this is tedious. This is a screen cap of the Javascript page. Am I doing something wrong?

I'm willing to give someone admin status on our forum if anyone is willing to check it themselves :/

Doktoroktopus
Forumember

Posts : 81
Reputation : 1
Language : English

http://www.club1kjho.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by runawayhorses on February 26th 2013, 5:20 am

That screenshot is not the page to turn it on, go to the page before that, go to AP>>Modules>>Javascript management>>

On that page near the top find "Enable Javascript code management" and select "Yes" and save your settings.

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by Doktoroktopus on February 26th 2013, 5:25 am

Yeah sorry, I edited my post to mention that I realized the screen cap didn't show it, but I did in fact turn on Javascript in the previous page.

Doktoroktopus
Forumember

Posts : 81
Reputation : 1
Language : English

http://www.club1kjho.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by SLGray on February 26th 2013, 5:33 am

Exactly it should be in all pages, not the homepage.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by Doktoroktopus on February 26th 2013, 5:37 am

@SLGray wrote:Exactly it should be in all pages, not the homepage.

I selected "all pages," as you can see from the screen cap.

Code:
$(document).ready(function(){
    $('a.mainmenu:contains("No private messages")').text("No Messages");
    });

Is this the right code? Did I do something wrong?

Doktoroktopus
Forumember

Posts : 81
Reputation : 1
Language : English

http://www.club1kjho.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by SLGray on February 26th 2013, 5:42 am

Try this one:
Code:
$(function() {
document.getElementById('i_icon_mini_menuhere').nextSibling.nodeValue='New name';
});
i_icon_mini_menuhere - you need to get the one for pm

New name - the name you want


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by Doktoroktopus on February 26th 2013, 6:27 am

Nothing yet... I updated the code and copy and pasted it directly, and adjusted New Name, and put in the url for the image.

Doktoroktopus
Forumember

Posts : 81
Reputation : 1
Language : English

http://www.club1kjho.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by SLGray on February 26th 2013, 6:28 am

Please post your forum's address.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by Doktoroktopus on February 26th 2013, 6:29 am

@SLGray wrote:Please post your forum's address.

http://www.club1kjho.com/

Right, I should put this in my signature... Would you like admin access?

Doktoroktopus
Forumember

Posts : 81
Reputation : 1
Language : English

http://www.club1kjho.com/

Back to top Go down

Solved Re: What is the coding for editing a link in the navigational bar?

Post by SLGray on February 26th 2013, 6:31 am

I will need a test account to log in. Please send it in a private message.

Edit:
After using the test account, I figured out that the wrong code was being used. The image URL was being used instead of i_icon_mini_message.
Topic Solved & Locked


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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