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 Nov 5, 2012 15:04:33 GMT -8
I'm just wondering if it is possible to use variables from the template system in plugins? For example, the plugin I'm working on now wants the forum name to be used in the main footer part of the code so I tried using the variable available for templates: <div id="affMy">$[forum.name]</div> This didn't seem to work, however, so I've had to resort to asking the user to provide the name when they setup the plugin: <div id="affMy">$[plugin.settings.your_name]</div> Either I'm doing it wrong or it's not possible. If it's the latter, is there a better way than prompting the user to manually provide it?
|
|
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 Nov 8, 2012 9:59:04 GMT -8
Bumping this to get it noticed again. I don't want to have to resort to finding something like this using Javascript not least because, with the template access, I don't even know if what I'm looking for will be there. That's not so much a problem for something as simple as the forum name, but finding things like a board description will be fun
|
|
#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Nov 8, 2012 10:01:51 GMT -8
You can use JavaScript to access things such as the user's name. Plugins are setup such that when the settings are applied we generate the resulting HTML only once and store it on the server. Thus, it is not dynamic on every pageview. This allows us to let you run many different plugins, but the limitation is not having access to variables like that.
|
|
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 Nov 8, 2012 10:29:29 GMT -8
You can use JavaScript to access things such as the user's name. Plugins are setup such that when the settings are applied we generate the resulting HTML only once and store it on the server. Thus, it is not dynamic on every pageview. This allows us to let you run many different plugins, but the limitation is not having access to variables like that. That makes sense. I might just wait for the Developer Guides to come out and it should make more sense then Thanks for the quick answer, Patrick
|
|