User talk:Takashimaru: Difference between revisions

Jump to navigation Jump to search
imported>Wikia
(Welcome to The Sims Wiki!)
 
imported>Mathetesalexandrou
Line 21:
:I'm really happy to have you here, and I look forward to contributing with you! [[User:K6ka|K6ka]] ([[User talk:K6ka|talk]]) 03:15, February 13, 2015 (UTC)
|}
 
== Regarding image licensing ==
 
Regarding that, I haven't done that myself.
 
I believe this is done through a script. I'm not in charge of scripting in the wiki (and personally haven't done any here given my lack of know-hows (yet)), but it's javascript.
 
Most of this comes from what we're using, with minor changes to remove the formatting such as red text and so.
 
<code>
function (insert name for function) ()
{
var options = {'': '', //Nothing
'(Stuff for your licensed image regarding option 1)': 'option 1',
...
'(Stuff for your licensed image regarding option n)': 'option n',
};
//(Stuff for your licensed image regarding option n) will usually have
// \n== Licensing ==\n with whatever you want to accompany it.
var optstr = '';
for ( i in options )
{
if ( options.hasOwnProperty( i ) ) //Get every option listed in options above with text
{
optstr += '<option value="' + i + '" style="text-align:center;">' + options[i] + '</option>'; //Which I presume is supposed to align the text to center but it isn't doing so.
}
}
var html = '<p style="text-align:center;"><select id="QLicenseSelect">' + optstr + '</select>&nbsp;<a class="wikia-button" style="margin:0 1em; cursor:pointer;" id="aSubmit">Add license</a>';
//Add button with the description Add license
if($('#LicensedFile').length || $('#Licensing').length)
//Check for the length of Licensing or LicensedFile segments if it is greater than 0
{
html += 'This file is licensed.'; //Then file is considered licensed
}
else
{
html += 'This file is not licensed.'; //If both have nothing, then it is not licensed
}
$('#WikiaPageHeader').append(html);
// Attach the button and the text checking license as we did with the options
$('#aSubmit').click( function(event)
//If the button is pressed (aSubmit is the button name)
{
this.innerHTML = '<img src="http://images2.wikia.nocookie.net/dev/images/8/82/Facebook_throbber.gif" style="vertical-align: baseline;" border="0" />';
//Get the facebook loading image
$.post("/api.php", {action: "edit", title: mw.config.get("wgPageName"), token: mw.user.tokens.values.editToken, bot: true, appendtext: $("#QLicenseSelect").val(), summary: "Licensing image."}, function (result)
{
window.location = wgServer + '/index.php?title=' + mw.config.get("wgPageName") + '&action=purge';
});
});
}
if (wgCanonicalNamespace == 'File') {
addOnloadHook((function name above));
//Add this thing to the page if it is in the File namespace
}
</code>
 
This should be written as a js file then uploaded to the wiki, and all image files should link to this script.
 
However, you may wish to talk to the bureaucrats who deal with this kind of thing. I recommend {{User|LostInRiverview}}, {{User|K6ka}}, {{User|Nikel23}} and {{User|Lost Labyrinth}}, since I'm of the understanding that they've some experience in that sort of thing.
 
[[User:Mathetesalexandrou|<span style="color:#00CC33">MILK FOR THE UNYUUFEX, </span><span style="color:#00AADD">FLAT CHEST FOR THE CUTENESS THRONE, </span><span style="color:#88AAAA">SKULLS FOR THE SKULL PROBES </span>]] ([[user talk:Mathetesalexandrou]]) 00:33, February 14, 2015 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu