Resin 3D printing technology is awesome, but validating new materials is still a nightmare for most of us.

To help make it easier, I started Maker Trainer, an open source database for resin settings.

Settings are crowdsourced from user submissions, and anyone can contribute to this maker wiki.

Resin setting spreadsheets

If you're into resin 3D printing, you've likely already seen resin setting spreadsheets like this before. 

They’re a way for makers to share their print settings with each other. They are universally loved, because they make validating new resins much quicker and easier. 

The problem is that they are scattered all over the internet, and are hard to find. They are sometimes turned into an advertising platform or randomly deleted.

The last part is especially painful. Most recently the biggest spreadsheet, — the one for the Anycubic Photon — was unexpectedly deleted, erasing years’ worth of community effort with it.

I wanted to create a platform that could make all this more organized and secure. 

Why a wiki

I settled on a wiki structure, because I wanted anyone to be able to contribute to the database. Wikis allow such collaboration, and any mistake or vandalism is easily undone. 

Moreover, making the pages ‘articles’ instead of just spreadsheets allows for other handy tips and tricks to be present on the pages.

I used MediaWiki, as it is an awesome open source project, and one of the most well-supported wiki software out there. I wanted the site to look sleek and modern, so I used the Chameleon skin, which allows for a lot of customization.

DataTables integration for MediaWiki

A limitation of MediaWiki, is that it has very basic functionality for tables, which were going to be an integral part of the website.

For this I enlisted the help of another great open source software, DataTables. DataTables makes HTML tables a lot more functional, adding things like filtering, pagination and multi-column ordering.

Unfortunately MediaWiki doesn’t have a native extension for DataTables, but I found this implementation on Fandom.com, which was easy enough to fork by adding it to the wiki’s Common.js page.

/**
 * Name:        DataTables.js
 * Author:      KockaAdmiralac <wikia@kocka.tech>
 * Description: Loads CSS and JavaScript from https://datatables.net and
 *              initializes all tables with the `datatable` class as data tables
 */
(function($, mw) {
    'use strict';
    var initialized = false, queue = [];
    function process($content) {
        $content.find('.datatable:not(.datatable-loaded)').each(function() {
            var $table = $(this).addClass('datatable-loaded'),
                $tableHeader = $('<thead>');
            $table.prepend($tableHeader);
            $table.find('> tbody > tr').first().appendTo($tableHeader);
            $table.DataTable();
        });
    }
    function initialize($content) {
        if (initialized) {
            process($content);
        } else {
            queue.push($content);
        }
    }
    mw.loader.load('https://cdn.datatables.net/v/dt/dt-1.12.0/b-2.2.3/b-colvis-2.2.3/date-1.1.2/fc-4.1.0/r-2.3.0/rg-1.2.0/sc-2.0.6/sp-2.0.1/sl-1.4.0/datatables.css', 'text/css');
    mw.loader.getScript('https://cdn.datatables.net/v/dt/dt-1.12.0/b-2.2.3/b-colvis-2.2.3/date-1.1.2/fc-4.1.0/r-2.3.0/rg-1.2.0/sc-2.0.6/sp-2.0.1/sl-1.4.0/datatables.js').then(function() {
        initialized = true;
        queue.forEach(process);
    });
    mw.hook('wikipage.content').add(initialize);
    mw.hook('datatables.loaded').fire();
})(jQuery, mediaWiki);

Voting system for MediaWiki

One of the drawbacks of the Google Sheets documents is that anyone can submit new settings, but there’s no way to know whether these actually work.

I thought it would be important to add an up/downvote system, so users can confirm whether or not a setting actually worked for them.

Unfortunately, MediaWiki doesn’t have such a voting extension. External scripts such as LikeBtn could be implemented, but only if raw HTML is enabled, which is a big security risk on publicly editable wikis.

I’m not clever enough to write a new extension from scratch,...

Read more »