User blog:Taldin/Reporting On Portable Infoboxes

For folks who have gotten fairly elbow deep into Wikia editing, infoboxes are a way to provide a quick encapsulation of the information on a subject entry. An infobox has predetermined fields that are set in their template.

Recently, the Wikia programmers added a new type of Infobox, the Portable Infobox, that all normal Infoboxes should be converted to, since the original infobox type didn't render well on mobile devices.

The Basics: Infoboxes for Anyone
To add an infobox to a page, you create a Wikia directive using double curly braces, and create an Infobox entry from there. Each named field is separated from its value by equal signs.

For example:

Results in:

Certain fields are optional; they may have a default value, or the field may not appear at all if a value is not supplied.

The Infoboxes are listed here: Infobox List

Advanced Topic:Adjusting to the (New) Infobox Templates
While anyone can use an existing infobox, changing them requires a little more finesse.

I've recently converted the templates over to the new Portable Infobox version. Normal pages still more or less use the same syntax; the bigger changes are on the template definition pages and some additions to the CSS page, which can only be done by an admin.

On an individual topic page:
{{Template:infobox class ...
 * If your infobox call looks like this:

Change it to this: {{infobox class ...

On the template page:
Infobox authors are Wiki authors who are savvy enough to understand how infoboxes work. (Except the way that infoboxes work has been changed.)

The most noticeable change is on the Template page. Originally, infoboxes used Wikia markup language (the double curly braces thing ).

The new version uses HTML-style angle brackets (< >):

Unknown Considerations

The following primary keyword tokens are the ones used by infoboxes:
 * - Denotes the start and end of the infobox definition.
 * - Sets the title of the infobox.
 * - Sets an image to be contained in the infobox.
 * - Defines an item that is designed to be replaced by a Wiki autho input on a page.
 * - Header items that separate sections. These cannot be changed by the infobox user.
 * - A label to use in place of the data source name.

The, , and tokens all take the argument "source=keyword", where keyword will be matched to the infobox values specified in the individual Wiki page. In addition, if you have the text_string construct inside the tokens, it will be printed if the topic author doesn't provide a value for that keyword. (The old infobox used a #if construct.)

On the CSS page
Only Wikia Admins can change the Special:CSS page. There are no style sheet rules for portable infoboxes in the base Wikia definition for Habitica; for the translated Wikias, an Infobox that is converted without changing the CSS will come out without the orange header and section bars, and no border.

Just copy and paste these lines near the bottom of the CSS page: portable infobox additions ===========================*/ .portable-infobox { border:1px solid gray; background-color:#eae7e4; padding: 4px; } .pi-imagecaption { text-align:center; } .pi-title { text-align:center; color:white; background-color:#d94e2b; } .pi-secondary-background { text-align:center; color:white; background-color:#d94e2b; }

Converting an Infobox to the Portable Infobox
While I'll be converting all of the main (English) Wikia pages to Portable Infoboxes, the foreign language translators may be doing this on their own.

Follow these steps: 1. Edit the CSS page as shown above. 2. Go to [this page], and click on the link for the Infobox. 3. On the right side of the Infobox page is a Migrate this Infobox dialog and a Generate Draft button; click the button.

4. The Wikia generates a draft page in a new tab, which contains a script-generated version of the original Infobox, with fields carried over, but no formatting or headers.

5. Switch back to the (old) Infobox page, and click the Edit button to open the editing page for the Infobox. You may need to switch to Source View.

6. Transfer any missing information to the new Portable Infobox page. (For example, for the Infobox Location, I had to add the Header "Vital Statistics" back in.)

7. Change the autogenerated "This is a test" items to meaningful data values to test how well the new infobox works.

8. Save the Draft copy and see how it looks. For safety's sake, you can edit one of the subject matter Wikia pages that uses that Infobox, changing 'Infobox' to 'Infobox/Draft', so only that page uses the new draft Infobox test. (Don't forget to change it back when you're done.)

9. When you're done making changes, click the 'Approve This Draft' to move the infobox to the main page.

Please feel free to ask me questions about this process in the notes section.