Site Notice
  • We have a limited coverage policy. Please check our coverage page to see which articles are allowed.
  • Please no leaked content less than one year old, or videos of leaks.
  • Content copied verbatim from other websites or wikis will be removed.

Difference between revisions of "NintendoWiki:Interwiki (Link) Task Force"

From NintendoWiki, your source on Nintendo information. By fans, for fans.
Jump to navigation Jump to search
(saving in order to move on)
 
Line 4: Line 4:
 
== The side bar system ==
 
== The side bar system ==
 
The code for this system is based off of some code gotten from Wikimedia, that uses JavaScript to move the link from the page's content to the side bar. It comes with some default CSS that individual wiki can customize as they see fit.  
 
The code for this system is based off of some code gotten from Wikimedia, that uses JavaScript to move the link from the page's content to the side bar. It comes with some default CSS that individual wiki can customize as they see fit.  
 
  
 
=== CSS ===
 
=== CSS ===
Line 71: Line 70:
 
   return node;
 
   return node;
 
}
 
}
 
 
 
 
  
  
Line 136: Line 131:
  
 
=== Templates ===
 
=== Templates ===
 +
The templates for this system are then broken down into various levels.
 +
 +
#Level 1
 +
#* {{tem|PL:/core}} contains a tag class called "interProject", in which the javascript picks up and moves to the side, along with parameters for language, links, and custom caption. See the template page for more info.
 +
#Level 2
 +
#* <code>Template:PL:____</code> where the blank is filled in by the intended wiki's code goes, along with the Wiki's name if no caption is give.
 +
#Level 3
 +
#* {{tem|Projectlink}} creates a template link to <code>Template:PL:____</code> when a specific wiki code is asked for
 +
#Level 4
 +
#* {{tem|Projectlinks}} gathers all the links and requested wikis.
 +
 +
Here is an example of links to [[Super Smash Bros. Brawl]] on all niwa wikis (that have the page):
 +
<pre>
 +
{{projectlinks
 +
|bp|page1=Super Smash Bros. Brawl
 +
|lw|page1=Super Smash Bros. Brawl
 +
|met|page3=Super Smash Bros. Brawl
 +
|pw|page5=Super Smash Bros. Brawl
 +
|smashwiki|page7=Super Smash Bros. Brawl
 +
|strategywiki|page8=Super Smash Bros. Brawl
 +
|smw|page6=Super Smash Bros. Brawl
 +
|wb|page10=Super Smash Bros. Brawl
 +
|wk|page10=Super Smash Bros. Brawl
 +
|zw|page12=Super Smash Bros. Brawl
 +
}}
 +
</pre>
  
  
 +
=== Links ===
 +
Swap links for inter-wiki content. For example, [[zw:Characters_in_Super_Smash_Bros._(Series)#Ness]] is the Ness link on ZeldaWiki, and i think that link should appear on the Ness page on Smash Wiki, SMW, etc. Any wiki's that don't include Ness (like BP) wouldn't be forced to create one just to accommodate. '''(This task is being headed by Turtwig A)'''
  
  
 
== Users ==
 
== Users ==
On WikiBound, we have begun working on inter-wiki links that can be placed on the sidebar, similar to inter-language links, based on some code i got from WikiMedia . in order for this to work, we need people who would be willing to help with the following:
+
=== Userbox(es) ===
# Implement the related CSS and Javascript with permission of that wiki, by an admin there and/or an interested participant in this mission. If the wiki wishes to customize it, work with them to preserve the idea but at the same time, allow it to fit into the wiki's
+
 
# Develop inter-wiki templates for each wiki to each wiki, customized to that wiki's inter-wiki codes.
 
# Swap links for inter-wiki content. For example, [[zw:Characters_in_Super_Smash_Bros._(Series)#Ness]] is the Ness link on ZeldaWiki, and i think that link should appear on the Ness page on Smash Wiki, SMW, etc. Any wiki's that don't include Ness (like BP) wouldn't be forced to create one just to accommodate. '''(This task is being headed by Turtwig A)'''
 
  
 
=== Participants ===
 
=== Participants ===
* Turtwig A - #'s 1
+
* Turtwig A
* [[User:Tina]] - #'s 1 & 3
+
* [[User:Tina]]  
* [[User:Metroidking]] - #'s 1
+
* [[User:Metroidking]]
* [[User:Aximost]] - #'s 1 & 3
+
* [[User:Aximost]]
* [[User:Ewan2012]] - #'s 1 & 3
+
* [[User:Ewan2012]]
* [[User:Aria der Donau]] - #3
+
* [[User:Vince220]]
* [[User:Vince220]] - #'s 1 & 2
+
* [[User:Moydow]]
* [[User:Moydow]] - #s 1 and 3
+
 
* [[User:Blue Ninjakoopa|Blue Ninjakoopa]] - #'s 2 & 3
 
  
  
Line 161: Line 181:
 
* [http://www.niwanetwork.org/forums/index.php?topic=132.msg8827#msg8827 Forum Entry]
 
* [http://www.niwanetwork.org/forums/index.php?topic=132.msg8827#msg8827 Forum Entry]
  
 +
=== Current Templates ===
 +
The following is a list of templates available for your use on their respective wikis. An excellent option if the wiki doesn't implement the system out lined above.
  
 
+
* {{zw|Template:Bp}} - [[Zelda Wiki]]'s interwiki template to [[Bulbapedia]]
=== Current Templates ===
+
* {{smw|Template:NIWA}} - [[Super Mario Wiki]]'s interwiki template to <code><insert wiki here></code>

Revision as of 06:28, 6 November 2010

This page is about the Interwiki Task Force, a group of users who are willing to seek out and help wikis that wish to interwiki link to one-another for more in depth information on a specific topic. Specifically, this group wishes to implement an interwiki linking system using the sidebar (like languages links) for space for links that may be to minor for inclusion in even the articles External Links area of an article. Not all wikis need to implement the system in order to receive help or participate.


The side bar system

The code for this system is based off of some code gotten from Wikimedia, that uses JavaScript to move the link from the page's content to the side bar. It comes with some default CSS that individual wiki can customize as they see fit.

CSS

/*InterProject: gotten from http://en.wiktionary.org/wiki/MediaWiki:Common.css on 10/16/2010 */   
.interProject 
{
    display:none;
     clear: both;
     border-top: 2px dotted #AAAAAA;
     margin-top: 2em; 
}

Javascript

/*gotten from http://grifkuba.org/MotherEarthBoundWiki/index.php?title=MediaWiki:Common.js on 11/1/2010*/
/*
=== DOM creation ===
<pre>*/
/**
 * Create a new DOM node for the current document.
 *    Basic usage:  var mySpan = newNode('span', "Hello World!")
 *    Supports attributes and event handlers*: var mySpan = newNode('span', {style:"color: red", focus: function(){alert(this)}, id:"hello"}, "World, Hello!")
 *    Also allows nesting to create trees: var myPar = newNode('p', newNode('b',{style:"color: blue"},"Hello"), mySpan)
 *
 * *event handlers, there are some issues with IE6 not registering event handlers on some nodes that are not yet attached to the DOM,
 * it may be safer to add event handlers later manually.
**/
function newNode(tagname){

  var node = document.createElement(tagname);
  
  for( var i=1;i<arguments.length;i++ ){
    
    if(typeof arguments[i] == 'string'){ //Text
      node.appendChild( document.createTextNode(arguments[i]) );
      
    }else if(typeof arguments[i] == 'object'){ 
      
      if(arguments[i].nodeName){ //If it is a DOM Node
        node.appendChild(arguments[i]);
        
      }else{ //Attributes (hopefully)
        for(var j in arguments[i]){
          if(j == 'class'){ //Classname different because...
            node.className = arguments[i][j];
            
          }else if(j == 'style'){ //Style is special
            node.style.cssText = arguments[i][j];
            
          }else if(typeof arguments[i][j] == 'function'){ //Basic event handlers
            try{ node.addEventListener(j,arguments[i][j],false); //W3C
            }catch(e){try{ node.attachEvent('on'+j,arguments[i][j],"Language"); //MSIE
            }catch(e){ node['on'+j]=arguments[i][j]; }}; //Legacy
          
          }else{
            node.setAttribute(j,arguments[i][j]); //Normal attributes

          }
        }
      }
    }
  }
  
  return node;
}


/*
#########
### ProjectLinks
###  by [[user:Pathoschild]] (idea from an older, uncredited script)
###    * generates a sidebar list of links to other projects from {{projectlinks}}
#########
*/
function Projectlinks() {
        var elements = new Array();
        var spans = document.getElementsByTagName('span');
        
        // filter for projectlinks
        for (var i=0, j=0; i<spans.length; i++) {
                if (spans[i].className == 'interProject') {
                        elements[j] = spans[i].getElementsByTagName('a')[0];
                        j++;
                }
        }

        if (j == 0)
            return;
        
        // sort alphabetically
        function sortbylabel(a,b) {
                // get labels
                a = a.innerHTML.replace(/^.*<a[^>]*>(.*)<\/a>.*$/i,'$1');
                b = b.innerHTML.replace(/^.*<a[^>]*>(.*)<\/a>.*$/i,'$1');

                // return sort order
                if (a < b) return -1;
                if (a > b) return 1;
                return 0;
        }
        elements.sort(sortbylabel);
        
        // Create the list of project links
        var pllist = newNode('ul');
        for (var i=0; i<elements.length; i++) {
                pllist.appendChild(newNode('li', elements[i]));
        }
        var projectBox = newNode('div', {'class': 'portlet portal', id: 'p-projects'}, 
            newNode('h5', 'On other wikis'),
            newNode('div', {'class': 'pBody body'}, pllist)
        );

        var insert = document.getElementById('p-tb');
        if (!insert)
            return;

        if (insert.nextSibling)
            insert.parentNode.insertBefore(projectBox, insert.nextSibling);
        else
            insert.parentNode.appendChild(projectBox);
}

addOnloadHook(Projectlinks);

Templates

The templates for this system are then broken down into various levels.

  1. Level 1
    • {{PL:/core}} contains a tag class called "interProject", in which the javascript picks up and moves to the side, along with parameters for language, links, and custom caption. See the template page for more info.
  2. Level 2
    • Template:PL:____ where the blank is filled in by the intended wiki's code goes, along with the Wiki's name if no caption is give.
  3. Level 3
    • {{Projectlink}} creates a template link to Template:PL:____ when a specific wiki code is asked for
  4. Level 4

Here is an example of links to Super Smash Bros. Brawl on all niwa wikis (that have the page):

{{projectlinks
|bp|page1=Super Smash Bros. Brawl
|lw|page1=Super Smash Bros. Brawl
|met|page3=Super Smash Bros. Brawl
|pw|page5=Super Smash Bros. Brawl
|smashwiki|page7=Super Smash Bros. Brawl
|strategywiki|page8=Super Smash Bros. Brawl
|smw|page6=Super Smash Bros. Brawl
|wb|page10=Super Smash Bros. Brawl
|wk|page10=Super Smash Bros. Brawl
|zw|page12=Super Smash Bros. Brawl
}}


Links

Swap links for inter-wiki content. For example, zw:Characters_in_Super_Smash_Bros._(Series)#Ness is the Ness link on ZeldaWiki, and i think that link should appear on the Ness page on Smash Wiki, SMW, etc. Any wiki's that don't include Ness (like BP) wouldn't be forced to create one just to accommodate. (This task is being headed by Turtwig A)


Users

Userbox(es)

Participants


Related

Current Templates

The following is a list of templates available for your use on their respective wikis. An excellent option if the wiki doesn't implement the system out lined above.