Addons are hacks that other developers make to add extra functionality or enhance existing functionality of the core without requiring to do the coding for the webmaster who wants to be using it.
How to Install XenForo Add-on?
The official guide for installing add-ons is here. It has brief instructions on how to go about installing an addon. This guide is more detailed with screenshots intended for new XenForo webmasters who are just starting out with XenForo.
Components of XenForo Addons
Before we consider installing an addon, we need to understand the core components of an Addon to install it correctly on the server.
There are 2 components to an addon in XenForo.
This is where most of the code for the addon is.
If you download the zip file for any addon, it may look something like the screenshot below.
Upload folder contains all the files for the addon. These files need to be uploaded using the FTP programs to the web server.
To upload the files to the server, we will use FileZilla.
Once all the files for the addons are uploaded to the server, move on to the XML file to install the addon.
2. The Installer (XML file)
The XML file normally isn’t intended to be uploaded and must be used in the admin interface for add-on installation.
Click the Browse button and upload the XML file in the addon to complete the installation of the addon.
What is Install from file on server?
Some plugins have a very large XML file and so the XML file is within the upload folder which when uploaded can be used to install the addon.
Some examples of such add-on are the official XenGallery plugin, PostReplace Plugin, EWPorta2 Plugin etc. The XML file is inside library folder and is uploaded and you can specify the path of the uploaded file to install the addon.
For XenGallery the file path is library/XenGallery/addon-XenGallery.xml and the path can depending on the addon. If XML file is not present outside the upload folder, you can assume it is in within the upload folder and the path to the XML file will be in the ReadMe.txt or in the plugin documentation.
Most plugins that I have worked till date do not require XML file to be used from the server.
Use Addon to Install Future Addon
Using the above method install the installer addon to install, update and manage all future add-ons.
This addon can install the addon directly from a zip file and without the need to use Filezilla or can connect directly from admin control panel to XenForo.com and install the addon.
That’s not all, the best part of the addon is, it can check for addon updates and upgrade add-ons with a click of a button.
Ideally these should be the functionality of core of XenForo but nevertheless, it is available from an addon as of now. But to be able to fully use this addon, there are few prerequisites.
1. File system permission
File system permission should be set such that web process is able to copy, delete or create files from this addon. Don’t worry if this sounds too technical because normally this is how the web servers are setup.
If you happen to see an error of not able to create files, you may need to change the permission of the XenForo folder using FileZilla.
Just right click on the folder you want to change permission and click the File Permissions option.
Now change the permission to allow writable permission to the folder and make sure you recurse the same permissions to a subdirectory.
In some rare scenario, this could be a potential risk but I don’t see any risk involved in this because you anyways have a folder inside XenForo (data and internal_data folders) that have public write permission. Still, if you consider this to be a risk, ask the host to get it done.
2. ZipArchive enabled
Should have ZipArchive enabled on the server to be able to unzip the addon file and install it. If you see an error related to ZipArchive, you may need to get in touch with your host to enable it.
3. XenForo connectivity
If you wish to directly install an addon from XenForo.com, you may need to add your XenForo.com community password in the addon and need to disable two Step Verification on your XenForo account.
4. Large addons
At times some large zip files may be larger than the allowed upload limit set by PHP. If you happen to see issues related to file size limit, get in touch with your host to increase upload file size limit.