10. Install License Templates¶
Copyright licenses can be assigned to files when they are uploaded to the wiki. Note that Install Message Box Templates is a prerequisite for the license templates.
Start the virtual machine and log in:
ssh -p 8015 email@example.com
Check for and install system updates on the virtual machine:
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get autoremove
Install the license templates. License templates are selected for each file at time of upload.
Complete the installation by editing these wiki pages and filling them with the following:
This file is made available under the [[wikipedia:Creative Commons|Creative Commons]] [//creativecommons.org/publicdomain/zero/1.0/deed.en CC0 1.0 Universal Public Domain Dedication].
The person who associated a work with this deed has dedicated the work to the [[wikipedia:public domain|public domain]] by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
Details about how the XML file was created can be found here . The two MediaWiki pages listed above had to be manually filled because they would not export from Wikipedia properly.
Test that the license templates are working by visiting Special:Upload, selecting each license from the drop-down menu one at a time, and inspecting the message boxes that appear. If the licenses look alright, there are no script errors, and there are no red links, then the license templates are working properly.
Shut down the virtual machine:
sudo shutdown -h now
Using VirtualBox, take a snapshot of the current state of the virtual machine. Name it “License templates installed”.
The XML file
MediaWiki:Licenses Module:Math Template:Category handler Template:Cc-by-4.0 Template:Cc-by-sa-4.0 Template:Cc-by-sa-4.0,3.0,2.5,2.0,1.0 Template:Cc-zero Template:Center Template:File other Template:Free media Template:GFDL Template:Image other Template:ImageNoteControl Template:Lang Template:License migration Template:License migration announcement Template:Max Template:PD-art Template:PD-old Template:PD-old-100 Template:PD-US Template:PD-USGov Template:R from move Template:Self Template:Template other
Versions compatible with MediaWiki 1.27 were found by first trying the versions of these pages currently on Wikipedia, exported using Special:Export on 2016-08-21. At the time, Wikipedia was running an alpha-phase version of MediaWiki 1.28.0. Luckily, this just worked without errors or rendering glitches. If it had not, I would have used the method described in Updating Templates Exported from Wikipedia to find working versions of these pages.
I then made some modifications. On Wikipedia, the list of licenses is quite long and includes many that will not be useful to our students. To remove these, in the XML file I deleted several lines from MediaWiki:Licenses.
Finally, to eliminate the red links that would otherwise appear in some
licenses, I manually edited the XML contents of many templates.
Specifically, wherever there would be a red link, I added the interwiki
The final result is the file