ਫਰਮਾ:ਮੀਡੀਆਵਿਕੀ:Guidedtour-tour-twa1.js

// The Wikipedia Adventure Mission 1

( 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' : 'New Message (simulated automatically as part of The Wikipedia Adventure)', '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: 'ਵਾਪਸ ਜਾਣ ਅਤੇ ਇੱਕ ਸੋਧ ਕਰਨ ਲਈ ਇੱਥੇ ਕਲਿੱਕ ਕਰੋ',
               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: 'twa1',

shouldLog: true,

       steps: [ {
               //1
               title: 'ਵਿਕੀਪੀਡੀਆ ਉੱਤੇ ਤੁਹਾਡਾ ਸੁਆਗਤ ਹੈ!',

description: '

ਵਿਕੀਪੀਡੀਆ, ਇੱਕ ਅਜ਼ਾਦ ਵਿਸ਼ਵਗਿਆਨਕੋਸ਼ ਹੈ, ਜੋ ਕਿ ਸਾਰਿਆਂ ਨੂੰ ਗਿਆਨ ਪਸਾਰੇ ਦਾ ਹੱਕ ਦਿੰਦਾ ਹੈ।. ਮੈਂ ਇਥੇ ਤੁਹਾਨੂੰ ਇਸ ਬ੍ਰਹਿਮੰਡ ਦੇ ਇੱਕ ਦਿਲਚਸਪ ਦੌਰੇ ਉੱਤੇ ਲੈ ਜਾਣ ਲਈ ਆਇਆ ਹਾਂ.

ਇਸ ਦੌਰੇ ਦੇ ਵਿੱਚ 7 ਮਿਸ਼ਨ ਹਨ ਜੋ ਕਿ ਤੁਹਾਨੂੰ ਵਿਕੀਪੀਡੀਆ ਦਾ ਇੱਕ ਵੱਡਾ ਯੋਗਦਾਨੀ ਬਣਾਉਣਗੇ

',

               onShow: gt.parseDescription,
               overlay: true,
               closeOnClickOutside: false,

buttons: [ {

                       name: 'ਦਲੇਰਾਨੇ ਦੇ ਲਈ ਤਿਆਰ ਹੋ ਜਾਓ',
                       action: 'next',
               } ],
               allowAutomaticOkay: false	


       },  {
               //2
               title: 'Know before you go',
               description: '
ਇਸਨੂੰ ਕੱਟ [x] ਨਾ ਦਿਓ
ਇਹ ਡੱਬਾ ਇੱਕ ਸਪੇਸਸੂਟ ਹੈ: ਜੇ ਤੁਸੀਂ ਇਸ ਨੂੰ ਇੱਕ ਮਿਸ਼ਨ ਦੇ ਪੂਰਾ ਹੋਣ ਤੋਂ ਪਿਹਲਾਂ ਬੰਦ ਕਰ ਦਿੱਤਾ, ਤਾਂ ਤੁਹਾਨੂੰ ਦਲੇਰਾਨਾ ਛੱਡਣਾ ਪਵੇਗਾ ਅਤੇ ਸ਼ੁਰੂ ਵਿੱਚ ਮਿਸ਼ਨ ਨੂੰ ਮੁੜ ਚਾਲੂ ਕਰਨਾ ਪਵੇਗਾ.

Automatic messages
ਜਦ ਤੁਸੀਂ ਇਸ ਗੇਮ ਨੂੰ ਖੇਡੋਗੇ, ਤੁਸੀਂ ਕੁਝ ਸੁਨੇਹੇ ਆਪਣੇ ਨਿੱਜੀ ਵਿਕੀਪੀਡੀਆ ਸਫ਼ਾ ਨੂੰ ਭੇਜੋਗੇ, ਜਦੋ ਵੀ ਤੁਸੀਂ ਇਸ * ਨੀਲੇ ਬਟਨ ਵਿੱਚ ਦੇਖੋਂਗੇ.

', onShow: gt.parseDescription, overlay: true, closeOnClickOutside: false,

buttons: [ {

                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'ਵਿਕੀਪੀਡੀਆ:TWA/1/Start' ) + '?tour=twa1&step=1'          
               } , {
                       name: 'ਮੇਰੇ ਨਾਲ ਆਓ...',
                       action: 'next',
                        } ],
               allowAutomaticOkay: false		
       },  {
               //3
               title: 'ਵਿਕੀਪੀਡੀਆ ਕਿਓਂ?',

description: '

ਸਾਡਾ ਇੱਕ ਅਸਲ ਸ਼ਾਨਦਾਰ ਟੀਚਾ ਹੈ.

ਇੱਕ ਸੰਸਾਰ ਦੀ ਕਲਪਨਾ ਕਰੋ ਜਿਸ ਵਿਚ ਧਰਤੀ 'ਤੇ ਹਰ ਇਕ ਵਿਅਕਤੀ ਨੂੰ ਸਾਰੇ ਮਨੁੱਖੀ ਗਿਆਨ ਦੀ ਰਕਮ ਨੂੰ ਮੁਫ਼ਤ ਪਹੁੰਚ ਦਿੱਤਾ ਗਿਆ ਹੈ.

ਸਭ ਤੋਂ ਵੱਡੀ ਗੱਲ ਇਹ ਹੈ...

',

               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'ਵਿਕੀਪੀਡੀਆ:TWA/1/Start' ) + '?tour=twa1&step=2'          
               } , {
                        name: 'It is happening',
                        action: 'next',
                        } ],
               allowAutomaticOkay: false				
       },  {
               //4
               title: 'It is happening',

description: '

ਵਿਕੀਪੀਡੀਆ ਦੁਨੀਆਂ ਦੀਆਂ ਚੋਟੀ ਦੀਆਂ 10 ਵੈਬਸਾਈਟਾਂ ਦੇ ਵਿਚੋਂ ਇੱਕ ਹੈ ਅਤੇ ਇਸਨੂੰ ਇੱਕ ਸੈਕਿੰਡ ਦੇ ਵਿੱਚ ਸੰਸਾਰ ਦੀ ਅੱਧੀ ਜਨਤਾ ਵੱਲੋਂ 8000 ਵਾਰ ਖੋਲਿਆ ਜਾਂਦਾ ਹੈ. ਅਤੇ ਅਸੀਂ ਇਹ ਸਭ 2001 ਵਿੱਚ ਸ਼ੁਰੂ ਕੀਤਾ ਸੀ!

',

               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'ਵਿਕੀਪੀਡੀਆ:TWA/1/Start' ) + '?tour=twa1&step=3'          
               } , {
                       name: 'ਵਿਕੀਪੀਡੀਆ ਨੂੰ ਕੌਣ ਲਿਖਦਾ ਹੈ?',
                       action: 'next',
                        } ],

allowAutomaticOkay: false

       },  {
               //5
               title: 'ਵਿਕੀਪੀਡੀਆ ਨੂੰ ਕੌਣ ਲਿਖਦਾ ਹੈ?',

description: '

ਤੁਸੀਂ ਕਰੋ :) ਕੁੱਲ ਮਿਲਾ ਕੇ 30 ਮਿਲੀਅਨ ਰਜਿਸਟਰਡ ਵਰਤੋਂਕਾਰ ਹਨ. ਆਪਣਾ ਯੋਗਦਾਨ ਪਾਉਣ ਦੇ ਤੁਹਾਨੂੰ ਪ੍ਰੋਫੈਸ਼ਨਲ ਬਣਨ ਦੀ ਲੋੜ ਨਹੀ.

',

               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'ਵਿਕੀਪੀਡੀਆ:TWA/1/Start' ) + '?tour=twa1&step=4'          
               } , {
                       name: 'ਲੋਕ ਵਿਕੀਪੀਡੀਆ ਕਿਓਂ ਸੋਧਦੇ ਹਨ?',
                       action: 'next',
                        } ],

allowAutomaticOkay: false

       },  {
               //6
               title: 'ਆਪਣਾ ਵੱਖਰੀ ਅਦਾ ਨੂੰ ਖੋਜੋ',

description: '

ਵਿਕੀਪੀਡੀਆ ਦਾ ਮੁੱਖ ਹਿੱਸਾ ਇਹ ਹੈ ਕੀ ਤੁਸੀਂ ਆਪਣਾ ਰਾਹ ਆਪ ਚੁਣਦੇ ਹੋ. ਪਰ ਹਰ ਵਰਤੋਂਕਾਰ ਦੀ ਸੋਧ ਕੁਝ ਵੱਡੇ ਨਤੀਜੇ ਲੈ ਕੇ ਆਉਂਦੀ ਹੈ ਜੋ ਕੀ ਸੰਸਾਰ ਨੂੰ ਬਦਲ ਸਕਦੀ ਹੈ.

',

               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'ਵਿਕੀਪੀਡੀਆ:TWA/1/Start' ) + '?tour=twa1&step=5'          
               } , {
                       name: 'ਕੀ ਤੁਸੀਂ ਤਿਆਰ ਹੋ?',
                       action: 'next',
                        } ],
               allowAutomaticOkay: false,

}, {

               //7
               title: 'ਲਾਗਇਨ ਜਾ ਫਿਰ ਨਵਾਂ ਅਕਾਉਂਟ',

description: '

ਨਵੇਂ ਅਕਾਉਂਟ ਬਣਾਉਣ ਦੇ ਬਹੁਤ ਸਾਰੇ ਫਾਇਦੇ ਹਨ. ਇਸ ਲਈ ਸਾਰੀਆਂ ਸੋਧਾਂ ਇੱਕ ਨਵਾਂ ਅਕਾਉਂਟ ਬਣਾ ਕੇ ਹੀ ਕਰੋ

',

               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'ਵਿਕੀਪੀਡੀਆ:TWA/1/Start' ) + '?tour=twa1&step=6'  
               } , {
               	name: 'ਮੈਂ ਲਾਗਇਨ ਹਾਂ',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'ਵਿਕੀਪੀਡੀਆ:TWA/1/Start' ) + '?tour=twa1&step=8'
                       
               } , {
               	name: 'ਮੈਨੂੰ ਲਾਗਇਨ ਕਰਨ ਦੀ ਜ਼ਰੂਰਤ ਹੈ',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:UserLogin' ) + '?tour=twa1&step=7'
                    
               } , {
               	name: 'ਰਜਿਸਟਰ ਕਰੋ!',
                   action: 'externalLink',
                   url: mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?title=ਖਾਸ:UserLogin&returnto=ਵਿਕੀਪੀਡੀਆ:TWA/1/Start&returntoquery=tour%3Dtwa1%26step%3D8%26showGettingStarted%3Dfalse&type=signup'
                       
               } ],
               allowAutomaticOkay: false,
               shouldSkip: function () {
               return mw.config.get( 'wgUserId' )  !== null;
               }

} , {

               //8
               title: 'ਵਿਕੀਪੀਡੀਆ ਨੂੰ ਸਤਿ ਸ਼੍ਰੀ ਅਕਾਲ ਕਹੋ',
               description: '
Let\'s start off by introducing yourself to the community.

It will take just a few seconds to load the universe—light only travels so fast.

(For the rest of the journey, you need to be logged in.)

', overlay: true, onShow: gt.parseDescription, closeOnClickOutside: false, buttons: [ { name: '', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/1/Start' ) + '?tour=twa1&step=6' } , { name: 'Hello World*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Welcome' , mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=9'); } } ], allowAutomaticOkay: false

} , {

               //9
               title: 'Your userpage',

description: '

Your userpage is a place to tell other editors about yourself. You can share about your background and interests and what you\'d like to contribute to the project--share as much or as little as you like...

Remember this is a very public profile, so keep private information, well, private.

',

               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Wikipedia:TWA/1/Start' ) + '?tour=twa1&step=8'          
               } , {
                       name: 'What does a good userpage look like?',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Wikipedia:TWA/1/Bio' ) + '?tour=twa1&step=10'
               } ],

allowAutomaticOkay: false

} , {

               //10
               title: 'Challenge yourself BELOW...',
               description: 'Hint: you can learn as much from getting it wrong as getting it right.  And you can always try again!',
               attachTo:'#contentSub',
               position: 'bottom',
               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               allowAutomaticOkay: false, 
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=9'          
               } ],
              

} , {

               //11
               title: 'Your turn!',
               description: '
Creating your userpage on Wikipedia is as simple as editing it.

Click CREATE SOURCE or EDIT SOURCE above.

(This adventure always uses the SOURCE editor).

', attachTo: '#ca-edit', position: 'bottom', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=9' } ], shouldSkip: function() { return gt.hasQuery( { action: 'edit' } ); }

}, {

               //12
               title: 'The editing interface',

description: '

This is where the magic happens.

Type into the big text box towards the top left: your username, city or country, education, skills, and interests. What are you excited about doing here? Share as much or as little as you like, but make at least ONE edit.

If you already have a userpage, make at least ONE improvement to it.

',

               onShow: gt.parseDescription,
               overlay: false,
               attachTo: '#wpTextbox1', 
               position: 'bottomRight',
               closeOnClickOutside: false,

buttons: [ {

                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=11'          
               } , {
                       name: 'Typed it',
                       action: 'next'
              } ],
              

} , {

               //13
               title: 'Edit summary and Save',
               description: '
That looks pretty good! Before you click Save, leave a brief note about the changes you made, called an Edit Summary. This helps others follow along with your work.

Let\'s say that you "Introduced myself".

Now all you have to do is Save it. Saving makes an edit live and public. Click SAVE when you\'re ready.

', onShow: gt.parseDescription, overlay: false, attachTo: '#wpSave', position: 'bottomRight', closeOnClickOutside: false, allowAutomaticOkay: false, shouldSkip: function() { return gt.isPostEdit(); }, buttons: [ { name: '', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=12&action=edit' } ], buttons: postEditButtons

} , {

               //14
               title: 'Congrats!',

description: 'NEW TOOL EARNED: Editor Badge


You\'re a Wikipedia editor! How does it feel? It\'s great that you introduced yourself.
',

               overlay: false,
               onShow: gt.parseDescription,
               closeOnClickOutside: false,
               allowAutomaticOkay: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=13&action=edit'          
               } , {
                       name: 'Make it even better*',
                       onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "Please login." );   return;   } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/1template2' , mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=15'); } 
               } ],

} , {

               //15
               title: 'Even better',
               description: '
Let\'s go back and make a few changes to the text. Click EDIT SOURCE

', overlay: false, attachTo: '#ca-edit', position: 'bottom', onShow: gt.parseDescription, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=14' } ], shouldSkip: function() { return gt.hasQuery( { action: 'edit' } ); }

} , {

               //16
               title: 'Add bold',

description: '

In the text box, Highlight your username (or another key phrase) with your mouse.

Then click the button on the editing toolbar above the text box.

The editing toolbar makes Wikipedia much much easier, because it adds the formatting for you.',

               attachTo: '#wpTextbox1', 
               position: 'bottomRight',
               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=15'          
               } , {
               	    name: 'Bolded',
                       action: 'next'
               } ],

} , {

               //17
               title: 'Add italics',

description: '

Now highlight your interests.

Then click on the editing toolbar to put them in italics.

',

               attachTo: '#wpTextbox1', 
               position: 'bottomRight',
               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               allowAutomaticOkay: false	,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=16&action=edit'          
               } , {
               	    name: 'Italicized',
                       action: 'next'
               } ],

} , {

               //18
               title: 'Add wikilinks',

description: '

You can link to other pages on Wikipedia. This helps "build the web", and keeps you from getting any work done while you bounce from one article to another ;)

Highlight the city or country where you\'re from.

Then click the button in the editing toolbar (it looks like part of a chain).

Last, INSERT the link.

',

               attachTo: '#wpTextbox1', 
               position: 'bottomRight',
               onShow: gt.parseDescription,
               overlay: false,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=17&action=edit'          
               } , {
               	    name: 'WikiLinked',
                       action: 'next'
               } ],

} , {

               //19
               title: 'Edit summary and Save',
               description: '
You "Added bold, italics, and wikilinks". Just click SAVE, and your edits will go live.

', attachTo: '#wpSave', position: 'bottomRight', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=18&action=edit' } ], shouldSkip: function() { return gt.isPostEdit(); }, buttons: postEditButtons

} , {

               //20
               title: 'You did it :)',

description: 'NEW TOOL EARNED: Formatter Badge


You\'re learning fast. You\'re awesome. We\'re just getting started but already you have the basic tools to go on an adventure. Keep an eye on the skill meter at the bottom of the page as you develop more and more strengths.
',

               overlay: true,
               onShow: gt.parseDescription,
               closeOnClickOutside: false,
               buttons: [ {
                       name: '',
                       action: 'externalLink',
                       url: mw.util.getUrl( 'Special:MyPage' ) + '?tour=twa1&step=19&action=edit'          
               } , {
                       name: 'What\'s next??*',
                       onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "Please login." );   return;   } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/2template2' , mw.util.getUrl( 'Wikipedia:TWA/1/End' ) + '?tour=twa1&step=21'); } 
               } ],
               allowAutomaticOkay: false

} , {

               //21
               title: 'Mission 1 complete!',
               description: '

Journey on to mission 2...', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: 'Congrats me!', action: 'end' } ],


}]

} );

} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;