| Author |
Message |
 |
|
|
 |
|
Advert
|
Forum adverts like this one are shown to any user who is not logged in. Join us by filling out a tiny 3 field form and you will get your own, free, dakka user account which gives a good range of benefits to you:
- No adverts like this in the forums anymore.
- Times and dates in your local timezone.
- Full tracking of what you have read so you can skip to your first unread post, easily see what has changed since you last logged in, and easily see what is new at a glance.
- Email notifications for threads you want to watch closely.
- Being a part of the oldest wargaming community on the net.
If you are already a member then feel free to login now. |
|
 |
![[Post New]](/s/i/i.gif) 2008/09/21 17:02:53
Subject: Army lists, possible solutions and a quest for templates
|
 |
[ARTICLE MOD]
Cultist of Nurgle with Open Sores
|
Hello,
I spend some interesting afternoons reformatting articles. One problem that repeatedly came up was army lists. A lot of articles have them. Everyone writing those encounters a fascinating peculiarity of MediaWiki (which I take this part of Dakka is based on): Normal linebreaks are just treated like whitespaces in HTML. Therefore they do not break the line. Not surprising for an IT guy, but not for sane people.
Anyway, this leads to a lot of strange army lists which are usually rendered as one to five lines.
Like:
Troops: 10 Plague Marines, 2 Meltas, Champ with PF10 Plague Marines, 2 Meltas, Champ with PF10 Plague Marines, 2 Meltas, Champ with PF
I tried to fix this by using nested lists.
* Troops:
** 10 Plague Marines, 2 Meltas, Champ with PF
** 10 Plague Marines, 2 Meltas, Champ with PF
** 10 Plague Marines, 2 Meltas, Champ with PF
or even
* Troops
** 10 Plague Marines, 2 Meltas,
*** Champ with PF
** 10 Plague Marines, 2 Meltas,
*** Champ with PF
** 10 Plague Marines, 2 Meltas,
*** Champ with PF
I like lists for nearly everything, but it does not look that well. Especially since the padding/left-margin for such lists is chosen to be very large, which streches the lists a bit more than necessary. You can see an example here: http://www.dakkadakka.com/wiki/en/Blackmoor_goes_to_the_Las_Vegas_GT_Part_II_(The_GT)#My_army_list
This was just a quick fix.
I thought about tables, but tables are really complicated for most people to use.
(kinda like the following, though I have to look up how to do tables every time)
{|
|-
| Troops
| 10 Plague Marines, 2 Meltas, Champ with PF \n10 Plague Marines, 2 Meltas, Champ with PF\n10 Plague Marines, 2 Meltas, Champ with PF
|}
So I decided to use a template for that.
Which I started here ( http://www.dakkadakka.com/wiki/en/Template:40K_Army_List) - now it is not nice to start a page without knowing whether it will be used, but I couldn't create it in the sandbox alone.
Sadly, it does not work. Yet I built it to the best of my knowledge and it looks like those I use on my page. Maybe $wgNonincludableNamespaces is set?
Kind regards,
Tierlieb
|
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2008/09/21 17:18:00
Subject: Re:Army lists, possible solutions and a quest for templates
|
 |
[ADMIN]
Decrepit Dakkanaut
|
First of all, let me just thank you for the kind work you have put in both here and in the past on our wiki. It is very much appreciated and has gone a long way to improving the site.
The wiki is a little rough around the edges still and is not actually mediawiki, but is about 80% compatible with mediawiki - it is actually running jamwiki. This means that templates are supported, but only to a basic level. Numbered parameters work, but named parameters do not (IIRC).
The single line break not returning a br is indeed annoying, and is a programmatical shortcut in the mediawiki implementation that will fix at some point when time allows.
There are a lot of bad CSS elements in the wiki that I am going to fix soon too, including the image and list padding which is unnecessarily large. Around january there will hopefully be a big update to the CSS to fix all those little annoyances across the site and to standardise things a bit more.
Tables are overly complicated for 99% of users, but from what we have seen from people so far, templates are also too complex for most users too. The articles system is only used by a technical minority of users at the moment, but once the new dakka gallery is up and running we will start tweaking and pushing the wiki a lot more. People are generally used to forums but the wiki format is still quite alien to most. At the centre of that will be trying to get more help and standardisation for army lists/army profiles and your comments will certainly be considered. We are not limited by software at all (I reprogram it all myself down to the lowest level), so anything you can think of at all that is less intimidating than the mediawiki system would be much appreciated!
|
Check out our new, fully plastic tabletop wargame - Maelstrom's Edge, made by Dakka!
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2008/09/22 16:11:18
Subject: Army lists, possible solutions and a quest for templates
|
 |
[ARTICLE MOD]
Cultist of Nurgle with Open Sores
|
Ah, jamwiki. That explains why the wiki is integrated at such a high level. Very nice work.
So I can stop looking for that interesting wysiwyg-editor add-on for mediawiki ;-)
On the issue of complicated templates: I might agree with you. Even my short attempt is a bit bulky. But since you admitted on doing all the coding and your willingness to do so, I see a chance to go totally agile and XP and bottom-up and buzzwordy on you:
What about a specialized handling of army lists? Abstraction may come later, for now we have two simple use cases:
HQ:
Demon prince with wings, mark of nurgle and warp time
Troops:
8 plague marines with 2xmelta, champion with pf
8 plague marines with 2xmelta, champion with pf
8 plague marines with 2xmelta, champion with pf
8 plague marines with 2xplasma, champion with pf and pp
The other one is the equivalent for WHFB, whatever the choices are called there.
One might simply parse this. And that does not involve writing a parser (though there are very, very nice parser generators for Java) or defining an ebnf (though that is pretty easy thanks to the rigid force organization chart), a simple regexp will do the job (well, as simple as this thrice-escaped-java-rexex-stuff is). Just put it in a table (or a set of divs, but I'd say this is table-type data - or an abstract TableTypeDataContainer - I dunno how jamwiki does parsing and if it uses some kind of abstract syntax tree). This way you can combine easy markup with a readable layout like a table.
Shouldn't take more than an hour to whip up a specialized and a more generalized method to parse these cases. In case you're interested in my take on the problem, or you dislike parsing at all, I guess in a month I could find a spare hour to do that.
Kind regards,
Tierlieb
P.S.: In this case, I fear I have to ask you to delete the template page, as it has become unneccessary.
|
|
This message was edited 1 time. Last update was at 2008/09/22 16:13:42
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2008/09/22 20:01:09
Subject: Re:Army lists, possible solutions and a quest for templates
|
 |
[ADMIN]
Decrepit Dakkanaut
|
I was thinking of working on something even more integrated than that. At the moment, the free text field for the wiki is leading to a lot of extremely variable army lists / army profiles going in. About half of them do not have an army list or are missing sections, and people are afraid to even delete headers due to their lack of wiki knowledge, so even the best parser would not be able to cope with about 30% of the army lists. I was thinking more along the lines of a completely separate interface for army profiles, with one for each major game. This could then generate some pretty wiki code in the background and create an article out of it, and in a similar way to that which you describe could also attempt to parse the other army lists that exist already into that user friendly interface with some degree of success if I add some hidden annotation to the output.
The jamwiki parser is based around jflex which is simple enough but is integrated in a somewhat clunky fashion and takes some time to test in depth. I think a totally different interface along the lines of a heavily annotated form, integrated tightly with our forthcoming gallery software, which then spits out well formatted wiki code into a new wiki article should be more effective and preferable to developing some custom parser elements in the long term so will aim at doing that.
The test template wiki page has been removed now and it is no hassle to clean up things like that. I added a lot of custom extensions to the software on the assumption that there might be a lot of abuse of the system, so it is trivial to undo anything.
(well, as simple as this thrice-escaped-java-rexex-stuff is)
My backslash key is now worn down to the nub beneath the keyboard
Thanks again for your suggestions, more are always welcome! What is your experience in the field? (if you dont mind me asking as you certainly seem clued up on the issues!)
|
Check out our new, fully plastic tabletop wargame - Maelstrom's Edge, made by Dakka!
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2008/09/22 20:03:51
Subject: Army lists, possible solutions and a quest for templates
|
 |
[MOD]
Madrak Ironhide
|
You know what this means, right?
More work!
|
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2008/09/22 23:07:40
Subject: Re:Army lists, possible solutions and a quest for templates
|
 |
[ARTICLE MOD]
Cultist of Nurgle with Open Sores
|
legoburner wrote:I was thinking of working on something even more integrated than that. At the moment, the free text field for the wiki is leading to a lot of extremely variable army lists / army profiles going in. About half of them do not have an army list or are missing sections, and people are afraid to even delete headers due to their lack of wiki knowledge, so even the best parser would not be able to cope with about 30% of the army lists.
I think I see the problem. I'd say: It is not bad if something is not recognized as army list - people will retry it until it works. As long as it is easy to do so. But that is my approach to it - I really believe in the plain-text (*) wikiway. Plus, I do not think a parser would have a success rate that bad.
But I begin to understand that parsing is not necessary if you stick with the WYSIWYG editor only and do not offer raw editing.
You want to go the pure WYSIWYG way. I prefer raw editing, but then again, this might be the way to make wikis more accessible.
I was thinking more along the lines of a completely separate interface for army profiles, with one for each major game. This could then generate some pretty wiki code in the background and create an article out of it, and in a similar way to that which you describe could also attempt to parse the other army lists that exist already into that user friendly interface with some degree of success if I add some hidden annotation to the output.
Only to be sure: You want the army lists to be integrated into normal articles (like battle reports), right? So this would be like a separate button to enter an army list? Which would then start a wizard with several steps (lets say five for 40Ks HQ, Elite, Troops, FA and HS)?
Nice.
A lot more work, though.
This would make entering a new army list easy. It might be interesting to decide how to allow changing this list. If you directly transform it to some kind of html representation (or whatever the mediate format in jamwiki is), you'll lose the information that it is an army list, which will make it impossible to change the representation once it is entered. So you'll need need a way to retain the information...
...which is easy if you invent new wiki markup for that and hide it using the all- WYSIWYG-way. Okay, this should work.
Cool. Not the way I would do things, but I'm kinda retro when it comes to wikis.
(well, as simple as this thrice-escaped-java-rexex-stuff is)
My backslash key is now worn down to the nub beneath the keyboard 
ROFL. Sounds familiar
Thanks again for your suggestions, more are always welcome!
I have to thank you. This little discussion gave me an interesting point to think about. Until now I have considered WYSIWYG only as an add-on to plain markup. I thought that not allowing for raw input was just bad style (and in most wiki implementation that do that, it is). But removing them one more step from the markup gives you a necessary layer for logical markup. Hmmm. Smells of a good semantic web technique.
What is your experience in the field? (if you dont mind me asking as you certainly seem clued up on the issues!)
It's a sad story, really. It starts with me attending a lecture about building compilers because I liked the professor giving it. This was mistake 1, which got me acquainted with JFlex and JavaCUP. Mistake 2 was that I wrote my diploma (**) thesis about wikis. Of course, I also wrote some wikis in my free time, which led to... parsers (at least home-brewed ones). Mistake 3 was then working for a company that had a project of using OpenOffice as storage for a wiki-esque documentation system. Even more parsing (this time with JavaCC, ANTLR and again a home-brewed one). So for some reason, I'm the parser/format guy in our team.
...
Try to pick up girls after introducing yourself as "the parser guy". Doesn't work.
Even starting slightly different with "hi, I'm the ruby parser guy. I work with hpricot, which was developed by whytheluckystiff, who's totally rad. So I'm totally hot." doesn't work.
Parsers ruin everything.
Don't parse.
Ever.
*stops rambling*
Okay, so for now I'll just use the list style to make army lists more readable. Maybe I can simply offer you a quick patch for the CSS. I'll add a little hidden marker in from of army lists (maybe <!-- army list --> works) I come across so it will be easier to find them (and maybe convert them) after you build the proper wiki markup.
Kind regards,
Tierlieb
(*) Admittedly: There Is No Such Thing As Plain Text.
(**) That's the old German pre-doctorate degree that is now being dropped for the more compatible Bachelor/Master system. Good riddance.
|
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2008/09/23 01:59:01
Subject: Re:Army lists, possible solutions and a quest for templates
|
 |
[ADMIN]
Decrepit Dakkanaut
|
Malfred, every time I open my web browser I seem to make mor work for myself
Tierlieb, personally yes I would pick raw editing every time. I was very surprised as to how slowly people adapted from a forum culture to a wiki culture. Most people have little trouble when pushed, but about 98% of dakka's users do not want to even try, so experimenting with user interfaces is my attempt to see if I can encourage more people to start using the wiki. I need to normalise the code a bit too, to allow forum style UBB code to be used perhaps as that will make people a lot more comfortable as well.
I hadnt thought that far ahead in detail, but yes having an 'enter army list' button might be a very nice way to do it. Thanks for the idea
|
Check out our new, fully plastic tabletop wargame - Maelstrom's Edge, made by Dakka!
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2008/09/23 02:05:22
Subject: Army lists, possible solutions and a quest for templates
|
 |
[MOD]
Madrak Ironhide
|
You should just make a SUBMIT button and tie it to people's bank accounts.
You know, like MMORPGs. It's like a printing money machine.
|
|
|
|
 |
 |
|
|
|