Difference between revisions of "Template:Infobox Family"

From BattleMaster Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<includeonly>{{#get_web_data:url=http://battlemaster.org/data/family.php?{{#if: {{{1|}}} | ID={{{1}}} | Name={{{2}}} }}|format=XML
+
<includeonly>{{#get_web_data:url=https://battlemaster.org/data/family.php?{{#if: {{{1|}}} | ID={{{1}}} | Name={{{2}}} }}|format=XML
 
|data=name=name,fame=fame,wealth=wealth,homeRegion=homeRegion,homeWorld=homeWorld,
 
|data=name=name,fame=fame,wealth=wealth,homeRegion=homeRegion,homeWorld=homeWorld,
 
}}
 
}}

Revision as of 08:10, 7 February 2021

Template-info.svg Semantic Coded Template
This template contains semantic coding. Do not use this template for anything other than its intended purpose.
Template-info.svg Template Documentation
This documentation is transcluded from Template:Infobox Family/doc.

ExamplesSandbox

Intro

This template uses the BattleMaster external data API to grab your family data from the game database and display it on a wiki page. That way you don't need to continually update your family data on the wiki every time something changes.

Usage

The most basic usage of the template is to provide only the your family ID number. You can get this by viewing your family history page and looking at the page URL, like this:

https://battlemaster.org/UserDetails.php?ID=14094

The family ID is show after the "ID=" part. In this case it's 14094. Substitute this into the template, using the inline format, like this:

{{Infobox Family | (ID) }}

and you get:

{{Infobox Family | 14094 }}

Usage of the player ID number is preferred, as it uses less server resources than using the family name. If, however, you cannot for some reason get the character ID number (if, for example, you got the family name from another template), then you can use the family name, like this (note the extra pipe (|) character):

{{Infobox Family | | (Name) }}

Like this:

{{Infobox CharData | | Indirik }}

Colors

You can optionally specify background colors by adding extra parameters on the end. Make sure you add extra pipe characters as needed, as shown below.

{{Infobox Family | 14094 | | grey | blue | green }}
{{Infobox Family | | Indirik | #eeeeee | #dddddd | #cccccc }}

Experiment with the different colors to get the effect desired.

Graphics

You can optionally include a graphic to be displayed between the family name and the statistics. The image must be uploaded to the wiki, you cannot use external graphics. Note that if you use a wide graphic, the entire box will be as wide as the graphic, and may look awkward. If you have a large graphic, you may not want to include it as part of the infobox. To add the graphic, and an optional caption, include the image name (only the name, do not include the "Image:" part) and caption as additional parameters after the colors.

Note
If you add a graphic, you must specify background colors, or all the backgrounds will be white.
Note
The default colors for the infobox, in order, are: |#eee|#cce|#ddf|

Example:

{{Infobox Family | (ID) | | (BottomRightColor) | (BottomLeftColor) | (TitleColor) | (ImageName) | (Caption) }}
{{Infobox Family | 14094 | | #eee | #cce | #ddf | HouseIndirikCrest.png | Family Crest }}