Template talk:Inform
The second column
With the parameter col2 the information box is expanded to a table of one row and two columns; the left column contains the information box,
right of it the second column can contain anything else - one or more images with {{F}} or [[File: .. ]], source code, another table.
Depending on the size of the second row, with wid2 the width percentage of it should be specified.
- Examples
|
France |
|
|
Source<?xml version="1.0"?>
<- http://www.inkscape.org ->
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.0"
width="160"
height=180">
<circle cx="80" cy="80" r="36"/>
</svg>
|
|
| |||||||||||||||||||||||||||||||||||
Upload with prefilled form
Into your commons.js you may copy from the code
var ns = mw.config.get('wgNamespaceNumber'),
ul = mw.config.get('wgUserLanguage'),
pn = mw.config.get('wgPageName'),
un = mw.config.get('wgUserName'),
dt = new Date();
fd = dt.getFullYear()+'-'+String(dt.getMonth()+1).padStart(2,'0')+'-'+String(dt.getDate()).padStart(2,'0'); // formatted date
$.when(mw.loader.using('mediawiki.util'), $.ready).done(function ()
{ "use strict";
// ..... other utilities
// Insert a personalized text-template into the Special:Upload edit box.
// input form, prefilled for uploading own work on current date, {{PD-self}}
if (pn === 'Special:Upload' && /&uselang=([^&]*)ownwork/.test(location.search))
{ setTimeout(function ()
{ $('#wpUploadDescription').val
( '=={{int:filedesc}}==\n\{{Inform\n' +
'| desc = \n' + // {{F|F}}
// '| dese = \n' + // {{en|…}}
'| date = ' + fd + '\n' + // yyyy-mm-dd
'| sour = \n' + // {{own based|…}}
'| auth = ' + un + '\n' + // mw.config.get('wgUserName')
'| imag = \n}}\n' // igen parms
// vers; fiel; perm; oloc; (when params are required)
);
}, 100);
} else
{ // If not on Special:Upload change the Upload-link.
$('#n-uploadbtn').find('a').attr('href', '//commons.wikimedia.org/w/index.php?title=Special:Upload&uselang=' +
((ul === 'en') ? '' : ul) + 'ownwork&uploadformstyle=basic');
}
// ..... more utilities
}); // end mw.util
You may customize the code for your special needs.

