inherit
193226
0
May 22, 2013 22:07:12 GMT -8
oxym0r0n
17
April 2013
oxym0r0n
|
Post by oxym0r0n on May 1, 2013 9:33:06 GMT -8
Is there a way to reference a super key from one of my plugins in templates? I want to show the value of the key on my user's profiles.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on May 3, 2013 13:14:27 GMT -8
Yes, but it's a bit complicated.
The way Peter has the monetary plugin set up is to have the admin insert a placeholder element into their layout templates, then have the plugin insert code into that placeholder when the page is loaded.
There's not much of a way to reference it by placing Javascript inside the template without breaking the page somehow due to how the AJAX loads pages in threads.
|
|
inherit
193226
0
May 22, 2013 22:07:12 GMT -8
oxym0r0n
17
April 2013
oxym0r0n
|
Post by oxym0r0n on May 4, 2013 3:01:39 GMT -8
Hmmm... okay. I'd love to see how Peter does this. It would be really helpful for the RPG mod that I'm working on.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on May 9, 2013 15:05:02 GMT -8
It's something along the lines of having this HTML in your template. Then telling some Javascript/jQuery to populate it with the appropriate data. There's a bit more to it than that, but it's still a good starting point to work with nonetheless.
|
|
inherit
193226
0
May 22, 2013 22:07:12 GMT -8
oxym0r0n
17
April 2013
oxym0r0n
|
Post by oxym0r0n on May 10, 2013 18:50:51 GMT -8
I started to do something similar to that. I've been getting the key and putting it in a variable, then printing the variable to a div.
|
|