inherit
249732
0
Sept 30, 2024 2:29:34 GMT -8
Sam
Typing...
135
October 2017
samzi
|
Post by Sam on Jun 21, 2019 8:12:29 GMT -8
Is it possible for me to use the forum variables found in the templates (things like $[board.id] ) in the component area of a plugin? If it's not is there a way around? Brian Todge I'm trying to make a plugin to only apply a code on a certain board{if $[board.id] == "$[plugin.settings.theme_name.board_search]"} <style> $[plugin.settings.theme_name.board_css] </style> {/if}
But there's also another thing. No matter what board I'm on and I just display $[plugin.settings.theme_name.board_search] it only returns a value of '1' even on the home page.
|
|
#eb7100
33409
0
1
Nov 23, 2024 16:57:32 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jun 21, 2019 9:42:26 GMT -8
This isn't possible.
Just like how you can only use template variables in certain templates, plugin variables are only applicable to the HTML components of that particular plugin.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 21, 2019 11:13:33 GMT -8
The plugin system also has a built-in process for having it run on individual boards If you place your code in a board component ...
then when configuring the plugin you also get to choose which board the component runs on
|
|