Can someone post a guide on how to create a template modification with tms?
It's surprisingly simple!
All you need to do is:
1) Have a server on which you can enable debug mode in your config.php
2) Create an add-on (Development tab is available in Admin CP once Debug mode is on)
3) When you create your Template Modification, ensure "Master Style" is selected and from the drop down list labelled Add-On select your newly created Add-On.
4) Finish creating your modifications ensuring for each one it is in the Master Style and your Add On is selected.
5) Once finished, go to your list of Installed Add Ons, find your own, click the drop down and select Export.
The XML file that downloads now contains all the information about your Template Modifications. If you package that up along with any other files (you might have some images or javascript, put these in their own folder in styles for images and js for javascript) you can then upload the whole lot to the Resource Manager.
Once downloaded, a user will just go to their Admin CP and Install Add On with your XML file and as long as they have the TMS add-on the template modifications will be available.
The template modifications you have done so far have been great. The TMS is a great way to make things easier for people.
You also have to bear in mind that manual template edits can sometimes be a bad thing. If you go into a template and manually add something, you have to think about what might happen if that template is updated in a subsequent version of XenForo. What happens is, the template becomes "Outdated". It becomes Outdated because XenForo knows you've changed it and wouldn't want to delete changes you've made to it. This means you're left with a template that has your changes in it, but has no new changes added by the developers. That means you then have to go through and work out what the devs have changed vs what you have changed and almost start again.
The TMS alleviates this issue... Sort of. The templates are never directly modified and so will be happily updated in subsequent versions of XenForo automatically. But as the TMS is a search and replace system - what happens if the thing you're searching for is removed in the new version or has changed? Well your Template Modification stops working and you will then need to work out why and update it to work with the new code.
So then there's the third option: Proper add on with template hooks. This allows you to inject a new template you've created into an existing one. I would strongly recommend looking at doing this as well. There's guides all over this forum about it. It's quite daunting at first because all of a sudden you're creating PHP files and you feel completely out of your depth. But actually it's quite straight forward once you've done it a few times. The downside to this option, aside from getting your hands dirty in PHP, is there isn't a template hook for everything. But the good news is, if a subsequent version of XenForo updates the template you're hooking in to, it is more likely to merge the changes better than the other two options.
Wow... I didn't intend this to be so long...
tl;dr: Avoid direct template edits. TMS is definitely better. Also consider a traditional add-on with template hooks.
