MediaWiki:Common.js/licenseHelp.js

if (mw.config.get("wgPageName") == "Help:Images_licensing") { $(function {	var licensing = [		{			label: "Welcome!",			contents: [				{					label: "Hello there, and welcome to the licensing FAQ!",					contents: "This short FAQ will answer some of the common questions that you may have about how to license files, whether you've got to license a file in the past or not. Select the next item from the navigation bar above and lets get started!",					isStatic: true				}			]		},		{			label: "Introduction",			contents: [				{					label: "What is a licensing?",					contents: "A licensing is a reference to a file's source and copyright status. The purpose of licensings is to give credits to the creators and to the legal owners of the files, and also to possibly direct people who are interested in them ot the file's source."				},				{					label: "Why do i need to license my files?",					contents: "As mentioned, the licensings show the relevant copyright information about a certain file. Licensing a given file will let people who are interested in using it know when it may, and under what circumstances it should not be used."				}			]		},		{			label: "Getting started",			contents: [				{					label: "How do i know which license to pick?",					contents: "Different files are published with a different copyright status. Here is a short list of all the common licensings and when to use them: "				},				{					label: "Are there other licensings?",					contents: "Yes! There is a variety of licensings available, but these four are the most common and you are likely to almost always deal with them."				},				{					label: "How do i license Club Penguin cutouts or customs?",					contents: "For those of you who don't know, cutouts is a common term referred to specific images that have been extracted from a Club Penguin file (e.g. a penguin pose from a catalog), and customs are fan images made from different Club Penguin images and/or cutouts. The 'Copyrighted Game' template is used for all Club Penguin files- after all, cutouts and customs are essentially files created by the Club Penguin team that were then rearranged by someone to create a new image. As for customs, however, there is a special template-, which is the same as the Copyrighted game, but with an addition label that mentions that this is a custom image."				},				{					label: "What if several licensings match my file?",					contents: "If that is the case, you can still pick several licensings to the file. While uploading a file, you can only select one license. However, you can still edit the file page after the upload and add further licensings."				},				{					label: "File usage based on licensing",					contents: "When you go to a file's page, you can see its licensing, and thereby know when you will be able to use it, and what usage restrictions or requirements it may have. When it comes for Club Penguin content, we understand that content by Club Penguin and copyrighted content from the internet in general are used in all sorts of ways- most of them are edgey or completely violate its legal copyrights. If you need to use a content of this sort for this sort of usage, you are asked to make sure that the content is used in a fair manner, and is released in a way that others will be able to tell who the artucal content's owners are."				}			]		},		{			label: "Picking the license",			contents: [				{					label: "How do i add a licensing to a file?",					contents: "Whenever uploading an image, a dropdown with a list of common licensings is found. Selecting a licensing is done by picking the relevant licensing from the dropdown before uploading the file, where each one represends a template licensing. The Each dropdown label describes the licensing in a few words, and you can hover above each one of them to see what template it represents."				},				{					label: "Help! I can't find my license int eh dropdown!",					contents: "Although this scenario is unlikely, you may once a while need to upload a file that needs to be given a licensing that does not appear in the dropdown- which only covers the more common licenses. You can go to the copyright tags category and see if you can find what you need. If so, upload your file without a licensing, and once uploaded, edit the file page and replace the placeholder template int he 'Licensing' section with the template that you need. If you still cannot find it, you you can contact an admin about this, ask in chat for help, or even create a new licensing template that matches the copyright status of your file, which will also be usable for future files."				},				{					label: "But wait, there is no dropdown!",					contents: "If you upload a file via Special:Upload or Special:MultipleUpload, the licensing dropdown is found on the bottom of the page. If, however, you upload your file via the 'Add a Photo' popup interface, accessible via the right rail on articles in the wiki, it will not be visible by default. For that, you can press the 'More Options' in the popup section, which will also show further options, such as changing the target file name or adding an upload summary. If, however, you're uploading a new version of an existing file, you won't be able to modify the file's licensing. You will only be able to do that after the upload."				}			]		}	];

function parse(arr, depth) { var markup = ""; for (var i in arr) { markup += (				'' +					(depth == 0 ? '\t' + arr[i].label + '\n' : '\t' + arr[i].label + ' \n') +					'\t' + (typeof arr[i].contents == "string" ? ' ' + arr[i].contents + ' ' : '' + parse(arr[i].contents, depth + 1) + '') + '\n' +				''			); }		return "\n" + markup; }

$("#mw-content-text").html(' ');

$(parse(licensing, 0)).appendTo("#licenses");

$("#licenses > li:first-child").addClass("licenses-selected");

$("#licenses > li > .licenses-tab").click(function {		if (!$(this).parent.hasClass("licenses-selected")) {			$("#licenses > .licenses-selected").removeClass("licenses-selected");			$(this).parent.addClass("licenses-selected");		}	}); $("#licenses > li > ul > li > h3:not(.licenses-static)").click(function {		window.a = this;		$(this).next.toggle(200);	});

mw.util.addCSS(		'#mw-content-text ul, #mw-content-text li {\n' +			'\tlist-style: none;\n' +			'\tmargin: 0;\n' +			'\tpadding: 0;\n' +		'}\n' +		'#mw-content-text > ul {\n' +			'\toverflow: hidden;\n' +			'\theight: 440px;\n' +			'\tposition: relative;\n' +	//		'\tpadding-top: 40px;\n' +			'\tbackground: linear-gradient(to bottom, #c7c2a6 0, #a9a489 40px);\n' + // uriginally used #272714			'\tborder-right: 1px solid #eee;\n' +			'\tborder-left: 1px solid #eee;\n' +		'}\n' +		'#mw-content-text > ul > li {\n' +			'\tdisplay: inline-block;\n' +		'}' +		'#mw-content-text > ul > li > ul {\n' +			'\tdisplay: none;\n' +			'\toverflow-y: scroll;\n' +			'\theight: 390px;\n' +			'\tposition: absolute;\n' +			'\tleft: 0;\n' +			'\tpadding: 4px;\n' +			'\tbackground: #fafafa;\n' +		'}' +		'#mw-content-text .licenses-tab {\n' +			'\tdisplay: inline-block;\n' +			'\theight: 34px;\n' +			'\tpadding: 3px 8px;\n' + //		'\tposition: absolute;\n' + //		'\ttop: 0;\n' + '\tline-height: 34px;\n' + '\tcolor: #222;\n' + '\tfont-size: 18px;\n' + '\ttext-decoration: none;\n' + '\tcursor: hand;\n' + '\tcursor: pointer;\n' + '}' +		'#mw-content-text .licenses-tab + .licenses-tab {\n' + '\tborder-left: 1px solid #ccc;\n' + '}' +		'#mw-content-text .licenses-selected .licenses-tab {\n' + '\tbackground: linear-gradient(to bottom, #eee, #ddd);\n' + '\tbox-shadow: 0 0p 6px rgba(0,0,0,0.3) inset;\n' + '}' +		'#mw-content-text :not(.licenses-selected) > .licenses-tab:hover {\n' + '\tbackground: linear-gradient(to bottom, rgba(208,205,188,0.9), rgba(208,205,188,0.23));\n' + '\tborder-radius: 5px;\n' + '}' +		'#mw-content-text .licenses-selected > ul {\n' + '\tdisplay: block;\n' + '}' +		'#licenses h3 {\n' + '\tfont-weight: bold;\n' + '\tcursor: hand;\n' + '\tcursor: pointer;\n' + '}' +		'#licenses h3:not(.licenses-static)::before {\n' + '\tmargin-right: 3px;\n' + '\tcontent: url(\'http://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Emblem-question.svg/18px-Emblem-question.svg.png\');\n' + '\tvertical-align: middle;\n' + '}' +		'#licenses > li > ul {\n' + '\twidth: ' + ($("#mw-content-text").width - 8) + 'px\n;' + '}' +		'#licenses > li > ul > li > h3:not(.licenses-static) + div {\n' + '\tdisplay: none;\n' + '\tmargin-left: 8px;\n' + '}'	); }); }