JoshyPHP
Well-known member
I'm currently looking into upgrading my media sites add-on for XenForo 2.0. The add-on contains many definitions and lets the user select which ones should be installed. It means that media sites should be filtered during install/upgrade, and should be reinstalled whenever that selection changes.
In XenForo 1.x, the XML for the media sites can be accessed during install via
So far, I have found that the add-on's
Any information is welcome, thanks in advance.
In XenForo 1.x, the XML for the media sites can be accessed during install via
$addon->bb_code_media_sites
, and media sites can be reinstalled using XenForo_Model_BbCode
's importBbCodeMediaSitesAddOnXml()
and rebuildBbCodeCache()
. What would be the correct way to do that in XenForo 2.0?So far, I have found that the add-on's
bb_code_media_sites.xml
file can be modified during the installation but that's hacky and it assumes the add-on can write to the filesystem. I see that there is a rebuildBbCodeMediaSiteCache()
accessible via $this->app->repository('XF:BbCodeMediaSite')
but I haven't been able to ascertain this works as expected yet.Any information is welcome, thanks in advance.