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.

Change Variable Text

2 posters

Go down

Solved Change Variable Text

Post by !_NICK_! April 22nd 2012, 3:34 am

I've spent about 2 hours looking for this and nothing.

I want to know how to change Log out [ !_NICK_! ] to just Log out.

I also want to change the text of some variables. Like the variable text is, "Your last visit was on Sat Apr 21, 2012 12:15 pm". I want to change it to, "Last Visit: Sat Apr 21, 2012 12:15 pm".

I hope you'all understand, I've seen this done before.
!_NICK_!
!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Solved Re: Change Variable Text

Post by LGforum April 22nd 2012, 4:48 am

To change logout put this in an announcement or widget or somewhere:

Code:

<script>
if(document.getElementById('logout')) { document.getElementById('logout').innerHTML='Log Out'; }
</script>
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! April 22nd 2012, 6:35 am

Your the one I was looking for LGforum. Very Happy

It won't let me change the profile either. Can I have the code for that and the Logout. I want the profile button to say Settings.
!_NICK_!
!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Solved Re: Change Variable Text

Post by LGforum April 22nd 2012, 3:19 pm

This should do both of them for you:
Code:

<script>
if(document.getElementById('logout')) { document.getElementById('logout').innerHTML='Log Out';
document.getElementById('i_icon_mini_profile').nextSibling.nodeValue='Settings';
}
</script>

I always recommend putting navbar related things in an announcement block, as then the effect is instant Wink
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! April 22nd 2012, 7:51 pm

Thank you, I was including the "if" tag in it twice.

Can you help em change the part of the last visit variable?

Also, I'm having trouble hiding the groups on top. Any Ideal on how to do this?
!_NICK_!
!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Solved Re: Change Variable Text

Post by LGforum April 22nd 2012, 9:54 pm

Change it all for this:
Code:

<script>
if(document.getElementById('logout')) { document.getElementById('logout').innerHTML='Log Out';
document.getElementById('i_icon_mini_profile').nextSibling.nodeValue='Settings';
document.getElementById('i_icon_mini_groups').parentNode.parentNode.parentNode.removeChild(document.getElementById('i_icon_mini_groups').parentNode.parentNode);
}
</script>

And for the last visit text i've never looked at that bit on PunBB sorry. Hopefully someone else will help.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! April 22nd 2012, 11:38 pm

I've seen it done before, and I'm pretty sure you was the one to give it to me. 'll wait for someone else to help me with it.
!_NICK_!
!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! April 24th 2012, 12:33 am

Bump!
!_NICK_!
!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! April 25th 2012, 11:07 pm

Now how will I be able to edit anything else? For like when I want to change another variable text?
!_NICK_!
!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! April 26th 2012, 5:05 am

Well, I'd love to learn Javascript, but I'm not sure I can learn it, it's looking confusing with all the ', +, -, and all the other symbols. Any ideal on where to start for forumotion forums javascript?
!_NICK_!
!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Back to top

- Similar topics

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