Using variables in templates?

Go down

Solved Using variables in templates?

Post by FrozenX on Sat 29 Oct - 9:28:08

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?

avatar
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- on Sat 29 Oct - 9:47:08

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

Male Posts : 2423
Reputation : 303
Language : Tagalog, English
Location : Philippines

Back to top Go down

Solved Re: Using variables in templates?

Post by FrozenX on Sat 29 Oct - 10:28:54

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 }
avatar
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 on Sat 29 Oct - 15:47:50

I think that forumotion removed those codes.
avatar
Mike
Hyperactive

Male Posts : 4251
Reputation : 468
Language : English, HTML, CSS
Location : Loveland, Colorado

Back to top Go down

Solved Re: Using variables in templates?

Post by Nera. on Sat 29 Oct - 22:53:15

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.



avatar
Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

Solved Re: Using variables in templates?

Post by FrozenX on Sun 30 Oct - 12:43:59

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

Code:
{LOGGED_AS}
avatar
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. on Sun 30 Oct - 17:41:14

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

Welcome.

Lock
avatar
Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

Back to top


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