Multiple Textbox Admin Template

I want to create a custom admin template that's based upon the below option found in XenGallery by @Chris D

I need to add some additional fields to each section but I'm having trouble working out how to properly save the values and then display them. What I need is something like:

1. I've created a new admin template and added an additional field. (Just testing by adding 1 new field to begin with...) - Here.

2. I've setup a new option with a PHP Callback + Verification callback exactly how XenGallery does it. Here's the class. What do I change in the class to achieve this? I noticed that the array format is slightly different to what I need...IIRC - XenGallery has something like

array('facebook' => 'url1', 'dailymotion' => 'url2')

But I think I need something like:


Any help is much appreciated. Feel free to edit my gists.

Last edited:

Chris D

XenForo developer
Staff member
It should be do-able.

In the XFMG code you're using as an example, you should use the verifyOption method to format the input from the form how you'd like it (if necessary) before it is saved to the database and then furthermore, use the renderOption method to format it for how it should be displayed in the template.

It shouldn't be too different from the code that's already there.