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.

Change Variable Text

View previous topic View next topic Go down

Solved Change Variable Text

Post by !_NICK_! on Sun Apr 22 2012, 04:34

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_!
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 on Sun Apr 22 2012, 05:48

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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! on Sun Apr 22 2012, 07:35

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_!
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 on Sun Apr 22 2012, 16:19

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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! on Sun Apr 22 2012, 20:51

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_!
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 on Sun Apr 22 2012, 22:54

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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Change Variable Text

Post by !_NICK_! on Mon Apr 23 2012, 00:38

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_!
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_! on Tue Apr 24 2012, 01:33

Bump!

!_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_! on Thu Apr 26 2012, 00:07

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

!_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_! on Thu Apr 26 2012, 06:05

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_!
Active Poster

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

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