Question

I have been searching for the past 6 hours and I still couldnt figure out yet on how to create licenses that can be used for image uploads in Mediawiki. This is what I understand so far:

1) Add the list of licenses into the Mediawiki:Licenses page. (for this I copied the licenses used in Mediawiki site)

2) Next I then need to create the templates for each licenses. To do that, follow the red template links that appear below the license selection drop down menu on special:upload when you select a license from it and put info boxes in each of those respective template pages.

Step 2 is where I am having trouble with. For example, I copied the Licenses used in MediaWiki site. When I tried to add the Template:PD for public domain images, I copied the template from Mediawiki.org/Template:PD to my site. When I do that,this template is dependent on 3 or 4 other templates that needs to be created, like Mbox template, etc..etc... When I create those, those templates are dependant on even more templates that are yet to be created. Like this its a big massive tree of templates that needs to be created. For the past hour, I have been going through each red links trying to create those template one by one (basically copying it from Mediawiki site) and it seems to be an never ending task. So far I've created these templates:

Template:Mbox    
Template:Namespace_detect    
Template:Documentation    
Template:Template_sandbox_notice    
Template:Documentation/start_box2    
Template:Documentation/start box    
Template:Documentation/docspace    
Template:Documentation/template page    
Template:Documentation/end_box2    
Template:Ombox    
Template:Documentation/end box    
Template:Fmbox

etc..etc..

Its not even half way by the looks of it. Now this is what I dont know:

1) Am I on the right track? Is this how I do it or am I doing it wrong?

2) How many templates needs to be created like this? Seems like 100s to me...

3) Is there a simpler way to do this?

4) How do I create the license lists for image uploads so the user can choose it from the list? I want a simpler one than what is used in Wikipedia.

Any guidance please.... This license list seems to be more harder than installing the Mediawiki itself!! I just dont understand why some default listings are already provided with the install. Please help...

Was it helpful?

Solution

I was finally able to complete creating the licenses for my site. The method I was doing before was stupid and completely wrong. Thanks to Mir for pointing me out in the right direction. Here is the steps on how I ended up creating licenses for my Mediawiki.

HOW TO CREATE LICENSES: - Tutorial

In order to create licenses you need to do the following steps:

1) First figure out what licenses you want to list in your wiki. Its best to look at some samples to get an idea. Here are a few samples you can have a look at:

Licenses Samples:

MediaWiki Licenses: https://www.mediawiki.org/wiki/MediaWiki:Licenses

Wikipedia Licenses: http://en.wikipedia.org/wiki/MediaWiki:Licenses

https://en.bitcoin.it/wiki/MediaWiki:Licenses

http://qed.princeton.edu/main/MediaWiki:Licenses

2) Next step is to create the list of licenses in Mediawiki:Licenses page. The format used for this is like this: "template name|descriptive label." Once you add the list, the Drop-down list is displayed on Special:Upload.

3) Once you create the license list, when you view it in the Special:upload page by selecting that license, you will see a red link to that template. follow the red template links that appear below the license selection drop down menu on special:upload when you select a license from it and put info boxes in each of those respective template pages. Eg, if one of your license choices is "* Unknown | I don't know" then you want something informative in [[template:unknown]], see template:unknown.

4) Create a template for that license. Here you can have a look at some of the license templates used in wikipedia or other sites and create your own template like that. You can add div tag to add border styles, background colours, padding, etc.. the way you want it. You can also add images for the common licenses like Creative Commons, Public domain, etc.. and most of these images are usually available in default Mediawiki install itself.

5) Once the templates are created, those license templates will be loaded when the license is selected in the Special:Upload page.

Thats it!

In the future when you create new license templates, its better to copy an existing template, look at wikipedia for the sample and just change the license text and image for that new license you are about to add. Its that easy. In the end remeber to add that new license to the Mediawiki:Licenses page.

Hope this makes sense to other newbies like me... :)

OTHER TIPS

There is a category on MediaWiki.org called License templates containing 30 or so templates. You can use the Special:Export page on MediaWiki.org to export this entire category into an XML file. Be sure to tick the box that says "Include templates".

Then, on your wiki, use the Special:Import page (as admin user) to import these templates into your wiki.

More info at https://freephile.org/wiki/Licensing#Licensing_of_Wiki_content

Just want to expand on Neel's answer above.

When you add your list of licenses to the MediaWiki:Licenses page, it's important to include the Bullet List markup.

* Your own work
** cc-by-sa-4.0|Own work, Creative Commons Attribution-Share Alike 4.0
** cc-by-sa-4.0,3.0,2.5,2.0,1.0|Own work, multi-license with CC-BY-SA-4.0 and older

If you do not include the asterisks at the beginning of the line, they will not appear as options in the Licensing drop-down on the Upload page.

More detail in MediaWiki's wiki.

Also, another good source for information on licenses is the Creative Commons site.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top