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.

Using variables in templates?

View previous topic View next topic Go down

Solved Using variables in templates?

Post by FrozenX on 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?


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 Darkel on October 29th 2011, 9:47 am

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

Darkel
Hyperactive

Male Posts : 2186
Reputation : 272
Language : English, Tagalog
Location : Philippines

Back to top Go down

Solved Re: Using variables in templates?

Post by FrozenX on 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 }

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 October 29th 2011, 3:47 pm

I think that forumotion removed those codes.

Mike
Hyperactive

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Solved Re: Using variables in templates?

Post by Nera. on 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.




Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: Using variables in templates?

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

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

Code:
{LOGGED_AS}

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 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

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

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