Wiki Updates (masochism?)

StDoodle

Minion
So I was considering undertaking the work of doing some major add-ons & cleanups to the wiki.

The problem is, I'm not exactly an expert when it comes to wikis, so there are a couple of things I'm unfamiliar with.

1) Templates. From what I've seen, specialized wikis like to make great use of such things. However, the only one I've run across is the function template, and I can't for the life of me figure out what "dobedo" does... looks like random vandalism, but I dunno.

2) Organization in general is lacking; Pretty much all ash functions should be in said category, and categories such as "Your character" should be a sub-category of that. Or something.

3) Links. The wiki is notoriously un-linked, which really needs to be fixed. Somewhat related, shouldn't overloaded functions be listed on one page with all of their options and an explanation of different parameter use, or all listed separately by parameters? Currently, we have a mix of the two, from what I can tell.

4) Prettifying. (Ok, that's a horrible word.) What I mean is, you can choose to display your links differently than the internal wiki-linking structure, and since the wiki structure has auto-caps and disallows underscores, functions should be "prettied up" such that they always display on the page the same as they're actually invoked, IMO.

I know this should technically go on the talk page of the wiki itself, but hoped it would generate more interest / views here. I'd really like to do some work to make the wiki a better resource, but I don't want to "step on anyone's toes," so to speak. So if there are established rules beyond wiki standards that I should follow, please clue me in before I make a mess of the place.

Thanks, StD
 
Do it! Do it! I add things here-and-there on the wiki as I learn about them and have time to attempt to articulate what I've learned, and have come to recognize that it is rather a mess, but I don't know anything about its larger organization.

Unfortunately, I don't know anything about general wiki magic either, so I can't really answer your questions. But I wanted to post in support!
 

StDoodle

Minion
Looking into matters a little bit more, it looks like life could be made a bit simpler for myself as a wiki editor if we had the "ParserFunctions" extension. Unfortunately, that would also require an upgrade to MediaWiki itself. Any chance that might be possible?
 

StDoodle

Minion
The wiki was upgraded just a few months ago to the latest version?

Apparently, I have a hard time parsing version numbers on reduced sleep. <.< >.>

Edit; ParserFunctions could still be quite useful, though.

Edit 2: Is there a standards page around anywhere on the wiki? In specific, I'd like to know the reasoning behind including the parenthesis in the page name; seems a bit counter-intuitive to how I search, but then again, I'm not a real programmer, so I could just be wrong...
 
Last edited:

CptJesus

Member
I'll contribute to the wiki if its allowed. I've been playing around with ash functions in my script and I can document the ones I've used myself more extensively.
 

bumcheekcity

Active member
The function template was me. dobedo was just some test junk I threw in there.

Functions should have separate listings for each of their parameters. Parameter name, type and a short description should be recorded separately. I'll make some changes to illustrate what I mean.
 

StDoodle

Minion
I think I get what you mean, but without ParserFunctions that's going to be difficult to swing, I think.

I've edited the Functions template, as well as made a params template. I've incorporated them into the first couple of "Your character" functions as a test; please let me know what you think before I go further.

Edit: also check out "length." BTW, that page gets a redirect, but probably only because I originally made it without "()" and moved it later; which is why I'm thinking we should drop the parenthesis (otherwise, functions with parameters won't link easily). I dunno.
 
Last edited:

fewyn

Administrator
Staff member
What the heck is Parserfunctions? I've never really messed with the wiki much beyond when I moved it here and upgraded the software.
 

bumcheekcity

Active member
In short, here's how I think we should call the functions template:

Code:
{{function|
name=retrieve_item|
returns=boolean|
description=uses KoLmafia internal logic to gather the items in the least destructive manner. ''See the “acquire” documentation in the CLI manual for more details.''|
p1=quantity|
p1t=int|
p1d=The quantity of the item you wish to retrieve|
p2=itemname|
p2t=item|
p2d=The name of the item.|
examplecode=# function to get your class-specific Epic Weapon hermit item
boolean get_epic_item()
{

  item[class] epic_items;
  epic_items[$class[seal clubber]] = $item[seal tooth];
  epic_items[$class[turtle tamer]] = $item[chisel];
  epic_items[$class[pastamancer]] = $item[petrified noodles];
  epic_items[$class[sauceror]] = $item[jabañero pepper];
  epic_items[$class[disco bandit]] = $item[banjo strings];
  epic_items[$class[accordion thief]] = $item[hot buttered roll];

  return retrieve_item(1, epic_items[my_class()]);

}|
}}

The slight disadvantage to my method is that there's an upper limit to the number of arguments you can have. The advantage is that adding them is utterly trivial.
 

fronobulax

Developer
Staff member
What the heck is Parserfunctions? I've never really messed with the wiki much beyond when I moved it here and upgraded the software.
I'll guess, based upon the context, that is it a extension to mediawiki. See documentation here to install and here to use.
 

StDoodle

Minion
buncheekcity;

1) I think that by having a separate param template like I set up, we can get past the whole "upper limit" issue; check it out (& "length()") to see what I mean. The way I set it up even makes it relatively painless to bracket optional parameters, I think.

2) I'm hesitant to put the description, and especially a code sample, right into the function template. Perhaps if they similarly had templates... but that seems needlessly messy. IMO, stuff built into the function template would be stuff that is part of the functon itself... but this could just be me looking at it from a weird angle. Basically, anything that guarantees that a few pages will be done without the template is an argument for trimming back said template. (Again, IMO)
 

bumcheekcity

Active member
The separate parameter template isn't a terrible idea, but it has the problem of not being able to provide a detailed description of each parameter. All these things should be in the main Template:function, with a bunch of {{if:}} thingies thrown in. That way we use the template to its maximum capability, and we're able to retain maximum continuity through the wiki with the minimum page coding.

http://kol.coldfront.net/thekolwiki/index.php?title=Template:Item&action=edit

The main wiki has a fantastic template for Items.

Also: http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions - for reference for all.
 
Last edited:

StDoodle

Minion
I've had a couple more thoughts (oh noes!)

1) I don't want to add a redirect for Every. Single. Function. But if we're going to use () in the actual PAGE NAME, it seems a necessity. Otherwise, we end up with situations where A) searching for file_to_map gives four+ results, with the ACTUAL PAGE for file_to_map() being the third down and B) A function that takes at least one parameter CAN'T be properly wiki-linked. But, I fear I may be the victim of the status quo on this point.

2) I'm not entirely sure we REALLY need the ParserFunctions extension; we can accomplish most of our goals by having various layers of data here. I would suggest we have a params template, a function template, and a function page template. The first would have one more parameter than it currently does, "longdesc" or something. The second would be for building the function ITSELF; the third would be for the page displaying functions. Additional templates for <code> may be required; but this would fit better with how the coldfront wiki has monster data, and monster pages, for example. The latter uses a lot from the former, but they're still presentationally / functionally different.

More thoughts to come as they dislodge themselves.

Edit: On third thought, the ParserFunction extension would be awesome, just for different situations than I was first thinking about. Yeah, I'm officially requesting it "pretty-please-with-a-cherry-on-top" style.
 
Last edited:

Bale

Minion
My belief is that if you are determined to seriously rewrite all those pages, many of us would be glad to let you decide to leave off the () since you'd be earning the right to change things. The wiki has been needing a lot of work for a long time and I've never really loved the () in the page names.

Is anyone seriously attached to the current standards? Or should we let StDoodle change the status quo if he's devoted to becoming our wiki savior.
 
I'm with Bale here. Anyone willing to do the work should be given a lot of leeway. Moreover, the consideration that page titles should work well with search is an important one, and while I would write about function "foo()", I would probably search for "foo". Ease may be a great deal better than prettiness here.
 

Grotfang

Developer
Could someone explain the issue to me? For example, search in the wiki for "item amount" (I added that page today). When I do this, it comes up with the correct page. Is that not the desired behaviour? What is it about that page that is different from others? (I know there must be a differences - not all pages are that searchable. Just not very wiki-aware)
 
At least for me, there's a little tag under the title when I search for "item amount" and land on the "item_amount()" page -- "(Redirected from Item amount)".

One way to get nice search behavior is to have a lot of redirects. Another is to name pages with titles more likely to be searched for, saving someone the work of making a bunch of redirects.

I'm also not very wiki-smart -- I must wonder if such simple redirects such as "redirect to this, but with () stripped off" can't be automatically created? And if so, perhaps there is still a dislike of redirect pages as clutter? I really don't know, just tossing things out of my head into the post-entry box...
 
Top