MediaWiki:Guidedtour-tour-twa3.js
Shënim: Pas ruajtjes së parapëlqimeve ose kryerjes së ndryshimet, për t'ju shfaqur dallimet duhet të pastroni ruajtësin (cache) e shfletuesit. Pastrimi i ruajtësit të shfletuesve bëhet duke shtypur në të njëjten kohë Ctrl+Shift+Reload për Mozilla/Safari/Konqueror ose ctrl+shift+r për IE ose Ctrl+f5 për Opera: F5.
// The Wikipedia Adventure Mission 3
( function ( window, document, $, mw, gt ) {
//automatic api:edit function to send yourself messages
function sendMessage( targetPage, msgPage, linkTo ) {
var api = new mw.Api();
api.get( {
'action' : 'query',
'titles' : msgPage,
'prop' : 'revisions|info',
'intoken' : 'edit',
'rvprop' : 'content',
'indexpageids' : 1
} ).done( function (result) {
result = result.query;
var page = result.pages[result.pageids[0]];
var text = page.revisions[0]['*'];
api.post( {
'action' : 'edit',
'title' : targetPage,
'appendtext' : "\n" + text,
'summary' : 'Mesazh i ri (simulim automatik si pjesë e [[WP:The Wikipedia Adventure|Aventurës në Wikipedia]])',
'token' : page.edittoken
} ).done( function () {
window.location.href = linkTo;
} );
} );
}
// Fail gracefully post-save but not postedit
var postEditButtons = [];
if ( mw.config.get( 'wgAction' ) === 'view' && !gt.isPostEdit() ) {
postEditButtons.push( {
name: 'Kliko këtu që të ktheheni dhe bëni një redaktim',
onclick: function() {
window.location.href = new mw.Uri().extend( { action: 'edit' } ).toString();
}
} );
}
// Fail gracefully post-save but not postedit for visual editor
var postEditButtonsVisual = [];
if ( mw.config.get( 'wgAction' ) === 'view' && !gt.isPostEdit() ) {
postEditButtonsVisual.push( {
name: 'Go Back',
onclick: function() {
window.location.href = window.location.href +
"&veaction=edit";
}
} );
}
gt.defineTour( {
name: 'twa3',
shouldLog: true,
steps: [ {
//1
title: 'Misioni 3 sapo filloj!',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>GaiaGirl është duke pritur për ne në artikullin e Tokës.<br><br>Le të shkojmë atje.<br><br>',
onShow: gt.parseDescription,
overlay: true,
closeOnClickOutside: false,
buttons: [ {
name: 'Nisu drejt Tokës*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Ju lutem kyçu." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/1' , mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=2'); }
} ],
allowAutomaticOkay: false
}, {
//2
title: 'Pra, ky është Planeti Tokë!',
description: '<br>Artikuj në Wikipedia japin një pasqyrë enciklopedike një subjekti: ato i tregojnë lexuesit nga pak për gjithçka që është e rëndësishme të dijë.<br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Wikipedia:TWA/3/Start' ) + '?tour=twa3&step=1'
} , {
name: 'Check it out',
action: 'next',
} ],
allowAutomaticOkay: false
}, {
//3
title: 'Shikoni ndonjë gjë që ka nevojë të përmirësohet?',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Unë vura re disa gabime drejtshkrimore shpërqendruese nga informacioni. Sa shikon ti?<br><br>',
attachTo: '#content.mw-body',
position: 'bottom',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=2'
} , {
name: 'Search for typos',
action: 'next'
} ],
allowAutomaticOkay: false
}, {
//4
title: 'Kontrollo drejtshkrimin.',
description: '<br>A i gjetët të gjitha 5 gabimet?<br><br>tret -- <b>tretë</b><br>katërt -- <b>katër</b><br>Ter -- <b>Tre</b> <br>kafhsëve -- <b>kafshëve</b><br>njerizt -- <b>njerëzit</b>',
attachTo: '#content.mw-body',
position: 'bottom',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=3'
} , {
name: 'Found them all',
action: 'next',
} ],
}, {
//5
title: 'Përmirësimi i gabimeve',
description: '<br>Le të testojmë aftësitë tuaja redaktuese duke përmirësuar këto gabime drejtshkrimore. Shtype REDAKTO TEKSTIN BURIMOR.<br><br>',
attachTo: '#ca-edit',
position: 'bottom',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=4'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
}, {
//6
title: '5 përmirësime',
description: '<br>tret -- <b>tretë</b><br>katër -- <b>katërt</b><br>ter -- <b>tre</b> <br>kafsët -- <b>kafshët</b><br>njerizt -- <b>njerëzit</b>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=5'
} , {
name: 'Fixed',
action: 'next',
} ],
allowAutomaticOkay: false
}, {
//7
title: 'Përmbledhja e redaktimit dhe Kryej ndryshimet',
description: '<br>Le ta dinë se ju përmirsuar artikullin, me një përmbledhje si "Përmirësova 5 gabime drejtshkrimore".<br><br>Pastaj KRYEJ NDRYSHIMET kur të jeni gati.',
attachTo: '#wpSave',
position: 'bottomRight',
autoFocus: 'yes',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=6&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
} , {
//8
title: 'Shih me guxim!',
description: 'AFTËSI TË REJA U SHTUAN: <b>Medalja Korigjues</b><center>[[File:TWA badge 4.png|250px|link=]]</center><br>Wow. Tani e gjithë bota mund të shohë versionin e përmirësuar të artikullit ku ju kontribuat...fantastike!<br><br>Eja të bëjmë edhe disa ndryshime. Le të shtojmë trashësi në përmendjen e parë të <b>Tokës</b> në fjalinë e parë të arikullit.<br><br>Kjo i mundëson lexuesit të përqëndrohet shpejt në temën kryesore të artikullit. Shtyp REDAKTO TEKSTIN BURIMOR.<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#ca-edit',
position: 'bottom',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=7&action=edit'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
} , {
//9
title: 'Shto trashësi në tekst!',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>Ashtu si më parë, për të shtuar tekst të trashë, selektoje Tokëk në fjalinë e parë dhe pastaj shtyp butonin me shkronjë A të trashë në shiritin e veglave.<br><br>',
attachTo: '#wpTextbox1',
position: 'bottomRight',
autoFocus: 'yes',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=8'
} , {
name: 'Bolded',
action: 'next',
} ],
allowAutomaticOkay: false
} , {
//10
title: 'Përmbledhja e redaktimit dhe Kryej Ndryshimet',
description: '<br>Ler një përmbledhje të redaktimtit që edhe të tjerët të dijnë, "Shtova tekst të trashë"<br><br>Pastaj KRYEJ NDRYSHIMET kur të jeni gati.',
attachTo: '#wpSave',
position: 'bottomRight',
autoFocus: 'yes',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=9&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
} , {
//11
title: 'Whew... Kjo është emocionuese!',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Ju e mësuat shumë shpejt këtë. Ju do të bëni shumë gjëra të mira këtu, mund t\'a ndjej.<br><br>Hek ju gjithashtu keni një mesazh të ri...<br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=10&action=edit'
} , {
name: 'Kontrolloni mesazhin tuaj të ri*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/3a' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa3&step=12'); }
} ],
} , {
//12
title: 'Përmbajtje e re...',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Le të shohim se çfarë ka të re<br><br>',
onShow: gt.parseDescription,
attachTo: '#content.mw-body',
position: 'bottom',
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=11'
} , {
name: 'Shikoni përmbajtjen e re*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Ju lutem kyçu." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/4template2' , mw.util.getUrl( 'Wikipedia:TWA/3/End' ) + '?tour=twa3&step=13'); }
} ],
allowAutomaticOkay: false
} , {
//13
title: 'Misioni 3 u kompletua!',
description: '<br>[[File:Wesnothmusic.ogg (short).ogg]]<br><b>Rrugëtimi vazhdon në misionin 4...</b>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: 'Congrats me!',
action: 'end'
} ],
allowAutomaticOkay: false
}]
} );
} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;