Wiki Code with HTML & CSS / Project Templates

2 replies [Last post]
Aecarus's picture
Aecarus

This is less Spiral Knights related, and more technical on the Wiki side of things.

I've heard in the past that it's typically frowned upon to use HTML on Wiki pages. However, is it acceptable to use HTML for templates? I've been looking through a lot of templates and many of them have HTML elements. In fact, some templates are almost completely built from HTML (aside the {, }, |, and |- combinations for table creation).

Furthermore, is it acceptable to construct (the functionality of) templates purely from HTML? The code, as I have seen, can get horrendous, and since Wiki Code is overly sensitive to whitespace, it makes organization (e.g. indentation) impossible without rupturing the layout of the page itself. :s

For example: is it possible to surround an entire template, built from HTML, with the "nowiki" tag, and only "un-tag" necessary pieces (e.g. variables and logical statements)? This (I'm assuming) would make indentation allowable, since the whitespace will actually be within the "nowiki" tags and not be rendered. Would this also make CSS allowable? For example, if we have a certain type of table cell we use multiple times, instead of making a new template/page for it, could we not just utilize the almighty power of CSS classes? (Usually the CSS reference/tag goes in the header of an HTML file, so I'm not sure how it would work on a wiki template page...)

I'm not sure if anyone else shares the same "frustration" as I do. I'd just like to be able to consistently create templates without having to worry about the sensitivity Wiki Code shows with whitespace. (Admittedly, this could get a bit tricky with logical statements and other Wiki-specific components, but I'm sure there ways around it which could prove to be much cleaner than the original pure-Wiki Code version would have been anyways. :/ )

I'm relatively new to this Wiki stuff, so maybe I'm just missing something?

Any thoughts? Ideas? Suggestions? (Equinox? xD )

Thanks. :)

Equinox's picture
Equinox
Game Master
Generally we use wiki markup

Generally we use wiki markup whenever wiki markup for something exists. HTML isn't frowned upon.

There is no creating your own CSS for individual pages on the wiki. The CSS used on the wiki is only edited by those in Three Rings with admin access. It's not going to be something that will be edited for each individual user's desires for their userpage, but I am open to suggestions that have broad wiki use. However, using templates is easier on a wiki because you can tell what uses the template and therefore what may be affect by what change either to the wiki skins, MediaWiki plugins or even a MediaWiki upgrade. For a number of templates with tables, we don't use CSS because the table code has variables as part of the template.

The key thing to remember is that this is a wiki meant to document information. It's not a web host where you use a ton of markup. Visuals are here in support of encyclopedic-style information; rather than this just being an exercise in design, it is meant to be a practical, user-friendly information source.

I previously came from a web background with no wiki experience until about 6 years ago. After getting used to it, I have found that wiki markup has certain charms in being more accessible to those not familiar with any sort of code. Even with the simplification, there is still a fair hurdle for users shy to give wiki editing a try.

Surrounding a template with nowiki tags will make the wiki not render any markup (both wiki and straight HTML). I think my real question here is what is it that you are trying to do?

Aecarus's picture
Aecarus
Thanks for the quick reply!

WARNING: Before you scroll down through the following massive wall of text, please be sure to place any fragile kitchenware you might be holding on a flat, stable surface.

 

Thanks for the quick reply! I forgot I posted this, and probably should have made some corrections after gaining more experience with Wiki Code over the past couple of hours. Sorry about that... :X

(Yes, I recently realized that using the "nowiki" tags results in no rendering at all... heh. That idea is garbage anyways.)

But aside from that and my nonsensical blabbering about CSS:

To be precise about what I'm trying to do: well... I guess that would be better answered with a question:

Do you suggest that we make new templates whenever there is a repeated "chunk" of code (sort of like a function)? For example, with a certain heavily-formatted table cell which is used multiple times in a table, you could end up with a huge piece of repetitive code. However, with a good template that contains this code only once (and parameters representing the parts of the code that might change depending on the given information), the original code would only contain several instances/references of the template, and the varying parts being passed to it, as parameters.

That being asked, is there any "limit" on how many templates we should have?

For now, I've only been working on simple userpage-related templates. I figured this would be the best thing to practice on, since if I mess up nobody is going to care. Once I get used to things there, and fully grasp the art of Templates, I'll be able to confidently make actual-useful changes to the informative part of the encyclopedia.

Also, I'm sure I have a few more questions - I'm just not sure what they are yet. They'll probably come around to me when I run in to the issue at hand, and I'll post them here.

                                                                                  ~ o ~ O ~ o ~

Edit:

Equinox, I have another question totally aside the template one, for when you're willing...

I'm seeing a lot of inconsistencies in pages that should be relatively consistent, such as Swords, Armors, and especially Materials. For example,some Swords have a Damage table, some don't; some have a Set table, some don't; etc. This is probably because there are so many different users contributing at different times with different considerations, and many with little understanding. I think a lot of Wikis use "Projects" and "Project Templates" (not a literal wiki template) to tackle these sorts of problems. Is there any way we could, over time, develop something similar?

For example, a project template for Weapons might look like:

  1. Basic Attack
  2. Charge Attack
  3. Damage
  4. Vendors
  5. Recipe
  6. Alchemy Path
  7. Set
  8. See Also

And from the actual, more-detailed template users/contributors would be able to add/modify the information in each section.

If you're wondering where the "Description" section went: I think the solid, factual information from the game itself should go in the Wiki box on the right-hand side of the page, whereas user descriptive/experiential information should go elsewhere. (Right now this includes all of it, except the "Description".) That's just me, though...

We could have a banner at the top/bottom of the page basically stating that the article is part of, say, "Project Weaponry", or "Project Trinketry" ( XD ).

I'm thinking that all of the articles in the Equipment Encyclopedia can each be categorized into groups similar to the links shown on the main page: Gear (Armor, Helmets), Weapons (Swords, Handguns, Bombs), Shields, Trinkets, and Accessories. Each of these groups are distinct enough from each other that their "Project Templates" would also differ. This is the reason I have grouped Armor and Helmets together, because they are essentially the same thing if you ignore the aesthetic placement. The same goes for each of the weapon types - though bombs are slightly different, we could just ignore the "Basic Attack" section as an "exception".

If we had these "Projects", and banners/templates to go with them, we could start sifting through the pages of equipment, refining them, and adding the banners once they have been refined. For some pages this could be fairly quick, and for others it could take a while.

I suppose you could say that the underlying principle of this "Projects" idea is to get all similarly-structured articles to be consistent with each other. But when I think about it that way, I wonder if this is all just my "obsessive compulsiveness", or something that the general public would enjoy as well? If the former is the case, please let me know if there's something else I can work on, so that I feel like I've at leastdone something useful. :s

Also, sorry if I made you spill your cup of coffee over this massive post. :S (Maybe I should put a warning at the beginning of the post...) I'm just in the mood for some solid contributions, but I feel like there's some other things that would best be taken care of first. That is, if this Project idea goes through, it would probably be best to get it set up before a new release of equipment comes out so that we don't need to convert all of the new articles as well, but can instead start directly from the corresponding project template.