This repo contains the code for a plugin that can be installed on instances of Vanilla Forum > 2.2. It's fairly simple : it allows (enforces really) the embedding of sketchfab viewers in topics or comments.
The plugin can either be built by cloning this repo and executing build.sh, or by visiting The Vanilla forums addon marketplace or the plugin page directly.
There are several limitations which resulted in the current behaviour of the plugin :
The plugin has a main .php file that describes it (its dependencies, repo, author etc.) and hooks into the rendering process of the Vanilla page to insert its own html/js/css at the relevant places. Most if not all the work is done by the js file.
At page load, two things happen :
Then, the user can click the sketchfab button and paste his model URI in the ensuing popup, which will insert the correct tag in the body of the text that's being written. This tag will be replaced by the plugin once it is posted.