Making a GBAtemp wiki entry properly

Discussion in 'Site Discussions & Suggestions' started by the_randomizer, Nov 7, 2016.

  1. the_randomizer

    the_randomizer The Temp's official fox whisperer

    Apr 29, 2011
    United States
    Dr. Wahwee's castle
    So, I've been trying to make a Wiki entry for Snes9x on the Wii U for the past while, but I seem to have hit a few snags, which is admittedly proving to be quite annoying. See, I tried to use a template from the Wii U VC injection wiki entry

    {{ Table Start/WiiU VC Snes Inject}
     {{ WiiU VC SNES Inject | name = ... | region = USA/EUR/JAP | host = WiiU VC | status = Doesn't Work/Works/Issues | notes = please add a note if needed}}
    {{ Table End}}
    However, the problem with borrowing other wikis' template and trying to adapt them as my own, even after changing that "host" column to "version" (for the emulator), the "host column is still there, showing up. I can't change the WiiU VC inject portion of it either, as it breaks the table.

    What I'm trying to do is changing it to adapt my own format like so:

    {{ Table Start/Snes9x WiiU }
     {{ Snes9x Wii U | name = ... | region = USA/EUR/JAP | version = 0.01 | status = Doesn't Work/Works/Issues | notes = please add a note if needed}}
    {{ Table End}}

    What happens though, is no table is created, but it says the text, along with the words "template" in red text, but no tables, no boxes, no status colors, etc. It's frustrating and irritating, as I can't for the life of me figure out why it doesn't work and I need help.

    I tried calling the entry something like, and that doesn't seem to create proper tables either. What am I doing wrong? Why doesn't changing the table template work, is it simply something that I'm missing?
    migles likes this.
  2. raulpica

    raulpica With your drill, thrust to the sky!

    Oct 23, 2007
    PowerLevel: 9001
    I know the right guy for this: @Cyan :P
    the_randomizer and Cyan like this.
  3. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    Oct 27, 2002
    Engine room, learning
    Hello, here I am !!
    thank you for notifying me.

    So, your problem is that you are trying to edit template names and hoping them to still act the same way.
    in fact, the template is another wiki page called interactively, so that page needs to exist.

    "Table Start/random name" is actually a page name. a page to a template that should be created (before or after you call it, but it's best to create it before in my opinion).
    If the template does not exist, it's template name is written in red on your page calling it.

    It's doing the same exact thing with
    {{ Snes9x Wii U | name = ... | etc.

    The first part is a template name "Snes9x Wii U" template page should exist before it can be called and "inserted" into your page.
    that "first part" of the line is not automatically generated based on your current page name, or just by using a random name and expecting the "name=" to be the column for the game name.

    in the template, you have to generate a schema of your table's line.

    in the "table header" template, you create a table header.
    instead of writing
    {|table css 
    ! column css | column 1's name
    ! column css | column 2's name
    ! column css | column etc's name
    it's just easier and cleaner for the end user who don't know this wiki language to just write {{table header}} and he don't need to care what it really does.
    in fact, writing {{template name}} is inserting the content of that template page into your page at that position.

    So, you create a template page:

    example with "retroarch"

    :!: THIS IS JUST AN EXAMPLE. please, do not edit this page if you don't really want to make a global multi plateform and multi core retroarch page on the wiki.

    1. create the page template which will be used for the table header

    this one is very important, this is where you define the number of column you need and their names.

    inside, write the code for a table start:
    {| class="compatibilitytable sortable"
    !style="width:30%"|Game Name
    !style="width:40%" class="unsortable"|Notes
    2. No need to create a the template page for the table footer, as it's the same for all tables :
    this code closes the tables.

    3. Create the template for your table's line.
    This is the hardest step !

    This is where you define the variable's name, for example :

    This MUST NOT necessarily match the column's name.
    You can make the table header with the first column named "Game's title" and have the variable "name=" located in the first column.

    So, you need to create the template page.
    let's say we want the user to write something short but easy to identify on your compatibility list page : {{ RetroWiiU | name=.... | region=.... etc. }}
    you create the template named "RetroWiiU" like this

    you need to know that one table's line looks like this :
    |- new line
    | column 1 
    | column 2
    | etc.
    | ....
    | last column

    When the user write "name=Mario kart" you want the text "Mario kart" to be displayed in the first column, so you need to write this varible name "name" in your template :

    | {{{name}}}

    you want that the user write console=SNES then the 3rd column has the "Snes" test, you add the "console" variable's name into your template.
    the final version should look like this:
    | {{{name}}}
    | {{{region}}}
    | {{{console}}}
    | {{{version}}}
    | {{{note}}}

    you now have your 3 templates : header, lines, footer.

    You can create a page for the compatibility list :

    on that page, you call your template's names to insert them on your page:

    {{ RetroWiiU | name=Game1 | region= EUR etc. }}
    {{ RetroWiiU | name=Game2 | region= USA etc. }}
    {{ RetroWiiU | name=Game X | region=.... etc. }}

    This is just an example !
    do not create this page with this name.
    like you see, I create the table start as "retroarch", while the compatibility page is named "RetroWiiU compatibility list". At least, I used in this example the same name of the compatibility page than the table's line template's name (RetroWiiU).

    that's only a quick example, this will only create a basic compatibility page, without colors or pictures.
    There are a lot of other features and function available to make a nice wiki page.

    if you need more help, let me know, I made a better tutorial in PM few weeks ago, I can paste it here so everybody can enjoy it.
    the_randomizer and migles like this.
  4. the_randomizer

    the_randomizer The Temp's official fox whisperer

    Apr 29, 2011
    United States
    Dr. Wahwee's castle
    Thank you @Cyan, for the explanation, I didn't know what was wrong, and now I know. Hopefully I can make sense out of this and actually make a proper wiki entry for this emulator. And yes, pasting that tutorial will be a great help for me and any who wish to do the same :)
  5. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    Oct 27, 2002
    Engine room, learning
    like I said, it's only a quick explanation of your error. It's not a good properly written tutorial, so it may be hard to understand.

    I will see if I can put my previous private tutorial here, I hope there weren't any personal info in it.
    the_randomizer likes this.
  6. the_randomizer

    the_randomizer The Temp's official fox whisperer

    Apr 29, 2011
    United States
    Dr. Wahwee's castle
    No worries, do what you can to copy the tutorial, take your time.
  7. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    Oct 27, 2002
    Engine room, learning
    Ok, I will post the guide in multiple messages. That's a little long to read, but it should be well detailed.
    For your information, VoxelStudio wanted to create a Compatibility page for PSVitamin, and one for MaiDumpTool.
    Based on his informations, I suggested to make a single compatibility page with both loading methods on the same table.
    So you will read mention about PSVita and MaiDumpTool, and other Vita related informations. But with a real exercise it should be easy to follow and create your own wiki page on that model.

    Past of my Private conversation,
    let's make it public to help a lot of people.


    Of course it's possible and we are even encouraging users to use the wiki more often instead of using the forum's first post to maintain a compatibility list.
    But probably like you, a lot of users don't know anything about wiki, and are afraid of using it.

    That's great that you could create the page yourself :)
    I see you use a full table format on your compatibility list page, for each game's Letter you have this :

    {|start table
    |table header
    |- line
    | cell
    | cell
    | cell
    |- line
    |} end table

    if you look at some compatibility, there are other methods to input the data, called template.
    that's accessible to everyone, but you need to create the template before being able to "call" it.

    The template is called like this :

    {{Template name | option 1 | option 2 | ... | option n }}

    the option can be either numbered, or named.
    usually, we give them name, as it's easier for everyone, for example :
    {{template name | option name | option name | etc. }}

    by defining the "option name" to something logical, for example "region" or "version" or "works" or "note", then it become easier to add new data to a table.

    {{PSVitamin | region = PAL | note = good game | version = 1.0 | works = yes }}

    The advantage using names is that the end user (adding a line in the compat list) can write them in any order.

    The harder work is left to you : create the template.

    here is an example :
    if you click Edit, you'll see some codes you usually don't use on wiki.
    it's using a condition/loop basic language.
    if template name == this, do that, etc.

    But for the moment, you don't need to learn it.
    what you want is a simple template :

    | {{{name}}}
    | {{{region}}}
    | {{{version}}}
    | {{{works}}}
    | {{{note}}}

    and that's all you need in your template.

    now on your compatibility list, replace all

    {{PSVitamin | name = Conception 2 | region = USA | version = 2.0 | works = Works | note = }}

    5 line become a single one.
    the template is only a single line in the table, you still need the table header and footer :
    {| table header
    {{template | bla | bla}}
    {{template | bla | bla }}
    |} table end

    the {{{name}}} will be replaced by the value of your option called "name"
    the {{{region}}} will be replaced by the value of your option called "region" etc.

    that's all for the moment about the templates.
    try to replace your current compat list with a simple templates.
    We can see advanced format later (with condition and mtuli choices, like the one used by Loadiine)

    About the navigation bar your asked in your message, it's a special option to "pre-create an empty page with some data already written".
    if the page doesn't exist, the link is red. When you click on a red link, usually it tells you "the page doesn't exist, but you can create it by starting writing it"
    with the "page template" option, clicking on a red link generate an empty layout where you have to fill the missing info (homebrew name, release link etc.)
    we will see that later. it can be done anytime.

    About the "PSVitaNav" template, you also need to create it before being able to insert it on a page.

    Edit a page :
    look at the bottom, there is a list of used templates.
    click on "WiiuNav" template link, and you'll see the template page.
    editing that template page let you create your own "navigation menu".

    again, you can notice that this navigation menu is based on another template : navBox.
    navBox, etc.
    the wiki is based on many nested templates to make it easier to generate a nice looking page.
    instead of re-writing a table code every time, we just call "nav" and it creates a navigation menu based someone else's work.
    the_randomizer likes this.
  8. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    Oct 27, 2002
    Engine room, learning
    *** part 2 ***

    Just a note before starting :
    I think it's best to use the same page for compatibility lists on the same loader, even if it's using different dumper.
    If compatibility is different, maybe you'll want to use a different column for each dumper?

    The compatibility is based on the dumper only ? not on the plugin or the way to install the game, or the game itself?
    if that's the case, I would write the columns differently :

    name | region | Vitamin dumper | MaiDumpTool | note

    game name | EUR | Works | Doesn't work | Works with Vitamin dumper 2.0 only.

    You will want the version too, so you can make options for that :
    {{PSVTM | name = game name | region = EUR | VTM_version = 2.0 | VTM_Compat = Works | MDT_Version = 1.0 | MDT_compat = doesn't work | note = works with Vitamin dumper 2.0 only. }}

    Notice that I renamed to template name to "PSVTM" (short for ViTaMin) so it's faster to write.
    to do that, create the template on a page named "PSVTM" instead of "Vitamin"
    just pick the one you prefer. there's no rules on template names, just try to avoid conflict with future needs.

    The table will look like this :
    - name will be green (because it works with at least one dumping method)
    - region, will display a flag picture
    - Vitamin colum will display a "2.0" over a green background, because you gave it values "2.0" and "works"
    - MaiDumpTool column will display a "1.0" over a red background, because you gave it "values v1.0" and "doesn't work"

    Do you think it's good ?
    You shouldn't use different wiki page for the same loading method.
    it's like if we used different compatibility page for multiple Loadiine version (loadiine 4.0, loadiine GX2, Loadiine SmashBros mode, Loadiine Disc mode, etc.)
    All on the same page is better for the user to quickly see which Vitamin dumping tool works or not and know which one he has to use to play this game.

    So, what you'll want for your compatibility list is color !
    currently, the user need to write the color code manually (to make it easier, it's using class css instead of raw #xxxxxx color code).

    The class "ct-works" will make the cell green. the class "ct-broken" will be red etc..

    What is great with the template is that you can check values and condition to write what you want on the page.
    For example, if the user write "works = yes" then you can make the line use the class "ct-works" automatically.
    the user don't need to be annoyed with editing the class to match the compatibility result.

    you can compare any "option name" anywhere in the template.
    for example, your table's line will look like this :
    (I'm using your current columns names)

    | class = ct-xxxxxx (whether it works/broken/issue) | {{{name}}}
    | {{{region}}} Region (EUR/USA/JAP/KOR/CHN)
    | {{{version}}} Vitamin Version Game was Dumped With
    | class = ct-xxxxxx (whether it works/broken/issue) | {{{works}}}
    | {{{note}}}

    so you want to replace the "xxxxxx" part based on the "works" option.

    pseudo-code :

    switch ( {{{option named works}}} )
    case : works
    write works
    case : issues
    write issues
    case : doesn't work
    write broken
    write noresult

    It's using a switch on the "works" option value.
    if "works" option is "works" then it write "works" (that's confusing because you used the same name for multiple things), and the class become "ct-works"
    if "works" option is "issues" then it write "issues" and the class becomes "ct-issues"
    if "works" option is "doesn't work" then it write "broken" and the class become "ct-broken"
    at the end, of the line, it replaces "name" with the "name" option value (the game's title)

    Converted to actual wiki code, the first line will look like this:
    | class="ct-{{#switch:{{lc:{{{works}}}}}|works=works|issues=issues|doesn't work=broken|noresult}}" |{{{name}}}

    using "works = works" or "works = doesn't work" is not the best option name choice I think.
    You could use a different name, like "compat = works | issue | doesn't work"
    Or, you could use the dumper name "Vitamin = works" and "Mai = Issue"

    I'm posting this right now, I'll make a new post to explain condition and make the proper column colors with multi compat colum, like loadiine is using.
    the_randomizer likes this.
  9. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    Oct 27, 2002
    Engine room, learning
    *** Part 3 ***

    If you look at loadiine, there are different compatibility :
    the game can work with SSBB mode but not work with Miimaker.

    the compatibility list reflect that using this :
    if at least ONE of SSBB or MiiMaker works, then the game name is marked as working
    if at least ONE of SSBB or MiiMaker has issue, then the game name is marked as issue
    if at BOTH of SSBB and MiiMaker are none working, then the game is marked as not working.
    else mark the game as no result (grey color)

    what we need is to check conditions.
    I'll using VTM (vitamin) and MDT (MaiDumpTool) names.

    if (VTM == works) write works
    else if (MDT == works) write works
    else if (VTM == issue) write issues
    else if (MDT == issue) write issues
    else if (VTM == doesn't work) write broken
    else if (MDT == doesn't work) write broken
    else write "no result"

    to do that, we check if an option is equal to something.
    if equivalent : this | this | then do that | else do that
    if equivalent : {{{option name}}} | value that you check against | then write that to the page | else run this part }}
    {{#ifeq: {{{VTM}}} | doesn't work | broken | else ..... }}

    as we are checking "doesn't works" and not "DOEsn't WoRks", we need to make it a lower case check.
    if the lowercase version of {{{option name}}} matches "works", then write "works"
    lowercase is {{lc: STrInG hEre}} will become "string here".

    {{#ifeq: {{lc: {{option name}} }} | works | works }}

    if (lowercase(option name) == "works") write "works"

    here is the actual wiki code :

    | class="ct-{{#ifeq:{{lc:{{{VTM_compat}}}}}|works
    |{{#ifeq:{{lc:{{{VTM_compat}}}}}|doesn't work
    |{{#ifeq:{{lc:{{{MDT_compat}}}}}|doesn't work
    }}}}}}}}}}}}" |{{{name}}}

    that is covering the "name" column.
    to do it for the other column it will mix two different option name :
    1) the dumper version and
    2) the compatibility for that dumper

    if a xxx_version is filled, display that version, else write "no result"
    if a xxx_compat is filled, set the proper color, else use gray color
    if you want to push it even more, you can check if the user set a compatibility (it has a color) but without a version number of the used dumper, in that case instead of "no result" text, you could replace it with "unknown version", or "N/A" or "?"

    I let you do this yourself?
    if you need help, I'll be there.

    useful links:
    template help:
    condition options : (not used, prefer the parser function which are easier to work with)
    parser functions :
    the_randomizer likes this.
  10. the_randomizer

    the_randomizer The Temp's official fox whisperer

    Apr 29, 2011
    United States
    Dr. Wahwee's castle
    Thank you again, man, I'll thoroughly read these steps and learn as I go :)
    Cyan likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice