MediaWiki:Guidedtour-tour-twa6.js
Nota: Després de desar, heu de netejar la memòria cau del navegador per veure els canvis. En la majoria de navegadors amb Windows o Linux, premeu Ctrl+F5 o bé premeu Shift i cliqueu el botó "Actualitza" (Ctrl i "Actualitza" amb Internet Explorer). Vegeu més informació i instruccions per a cada navegador a Viquipèdia:Neteja de la memòria cau.
// 6a etapa del Bus turístic, adaptació de
// The Wikipedia Adventure Mission 6
( 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 = "{{subst:" + msgPage + "}}";
api.post( {
'action' : 'edit',
'title' : targetPage,
'appendtext' : "\n" + text,
'summary' : 'Nou missatge (simulat automàticament com a part de [[VP:BUS|Bus turístic]])',
'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: 'Cliqueu aquí per anar enrere i fer una edició',
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: 'Vés enrere per fer una edició',
onclick: function() {
window.location.href = window.location.href +
"&veaction=edit";
}
} );
}
gt.defineTour( {
name: 'twa6',
shouldLog: true,
steps: [ {
//1
title: 'Endinsem-nos-hi. ',
description: '<br><div align="left">[[File:Wikitanface.png|100px|link=]]</div>Anem a la pàgina de discussió de l\'article on GaiaNoia ha deixat un resum propi de la Revista Ciència i Natura.<br><br>',
onShow: gt.parseDescription,
overlay: true,
buttons: [ {
name: 'Anem a la discussió de Terra*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/Bus/Terra', 'Viquipèdia:Bus_turístic/Earth/Talk/2' , mw.util.getUrl( 'Special:MyTalk/Bus/Terra' ) + '?tour=twa6&step=2'); }
} ],
allowAutomaticOkay: false
}, {
//2
title: 'Fantàstic! Nova informació.',
description: '<br><div align="left">[[File:Wikitanface.png|100px|link=]]</div>Anem a afegir aquest text a l\'article.<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Viquipèdia:Bus_turístic/6/Start' ) + '?tour=twa6&step=1'
} , {
name: 'Anem a l\'article Terra',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=3'
} ],
allowAutomaticOkay: false,
}, {
//3
title: 'Modifica.',
description: '<br>Cliquem MODIFICA EL CODI per poder afegir el contingut sintetitzat<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:MyTalk/Bus/Terra' ) + '?tour=twa6&step=2'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
}, {
//4
title: 'Afegim-ho!',
description: '<br><small>La ciència mostra que la Terra es va formar fa uns 4.5000 milions d\'anys. Els organismes que hi viuen han canviat completament l\'aire (atmosfera); per això s\'anomena biosfera. El 71% de la superfície de la Terra està coberta d\'aigua salada marina. És l\'únic lloc del Sistema Solar que se sàpiga fins ara de l\'existència d\'aigua líquida. El altre 29% consisteix en terra rocosa que formen els continents i illes. La Terra interactua amb altres objectes del Sistema Solar, particularment el Sol i la Lluna. La Terra orbita el Sol cada 365,25 dies. Una rotació s\'anomena «dia» i una òrbita al voltant del Sol és un «any». Per això hi ha 365 dies en un any, però amb un dia addicional cada quatre anys.</small><br><br>',
attachTo: '#wpTextbox1',
position: 'bottomRight',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=3'
} , {
name: 'Afegit',
action: 'next',
} ],
}, {
//5
title: 'Resum i Desa',
description: '<br>Expliquem: "Afegida més info fiable i neutral sobre la història, proposada a la pàgina de discussió".<br><br>DESA LA PÀGINA quan estigui a punt.<br><br>',
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/Bus/Terra' ) + '?tour=twa6&step=4&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
}, {
//6
title: 'Mira, una notificació...',
description: '<br><div align="right">[[File:Wikipe-tan head.png|80px|link=]]</div>Acaba d\'arribar un nova notificació!</br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=5&action=edit'
} , {
name: 'Comprovem els missatges*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/Bus', 'Viquipèdia:Bus_turístic/MyTalk/6' , mw.util.getUrl( 'Special:MyTalk/Bus' ) + '?tour=twa6&step=7'); }
} ],
}, {
//7
title: 'Bona qüestió',
description: '<br><div align="right">[[File:Wikipe-tan head.png|80px|link=]]</div>Hi ha activitat en la nostra petita òrbita. Sembla que hi ha un altre missatge...</br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=6'
} , {
name: 'Recarreguem la pàgina de discussió*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/Bus', 'Viquipèdia:Bus_turístic/MyTalk/7' , mw.util.getUrl( 'Special:MyTalk/Bus' ) + '?tour=twa6&step=8'); }
} ],
}, {
//8
title: 'Però... què és una referència?',
description: '<br><div align="left">[[File:Wikitanface.png|100px|link=]]</div></div>Tornem a Terra per descobrir-ho!<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/Bus' ) + '?tour=twa6&step=7'
} , {
name: 'Anem a Terra*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ) + '/Bus/Terra', 'Viquipèdia:Bus_turístic/Earth/cleanup' , mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=9'); }
} ],
} , {
//9
title: 'Què és aquest avís?',
description: '<div align="left">[[File:Wikitanface.png|100px|link=]]</div>Aquesta... CAIXA D\'AVÍS... no fa bona pinta. Comprovem la pàgina de discussió a veure què significa.',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/Bus' ) + '?tour=twa6&step=8'
} , {
name: 'Anem a la discussió*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/Bus/Terra', 'Viquipèdia:Bus_turístic/Earth/Talk/3' , mw.util.getUrl( 'Special:MyTalk/Bus/Terra' ) + '?tour=twa6&step=10'); }
} ],
allowAutomaticOkay: false
} , {
//10
title: 'Resposta a Taggy',
description: '<br><div align="left">[[File:Wikitanface.png|100px|link=]]</div>A veure, una mica de calma.... respirem profundament i comptem un, dos, tres...<br><br>Què hauríem de dir a Taggy per a que tothom sàpiga que entenem la política de citar les fonts i que ja les afegirem (tant aviat com sapiguem com fer-ho)?<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=9'
} , {
name: 'Responem a Taggy!',
action: 'externalLink',
url: mw.util.getUrl( 'Viquipèdia:Bus_turístic/6/Civil' ) + '?tour=twa6&step=11'
} ],
allowAutomaticOkay: false
}, {
//11
title: 'Descobriu-ho vosaltres mateixos...',
description: 'Nota: es pot aprendre tant fent-ho bé com malament. Sempre es pot intentar de nou!',
attachTo:'#contentSub',
position: 'bottom',
onShow: gt.parseDescription,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/Bus/Terra' ) + '?tour=twa6&step=10'
} ],
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false
}, {
//12
title: 'Ben fet',
description: 'NOU ESCALAFÓ: <b>Distinció de Cortesia</b><center>[[File:TWA badge 11.png|250px|link=]]</center><br>Recarreguem la pàgina de discussió de Terra.<br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Viquipèdia:Bus_turístic/6/Civil' ) + '?tour=twa6&step=11'
}, {
name: 'Recarreguem*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/Bus/Terra', 'Viquipèdia:Bus_turístic/Earth/Talk/4' , mw.util.getUrl( 'Special:MyTalk/Bus/Terra' ) + '?tour=twa6&step=13'); }
} ],
allowAutomaticOkay: false
}, {
//13
title: 'Ok, cal una referència',
description: '<br><div align="right">[[File:Wikipe-tan head.png|80px|link=]]</div>Citar la font significa dir on hem trobat la informació per l\'article.<br><br> La referència és la font utilitzada per documentar la informació.<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Viquipèdia:Bus_turístic/6/Start' ) + '?tour=twa6&step=12'
}, {
name: 'Trucs entre línies*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Viquipèdia:Bus_turístic/Badge/11template2' , mw.util.getUrl( 'Viquipèdia:Bus_turístic/6/Start' ) + '?tour=twa6&step=14'); }
} ],
allowAutomaticOkay: false
} , {
//14
title: 'El com i el per què de les referencies',
description: '<br>Anem a veure com afegir una referència en l\'article i com citar-la dins del text.<br><br>La citació de la referència es mostra com un [número] en el text de l\'article que enllaça a la referència completa al final de la pàgina.<br><br>Ho fem així perquè els lectors sàpiguen quina part de l\'article està referenciat per una font determinada.<br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/Bus/Terra' ) + '?tour=twa6&step=13'
} , {
name: 'Anem a fer-ho',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=15'
} ],
}, {
//15
title: 'Modifiquem',
description: '<br>Cliquem MODIFICA EL CODI per afegir una citació dins del text.<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( 'Viquipèdia:Bus_turístic/6/Start' ) + '?tour=twa6&step=14'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
}, {
//16
title: 'Passos per a citar referències',
description: '<br><div align="right">[[File:Wikipe-tan head.png|80px|link=]]</div>Primer copiem la citació que descriu la font.<br><br><b>Gnawledge, O\'penn. "Planet Earth in the Balance of History". Science and Nature Journal. SandNjournal.com/Earthinthebalance. March 21, 2013. Consulta: {{ #time:j F Y| }}.</b><br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=15'
} , {
name: 'Copiat',
action: 'next',
} ],
} , {
//17
title: 'Citem-la',
description: '<br>Posem el cursor desprès del punt de la sentència que volem referenciar.<br><br>Cliquem el botó [[File:Toolbar_insert_reference.png]] de la barra d\'eines d\'edició i enganxem aquí la referència.<br><br>Ara podem clicar INSEREIX.<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=16&action=edit'
} , {
name: 'Inserit',
action: 'next',
} ],
} , {
//18
title: 'Afegim la llista de referències',
description: '<br><div align="left">[[File:Wikitanface.png|100px|link=]]</div>Per a que es mostri la referència completa cal afegir la llista de referències<br><br>Posem el cursor al final de la caixa d\'edició.<br><br>Escrivim: <br><b>== Referències ==<br><nowiki>{{referències}}</nowiki></b><br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=17&action=edit'
} , {
name: 'Afegit referències!',
action: 'next',
} ],
} , {
//19
title: 'Traiem l\'avís',
description: '<br><div align="left">[[File:Wikitanface.png|100px|link=]]</div>Resolt el problema, podem treure l\'avís de manteniment.<br><br>Cerquem i esborrem: <b><nowiki>{{Falten referències}}</nowiki></b> Fora!<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=18&action=edit'
} , {
name: 'Tret!',
action: 'next',
} ],
} , {
//20
title: 'Resum i Desa',
description: '<br>Fem-los saber: "Afegida referència d\'una font fiable i tret l\'avís de falten referències".<br><br>DESA LA PÀGINA quan estigui a punt.<br><br>',
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/Bus/Terra' ) + '?tour=twa6&step=19&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
} , {
//21
title: 'Bona feina!',
description: 'NOU ESCALAFÓ: <b>Distinció de Referenciador</b><center>[[File:TWA badge 12.png|250px|link=]]</center><br>Mira això! És per sentir-se\'n orgullós. Segur que et sents bé, no? Ho pots estar perquè estàs aprenent i convertint-te en un bon editor! Ja has començat a aprendre l\'edició, polítiques, comunicació, referències, navegació... Impressionant!<br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/Bus/Terra' ) + '?tour=twa6&step=20&action=edit'
} , {
name: 'I ara què més?*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Registreu-vos." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Viquipèdia:Bus_turístic/Badge/12template2' , mw.util.getUrl( 'Viquipèdia:Bus_turístic/6/End' ) + '?tour=twa6&step=22'); }
} ],
allowAutomaticOkay: false
} , {
//22
title: '6a etapa completada!',
description: '<br>[[File:MacLeod, Kevin - Stringed Disco (short).ogg]]<br><b>Viatgem a la 7a etapa, necessitem de les teves habilitats!</b>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: 'Felicita\'m!',
action: 'end'
} ],
allowAutomaticOkay: false
}]
} );
} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;