Characters How They Are Built

From GreyPages

Jump to: navigation, search

Contents

Babble

Welcome all to what shall hopefully ONLY be a Cheatsheet for how I built the character pages around these parts. I intend some credits of course but I can only credit what I know.

Ingredients

Extension:BoilerplateSelection
Template:Boilerplate
Template:<something>
Template:<something>Stub (can instead say 'Rough' or 'Draft' or even just 'PhaseOne' I use 'Stub' because I don't have article Stubs.)
Time to Waste

Recipe

[Go here for BoilerplateSelection]

Copy the PHP to a file as instructed there, Include the PHP file into your LocalSettings as instructed there.

Build a Template:Boilerplate [can be as simple as '==Preamble==']

Configure the $wgBoilerplateArray as instructed at BoilerplateSelection to have a line like

'<something>' => '<something>Stub',

And make template:<something> and template:<something>Stub

Yes it can be that simple, it just has to be something you'll remember to put into page names... like: Bob (SuperMeh) could have

'SuperMeh' => 'MehStub'

-or-

'SuperMeh' => 'SuperMehStub'

Just don't point it straight at => '<something>' => '<something>' as that's skipping a step in this recipe and this recipe is not high enough order for that. This is a low order recipe. I'm sure there ARE better ways to do it. I don't know them Right This Sec.

Then when you search for -or click Create outright- '<page> <something>' and click create/edit you'll see the stub contents right before you.

You next edit the stub contents before you to change "Template:<something>" to "subst:<something>" and hit save. Rejoice you may now edit further if needed or if you're templating is spot on you're done.

Full Prep

Some may be saying 'But the recipe is a thumbnail!' Right. It is. Here we go.

For the following examples we shall go with 'SuperMeh' to represent a Vigilante that's on both sides of the Law,
and 'SuperMehStub' for the stub article for such Vigilantes. The Character will be Bob. Nice and middle of the road.

I'll not include BoilerplateSelection that's nicely at the mediawiki page. Nor will I make the standard Template:Boilerplate either as that's kinda outside this article. I will present the array update.

global $wgBoilerPlateAry;
$wgBoilerPlateAry = array(
					'SuperMeh' => 'SuperMehStub',
					'Sandbox' => 'Boilerplate');

This is the new line barebones'd to include only the SuperMeh info and the Default Boilerplate. You can add the information in the preceding box right to the bottom of your LocalSettings.php file. Save it and it is pretty much instantly ready for use... save that we haven't BUILT SuperMehStub yet.

Bob (SuperMeh) needs building. But first the Template:SuperMehStub need building. Create/Search For/or Edit(/ or Cheat
*yourwikiurl*/index.php?title=Template:SuperMehStub&action=edit
to accomplish this.

Your stub should include all character sheet details you need. Up to you how you eventually have it LOOK. I'm just showing how it's started. finish at your whim. Let's say our stub should have: Name, Alias, Hometown.

<!-- Remember to change "Template:" to "Subst:" and of course remove this line too -->

{{Template:SuperMeh
| Name                    = Changeme
| Alias                   = Lord Changeme
| Hometown                = Somewhereville, Iowa
}}

There it is. Right there. Note the 2nd line with text. It points to the next template. Save this one. DO NOT CHANGE THE TEXT YET. That's a reminder for when you MAKE a page. If you did it NOW it would subst; the non-existant template, and you'd have to edit. Anywho... Now it points to the next template. Click the red link.

Yes you could Create/Search For/or Edit(/ or Cheat
*yourwikiurl*/index.php?title=Template:SuperMeh&action=edit
to accomplish this. But really the red link helps skip a few steps by not having you type anything.

When you click you're able to build. Say we just want a simple 3 Cell table with no border for this:

<table width="100%" Border=0 cellpadding=0>
<tr>
<th id="nameid"      align=left>Character's Name</th>
<th id="aliasid"   align=center>Character's Alias</th>
<th id="hometownid" align=right>Character's Hometown</th>
</tr>
<tr>
<td   align=left>{{{Name}}}</td>
<td align=center>{{{Alias}}}</td>
<td  align=right>{{{Hometown}}}</td>
</tr>

And that's it. Click Save. You'll see the template and it'll be odd with the keywords/variables surrounded by {}. You can now go to Template:SuperMehStub and get a preview of how it looks with the defaults filled in. Ah Lord Changeme. Such power he has. 'Wait!' you say. 'We don't HAVE a powers section!' Well I think you can guess enough to add one. Just put the '| Powers = Shapeshifting' line before the closing braces (aka }}), and add a Table Header (aka <th id="powersid">Character's Powers</th>) and Table Cell (aka <td>{{{Powers}}}</td>) where you'd like with the alignment you'd like. Maybe you want Name, Alias, Powers, Hometown... just set the alignments to left, center, center, right. Or even remove the alignments entirely. Up to you.

There you have it. The data needed to make "Bob (SuperMeh)" Now all you need to do is:

  1. search for Bob
  2. remove the first line
  3. remove the blank line
  4. edit Template:SuperMeh to subst:SuperMeh
  5. save

And Voila. Bob the Vigilante is built.

Plenty of additions can be made. You could automatically add a category: . You could add colors... formatting... all kinds of things are available to you. I'm very Web 0.005 so you'll forgive me if I stop just before CSS. I have no trouble cutting and pasting 'style data'. Heck I didn't even get into how you can have IF-THEN in Wiki Parsing.

[blink]BUT THAT IS ANOTHER STORY[/blink]

Credits

Sections without an attribution are assumed 'Duh' or 'Dur' because they should be self explanatory OR you can go where they came from for more data. What? I'm Lazy

[MediaWiki]
BoilerplateSelection
[DC Database] - For the character template idea... even if it's a bit hard to follow from just that information
[Wikipedia] - For having many of the help files AND in use examples that MediaWiki lacks.
[Google] - For when the wiki's were being a tad vague.