Calling custom options?


Well-known member
Anyone worked out how to use custom created options for an addon inside your main addon class yet?

bit stuck!

I've worked out that standard options for XenForo_Application are called as follows, but cant figure out custom ones:

$options = XenForo_Application::get('options');
EDIT: Scrap that - they are stored in the default array! Man I need to sleep! :D

Edit2: wont let me use the options in a custom addon :/ I just get this:

Fatal error: Cannot use object of type XenForo_Options as array


Well-known member
Right. Ignore me - got it sorted.

For anyone looking to use custom (or standard) options in their addons, you call them like so:

$rating_forum = XenForo_Application::get('options')->ratingforum_id;
Where 'ratingforum_id' is the unique ID you assigned the option when creating it.