• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Listen(er) and store - Option ID

#1
Hi,

I've been reading what feels like a hundred threads on storing global values, all of them pre-defined in php files, and making them available elsewhere
in xenforo but what i really want is to be able to listen for say option id's and store their values for use elsewhere.

Im not looking for people to do the work for me, just want someones opinion where to start rather than picking up bad habbits.

I have created an addon with a listener, created a folder structure that stores a value on a tutorial on this site but thats as far as i've got.
A few tutorials here and there, but very much a beginner.

Any advice would be awesome,
James.
 
#3
Sorry for not being more specific.

I've been trying to create a few widgets which display raw html in a block, i have taken apart some examples and can do that now fairly easily.
Control panel side, the admin can set a value for an option id and thats all it does... sets a value against that option id.
Now, what i have been looking for is to call that value in that html... Sorry for being an inquisitive novice.

:)

Thanks for your suggestion above.
 

batpool52!

Well-known member
#4
By "in html" do you mean inside template? If so you can do that using
PHP:
{$xenOptions.option_id}
that would return the option value in html.