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.
The forum of the forums
2 posters

    Change Variable Text

    !_NICK_!
    !_NICK_!
    Active Poster


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

    Solved Change Variable Text

    Post by !_NICK_! Sun 22 Apr - 4: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.
    LGforum
    LGforum
    Hyperactive


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

    Solved Re: Change Variable Text

    Post by LGforum Sun 22 Apr - 5: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>
    !_NICK_!
    !_NICK_!
    Active Poster


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

    Solved Re: Change Variable Text

    Post by !_NICK_! Sun 22 Apr - 7: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.
    LGforum
    LGforum
    Hyperactive


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

    Solved Re: Change Variable Text

    Post by LGforum Sun 22 Apr - 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
    !_NICK_!
    !_NICK_!
    Active Poster


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

    Solved Re: Change Variable Text

    Post by !_NICK_! Sun 22 Apr - 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?
    LGforum
    LGforum
    Hyperactive


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

    Solved Re: Change Variable Text

    Post by LGforum Sun 22 Apr - 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.
    !_NICK_!
    !_NICK_!
    Active Poster


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

    Solved Re: Change Variable Text

    Post by !_NICK_! Mon 23 Apr - 0: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_!
    !_NICK_!
    Active Poster


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

    Solved Re: Change Variable Text

    Post by !_NICK_! Tue 24 Apr - 1:33

    Bump!
    !_NICK_!
    !_NICK_!
    Active Poster


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

    Solved Re: Change Variable Text

    Post by !_NICK_! Thu 26 Apr - 0:07

    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.

    Solved Re: Change Variable Text

    Post by !_NICK_! Thu 26 Apr - 6: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?

      Current date/time is Sun 22 Sep - 16:24