XF 1.2 How can I export my custom "Template Modifications" ?

In Debug mode you can create an add-on and you can assign a template modification to an add-on. Then you can export that add-on (which creates an XML).

That XML file will then be installable as an add-on elsewhere and it will install those modifications.
 
  • Like
Reactions: rdn
In Debug mode you can create an add-on and you can assign a template modification to an add-on. Then you can export that add-on (which creates an XML).

That XML file will then be installable as an add-on elsewhere and it will install those modifications.

Is there any guide here to create a basic addon just like this?
 
Just go to the Development tab > Create Add-on > Then just fill in the Add-on ID, Title, Version String and Version ID. That creates an add-on.
 
  • Like
Reactions: rdn
Oppz. I cannot assign multiple Template Modification into a single addon?
If I remember, TMS can include multiple modification on a single addon.

I got this error when adding more modification:
Code:
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT template.* FROM xf_template_map AS template_map INNER JOIN xf_t' at line 1
 
Hm. Do you still have TMS installed?

You should be able to make as many template modifications to a single add-on as you like. I've not seen this error before.

What version of XenForo 1.2 are you running?
 
Where does this data come from? Is it just made up?
Add-on IDs need to be unique so it shouldn't match one you already have installed nor should you name it something common that another developer might use or have already used, the title should be of your choosing, the version string is whatever you like; e.g. 1.0.0, version ID is just a basic number just use whatever convention you like; e.g. 1 and the rest of the fields you can most likely ignore.

How does one actually assign the modification?
In Debug Mode, a drop down list is available while creating the TM. You can select your add-on there.

Then, when the add-on is exported, the XML file will contain the TM so it can be installed as an add-on elsewhere.
 
Thanks Chris, quick answer. This support forum is awesome. If I only had a tiny percentage of the abilities around here, I'd be golden.
 
Last edited:
In Debug Mode, a drop down list is available while creating the TM. You can select your add-on there.

What about existing TMs? Any way to select an addon for them?

Question:
One thing I'd like to verify is that there is only ever one single list of template modifications, correct? So if several addons use many TMs and I have quite a few myself, the list will be massive? Is there any method for grouping (streamlining) the template modification list?
 
Back
Top Bottom