inherit
142728
0
Aug 28, 2014 23:20:11 GMT -8
cheveyo
61
July 2009
cheveyo
|
Post by cheveyo on Dec 1, 2012 22:33:12 GMT -8
Is it possible to create a new variable in the same language used in the Layout Templates? For, say, a new mini profile line where $[x] = $[user.posts]*2
EDIT: shoot me if this is super easy/impossible/already addressed somewhere
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Dec 2, 2012 11:06:04 GMT -8
Probably something easy yes.
var postcount = parseInt($[user.posts]*2);
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Dec 2, 2012 12:11:58 GMT -8
Probably something easy yes. var postcount = parseInt($[user.posts]*2);
That wouldn't work in the layout templates themselves. You'd need to have that in a bit of Javascript with <script> tags and then do something to get that new value put back in where you wanted it (maybe a specific class on some placeholder <span> tags etc). But at that point you're just back to V4's "use Javascript to rename things" way of working. I don't think there is a way to make new variables for the layout templates. Possibly of interest: some related questions I've asked about the template variables.
|
|
inherit
142728
0
Aug 28, 2014 23:20:11 GMT -8
cheveyo
61
July 2009
cheveyo
|
Post by cheveyo on Dec 2, 2012 23:56:36 GMT -8
Well, if javascript is the only way to do it, looks like I'll have to learn it. xD
Thanks muchly, you two ^_^
|
|