Using variables in templates? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
4 posters

    Using variables in templates?

    FrozenX
    FrozenX
    Forumember


    Male Posts : 69
    Reputation : 8
    Language : English, Dutch

    Solved Using variables in templates?

    Post by FrozenX October 29th 2011, 9:28 am

    On PunBB, what code is it, so that i can add,
    Code:
    Welcome { USERNAME }

    I know that
    Code:
    { USERNAME }
    works, but i doesn't work outside, the posts... e.g. in the overall_Header, it didnt seem to be working.

    any suggestions, on what it could be?

    Stephen-
    Stephen-
    Hyperactive


    Male Posts : 2542
    Reputation : 326
    Language :

    Solved Re: Using variables in templates?

    Post by Stephen- October 29th 2011, 9:47 am

    i have notice that the code
    Code:
    { USERNAME }
    has a space try it without space ... Wink
    FrozenX
    FrozenX
    Forumember


    Male Posts : 69
    Reputation : 8
    Language : English, Dutch

    Solved Re: Using variables in templates?

    Post by FrozenX October 29th 2011, 10:28 am

    I know that, but in this forums if i remove the sapce it does this:

    Code:
    Using php in posts is called being a smart [Language]... Stop it

    thats why to show the code i did it like this:

    Code:
    { USERNAME }
    Mike
    Mike
    Hyperactive


    Male Posts : 4255
    Reputation : 471
    Language : English, HTML, CSS
    Location : Loveland, Colorado

    Solved Re: Using variables in templates?

    Post by Mike October 29th 2011, 3:47 pm

    I think that forumotion removed those codes.
    Nera.
    Nera.
    Energetic


    Female Posts : 7078
    Reputation : 2017
    Language : English
    Location : -

    Solved Re: Using variables in templates?

    Post by Nera. October 29th 2011, 10:53 pm

    Hi,

    They are not removed. They have never worked in templates.

    For the space that you must add to write it here it's cause those variables have been censored on the support forum.

    If you want them to work in templates you can use Etanas tut from the French forum.
    http://forum.forumactif.com/t260631-astuce-utiliser-les-variables-user-et-forum-autre

    All you need to do is take the script showed there http://tinyurl.com/var-fa and add it to your JS managment. Mark all pages.

    Than you can use the variables she listed in the tutorial and they will work like the default ones forumotion offers.



    FrozenX
    FrozenX
    Forumember


    Male Posts : 69
    Reputation : 8
    Language : English, Dutch

    Solved Re: Using variables in templates?

    Post by FrozenX October 30th 2011, 12:43 pm

    Thanks, solved + i also found out that {LOGGED_AS} works. Smile

    Code:
    {LOGGED_AS}
    Nera.
    Nera.
    Energetic


    Female Posts : 7078
    Reputation : 2017
    Language : English
    Location : -

    Solved Re: Using variables in templates?

    Post by Nera. October 30th 2011, 5:41 pm

    It works if you use it in templates since it's the templates variable (the one that's already there).

    Welcome.

    Lock