Wasteland Wiki
 
No edit summary
 
Line 1: Line 1:
  +
/* ################################################## */
<noinclude>{{Documentationpage}}</noinclude>
 
  +
/* ### PERMANENT ### */
Template which generates a list of overview pages. Uses a parameter as a base and detects whether game-specific pages of the same name in plural exist and generates a list for the existing ones.
 
  +
/* ################################################## */
   
  +
/* Mark certain namespaces & pages in RC */
==Usage==
 
  +
body.page-Special_RecentChanges #bodyContent a[href^="/Help:"],
Simply put the following where you want the list to appear:
 
  +
body.page-Special_RecentChanges #bodyContent a[href^="/Help_talk:"],
<pre>{{Overviewpagelist|check for=name of pages to check for}}</pre>
 
  +
body.page-Special_RecentChanges #bodyContent a[href^="/MediaWiki:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/MediaWiki_talk:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/Portal:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/Portal_talk:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/Template:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/Template_talk:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/The_Vault:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/The_Vault_talk:"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/User:PorterBot"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/User:PorterBot"].mw-userlink,
  +
body.page-Special_RecentChanges #bodyContent a[href^="/User:Porter21"],
  +
body.page-Special_RecentChanges #bodyContent a[href^="/User:Porter21"].mw-userlink {
  +
font-weight: bold;
 
}
   
  +
body.page-Special_RecentChanges #bodyContent a[href^="/User:GhostAvatarBot"].mw-userlink,
===Parameters===
 
  +
body.page-Special_RecentChanges #bodyContent a[href^="/User:PorterBot"].mw-userlink {
{{Docparam|name=check for|req=semi|default=<nowiki>{{PAGENAME}}s</nowiki>|desc=
 
  +
color: darkOrange;
By default, the template assumes that the page names to look are like the name of the current page with an "s" appended and a game name in front. If the page name already ends with an "s", no further "s" is appended. This parameter allows you to specify page names to look for directly and circumvent this default behaviour.
 
}}
+
}
   
  +
body.page-Special_RecentChanges #bodyContent .va-genericbox a {
{{Docparam|name=mode|req=no|default=default|desc=
 
  +
font-weight: normal !important;
Formatting of the page list.
 
  +
}
   
  +
/* Standard font on user talk pages */
Available options:
 
  +
body.ns-3 #bodyContent font {
* ''default'': Produces a right-floated navbox.
 
  +
font-family: sans-serif !important;
* ''list'': Produces a plain unnumbered list.
 
}}
+
}
   
  +
/* Remove ads */
{{Docparam|name=image|req=no|default=|desc=
 
  +
div.atflb, div.btflb {
If <code>mode</code> is set to "default", this parameter allows an image to be shown above the list of pages. Enter the file name without "File:".
 
  +
display: none;
}}
 
  +
}
   
  +
body.page-Wasteland_2_Wiki div.atflb,
==Examples==
 
  +
body.page-Wasteland_2_Wiki div.btflb {
===Navbox===
 
  +
display: block;
{{Overviewpagelist|check for=items}}
 
  +
}
<pre>{{Overviewpagelist|check for=items}}</pre>
 
{{clear}}
 
===List===
 
<pre>{{Overviewpagelist|mode=list|check for=items}}</pre>
 
results in:
 
{{Overviewpagelist|mode=list|check for=items}}
 
   
  +
/* ################################################## */
==Technical==
 
  +
/* ### TEMPORARY ### */
===Limitations===
 
  +
/* ################################################## */
This template uses the parser function <code>#ifexist:</code> which is considered an "expensive parser function", only a limited number of which can be included on any one page (including functions inside transcluded templates). When this limit is exceeded, any further <code>#ifexist:</code> functions automatically return false, whether the target page exists or not.
 
   
  +
/* Re-styling basic search to avoid potential overlap issues with non-en languages */
As such, this template should not be expanded to check for more than 95 games. 99 is the default value for expensive parser functions per page; this template uses 1 ifexist call per game, making the theoretical maximum of games 99. A little "buffer" should be given, hence 95 games maximum.
 
  +
div#p-search form#searchform {
  +
background-color: #FFF;
  +
border: 1px solid #000;
  +
box-shadow: 0 2px 5px #000;
  +
margin: 0 auto;
  +
padding: 0;
  +
position: relative;
  +
text-align: left;
  +
width: 249px;
  +
}
   
  +
div#p-search input#searchInput {
Despite of the somewhat generous limit, the template should only be used to check for common or "main" games at the wiki. If an overview page for a certain game does not exist, the template produces a redlink to said page which shows up on [[Special:WantedPages]]. Using the template to check for "fringe" games will hence result in a lot of redlinks.
 
  +
-webkit-appearance: textfield;
  +
border: 0px solid transparent;
  +
border-radius: none;
  +
height: 20px;
  +
padding: 0;
  +
width: 199px;
  +
}
   
  +
div#p-search input#searchGoButton,
===Games the template checks for===
 
  +
div#p-search input#mw-searchButton {
* ''[[Wasteland]]''
 
  +
background-color: #EAEAEA;
* ''[[Fountain of Dreams]]''
 
  +
background-repeat: no-repeat;
* ''[[Wasteland 2]]''
 
  +
border: 1px solid #EAEAEA;
  +
border-radius: 5px;
  +
color: transparent;
  +
font-size: 0px;
  +
height: 22px;
  +
line-height: 0;
  +
padding: 0;
  +
position: absolute;
  +
top: 1px;
  +
width: 22px;
  +
}
   
  +
div#p-search input#searchGoButton:hover,
===Auxiliary templates===
 
  +
div#p-search input#mw-searchButton:hover,
* {{tl|Abblink}}
 
  +
div#p-search input#searchGoButton:active,
* {{tl|Navbox}}
 
  +
div#p-search input#mw-searchButton:active {
* {{tl|Overviewpagelist/aux}}
 
  +
background-color: #DFDFDF;
  +
border-color: #666;
  +
}
  +
  +
/* FIXME: IE7 fallback image & image optimization */
  +
div#p-search input#searchGoButton {
  +
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAArElEQVR42mL8z4AfAAQQEwF5BoAAwqKAC2goFxcnAxcQMjAABBALNl2c/78zMoClGRgAAgirFYxgUxjYQWyAAGL8D+FgAd8YQSRAAKGY8B/DLQwMAAHEhGo0qiKQEoAAYoIJ/QfT/zEUAQQQE0wfIxBCpBEmgVwBEEBMCMNhJKojAQKI8T+WgAKZ9A2qGiCAcITDN3hAAQQQE+4QgACAAGIkFJsAAUQwNgECDAAA/x1oEOzraQAAAABJRU5ErkJggg==");
  +
/* background-image: url() !ie; */
  +
right: 26px;
  +
}
  +
  +
/* FIXME: IE7 fallback image & image optimization */
  +
div#p-search input#mw-searchButton {
  +
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAABAklEQVR42mJkwASeQKwHxL+A+CgQn2LAAwACCBnJAfFPIP6Php8CMQsuTQABBENNSBo+AfFCIN4IxH+hYn+AmAubRoAAgiGYzQvQxEE2n4fKncemESCAQMgLyWZsgAvJdSLokgABxAQNMBDYjsOAb0D8FsrWQZcECCCQAd+hbEE8XuRA8ioKAAggENJHciIHAXkMABBAMHQTquAZECsgiVsjxcQCbBoBAgjZiZ+RbPoFjTrk9PAEiFXRNQIEEDJiB+KtaJpAhkwF4g9IYguRNQEEEC4EskkRiW+CZjDcEIAAIgWtQzNkGUgQIIAoNcQLIIDIMWQ1crQCBBC5yBvGAAgwAB5eSoy/GXiXAAAAAElFTkSuQmCC");
  +
/* background-image: url() !ie; */
  +
right: 2px;
  +
}

Revision as of 15:21, 21 March 2012

/* ################################################## */
/* ### PERMANENT                                  ### */
/* ################################################## */

/* Mark certain namespaces & pages in RC */
body.page-Special_RecentChanges #bodyContent a[href^="/Help:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/Help_talk:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/MediaWiki:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/MediaWiki_talk:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/Portal:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/Portal_talk:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/Template:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/Template_talk:"], 
body.page-Special_RecentChanges #bodyContent a[href^="/The_Vault:"],
body.page-Special_RecentChanges #bodyContent a[href^="/The_Vault_talk:"],
body.page-Special_RecentChanges #bodyContent a[href^="/User:PorterBot"],
body.page-Special_RecentChanges #bodyContent a[href^="/User:PorterBot"].mw-userlink,
body.page-Special_RecentChanges #bodyContent a[href^="/User:Porter21"],
body.page-Special_RecentChanges #bodyContent a[href^="/User:Porter21"].mw-userlink {
   font-weight: bold;
}

body.page-Special_RecentChanges #bodyContent a[href^="/User:GhostAvatarBot"].mw-userlink,
body.page-Special_RecentChanges #bodyContent a[href^="/User:PorterBot"].mw-userlink {
   color: darkOrange;
}

body.page-Special_RecentChanges #bodyContent .va-genericbox a {
   font-weight: normal !important;
}

/* Standard font on user talk pages */
body.ns-3 #bodyContent font {
   font-family: sans-serif !important;
}

/* Remove ads */
div.atflb, div.btflb {
   display: none;
}

body.page-Wasteland_2_Wiki div.atflb,
body.page-Wasteland_2_Wiki div.btflb {
   display: block;
}

/* ################################################## */
/* ### TEMPORARY                                  ### */
/* ################################################## */

/* Re-styling basic search to avoid potential overlap issues with non-en languages */
div#p-search form#searchform {
   background-color: #FFF;
   border: 1px solid #000;
   box-shadow: 0 2px 5px #000;
   margin: 0 auto;
   padding: 0;
   position: relative;
   text-align: left;
   width: 249px;
}

div#p-search input#searchInput {
   -webkit-appearance: textfield;
   border: 0px solid transparent;
   border-radius: none;
   height: 20px;
   padding: 0;
   width: 199px;
}

div#p-search input#searchGoButton,
div#p-search input#mw-searchButton {
   background-color: #EAEAEA;
   background-repeat: no-repeat;
   border: 1px solid #EAEAEA;
   border-radius: 5px;
   color: transparent;
   font-size: 0px;
   height: 22px;
   line-height: 0;
   padding: 0;
   position: absolute;
   top: 1px;
   width: 22px;
}

div#p-search input#searchGoButton:hover,
div#p-search input#mw-searchButton:hover,
div#p-search input#searchGoButton:active,
div#p-search input#mw-searchButton:active {
   background-color: #DFDFDF;
   border-color: #666;
}

/* FIXME: IE7 fallback image & image optimization */
div#p-search input#searchGoButton {
   background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAArElEQVR42mL8z4AfAAQQEwF5BoAAwqKAC2goFxcnAxcQMjAABBALNl2c/78zMoClGRgAAgirFYxgUxjYQWyAAGL8D+FgAd8YQSRAAKGY8B/DLQwMAAHEhGo0qiKQEoAAYoIJ/QfT/zEUAQQQE0wfIxBCpBEmgVwBEEBMCMNhJKojAQKI8T+WgAKZ9A2qGiCAcITDN3hAAQQQE+4QgACAAGIkFJsAAUQwNgECDAAA/x1oEOzraQAAAABJRU5ErkJggg==");
   /* background-image: url() !ie; */
   right: 26px;
}

/* FIXME: IE7 fallback image & image optimization */
div#p-search input#mw-searchButton {
   background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAABAklEQVR42mJkwASeQKwHxL+A+CgQn2LAAwACCBnJAfFPIP6Php8CMQsuTQABBENNSBo+AfFCIN4IxH+hYn+AmAubRoAAgiGYzQvQxEE2n4fKncemESCAQMgLyWZsgAvJdSLokgABxAQNMBDYjsOAb0D8FsrWQZcECCCQAd+hbEE8XuRA8ioKAAggENJHciIHAXkMABBAMHQTquAZECsgiVsjxcQCbBoBAgjZiZ+RbPoFjTrk9PAEiFXRNQIEEDJiB+KtaJpAhkwF4g9IYguRNQEEEC4EskkRiW+CZjDcEIAAIgWtQzNkGUgQIIAoNcQLIIDIMWQ1crQCBBC5yBvGAAgwAB5eSoy/GXiXAAAAAElFTkSuQmCC");
   /* background-image: url() !ie; */
   right: 2px;
}