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.

Using variables in templates?

4 posters

Go down

Solved Using variables in templates?

Post by FrozenX Sat 29 Oct - 10:28

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?

FrozenX
FrozenX
Forumember

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

http://www.lordslegends.forumotion.net

Back to top Go down

Solved Re: Using variables in templates?

Post by Stephen- Sat 29 Oct - 10:47

i have notice that the code
Code:
{ USERNAME }
has a space try it without space ... Wink
Stephen-
Stephen-
Hyperactive

Male Posts : 2542
Reputation : 326
Language :

Back to top Go down

Solved Re: Using variables in templates?

Post by FrozenX Sat 29 Oct - 11:28

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 }
FrozenX
FrozenX
Forumember

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

http://www.lordslegends.forumotion.net

Back to top Go down

Solved Re: Using variables in templates?

Post by Mike Sat 29 Oct - 16:47

I think that forumotion removed those codes.
Mike
Mike
Hyperactive

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

Back to top Go down

Solved Re: Using variables in templates?

Post by Nera. Sat 29 Oct - 23:53

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.



Nera.
Nera.
Energetic

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

Back to top Go down

Solved Re: Using variables in templates?

Post by FrozenX Sun 30 Oct - 13:43

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

Code:
{LOGGED_AS}
FrozenX
FrozenX
Forumember

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

http://www.lordslegends.forumotion.net

Back to top Go down

Solved Re: Using variables in templates?

Post by Nera. Sun 30 Oct - 18:41

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

Welcome.

Lock
Nera.
Nera.
Energetic

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

Back to top Go down

Back to top


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