Author Topic: Wiki - toolbox and navbars  (Read 3398 times)

Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Wiki - toolbox and navbars
« on: April 25, 2015, 06:24:52 am »
I found "what links here" in the toolbox and I think it could be very useful for updating link to updated pages. However, the lists are totally drowned, and I suppose because every ship page has these tags:
{{AIWarShips}}
{{AIWarRefNav}}
They create the expand/collapse windows "Ships and Structures Navigation " and "AI War Navigation Reference" and add their links in all "what links here".

The best way to solve the problem would be to let the navbars in place but make the "what links here" doesn't consider these in its listing. However, I bet it would be impossible to achieve because this feature might be deep in the wiki's code.

Removing all navbars from all ship pages would be:
- painful, because there is so many of them (could be done alongside an update about life/100 and no-cristal, but still painful)
- bad, because these navbars are useful, albeit outdated.

Also, are humble mortals allowed to edit these navbars? My current work aims to update almost all the pages linked in the {{AIWarRefNav}}.

EDIT:
Also, there is references to categories in old pages. I believe the namespace system replace them. Shall we delete them on sight?
[[category:AIWar]]
[[category:AIWarBase]]
« Last Edit: April 25, 2015, 06:56:10 am by Pumpkin »
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Wiki - toolbox and navbars
« Reply #1 on: April 25, 2015, 10:17:41 am »
Yeah, those categories are likely safe to delete on sight.

I don't know what to do about the "what links here?" problem.

Offline Captain Jack

  • Hero Member Mark II
  • *****
  • Posts: 808
  • Just lucky
Re: Wiki - toolbox and navbars
« Reply #2 on: April 25, 2015, 01:17:09 pm »
Also, there is references to categories in old pages. I believe the namespace system replace them. Shall we delete them on sight?
[[category:AIWar]]
[[category:AIWarBase]]
I think namespace is how we're separating content across entire games. For grouping kinds of content (from expansions, classes of bonus content, and so forth) categories still work really well.

Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Re: Wiki - toolbox and navbars
« Reply #3 on: April 25, 2015, 04:46:04 pm »
Also, there is references to categories in old pages. I believe the namespace system replace them. Shall we delete them on sight?
[[category:AIWar]]
[[category:AIWarBase]]
I think namespace is how we're separating content across entire games. For grouping kinds of content (from expansions, classes of bonus content, and so forth) categories still work really well.
Roger.
Categories AIWar and AIWarBase are OK for deletion but categories are not evil per so. Compris.
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

Offline Dominus Arbitrationis

  • Arcen Games Contractor
  • Arcen Staff
  • Sr. Member Mark III
  • *****
  • Posts: 479
Re: Wiki - toolbox and navbars
« Reply #4 on: April 25, 2015, 10:40:28 pm »
I found "what links here" in the toolbox and I think it could be very useful for updating link to updated pages. However, the lists are totally drowned, and I suppose because every ship page has these tags:
{{AIWarShips}}
{{AIWarRefNav}}
They create the expand/collapse windows "Ships and Structures Navigation " and "AI War Navigation Reference" and add their links in all "what links here".

The best way to solve the problem would be to let the navbars in place but make the "what links here" doesn't consider these in its listing. However, I bet it would be impossible to achieve because this feature might be deep in the wiki's code.

Yea, making that change would be extraordinarily difficult, and even if I did make that change, the moment we add another page there is a risk of it all breaking. I'm sure if I dug around the source of it for a while I could figure out something, but it seems like a lot of energy for no reward.

Also, are humble mortals allowed to edit these navbars? My current work aims to update almost all the pages linked in the {{AIWarRefNav}}.

If by navbar you mean things like {{AIWarRefNav}} and not the sidebar, then I do believe you all can edit them, although if that is abused I'll limit it a bit. The sidebar itself though, only an administrator can edit.

Also, there is references to categories in old pages. I believe the namespace system replace them. Shall we delete them on sight?
[[category:AIWar]]
[[category:AIWarBase]]

Yup. I might run a bot to remove them, I'm not sure. We might want to have a way to distinguish between the base game and every expansion though, since not everyone buys the whole bundle.
Come help out at the Wiki!

Have ideas or bug reports for one of Arcen's games or any part of the site? Use  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games and site better!

Offline Dominus Arbitrationis

  • Arcen Games Contractor
  • Arcen Staff
  • Sr. Member Mark III
  • *****
  • Posts: 479
Re: Wiki - toolbox and navbars
« Reply #5 on: April 26, 2015, 09:22:16 pm »
Okay, I moved a ton of pages (178 to be exact) over to the AI War namespace (I attached the list), and I am looking into easy ways to fix all the broken links. Until then, your best bet will be to try adding AI War: to the beginning of every link and seeing what happens (Use the show preview button!). So in other words, when you see [[EMP]], try changing that to [[AI War:EMP]] (That example will always work since I moved EMP to the namespace. :) ) I'm also about to let the bot have fun removing pages that are in the AI War namespace from the AI War category.

EDIT: I can't think of what the regex is to, on every even numbered line, delete all backslashes on that line. If someone can post that here, I can update all of the links really fast tomorrow. If not, oh well, I'll either remember it or do it the hard way and then remember it. :)
« Last Edit: April 26, 2015, 10:06:39 pm by Dominus Arbitrationis »
Come help out at the Wiki!

Have ideas or bug reports for one of Arcen's games or any part of the site? Use  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games and site better!

Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Re: Wiki - toolbox and navbars
« Reply #6 on: April 27, 2015, 04:51:15 am »
Good job! Also, just a note: [[AI War:EMP]] would display as "AI War:EMP", so we need to write [[AI War:EMP|EMP]] for it to display "EMP". Is there a way to either tell the wiki engine to not display the namespace if no "|thing" is provided or to use (yet another magic) regex?

I'm willing to help for the backslash regex and the "[[X:A|A]]" one, but I'm note sure... what prog do you use? Sed or something? Is there differences? I use Vim and I would remove backslashes with something like "%s:/\\//g". I'm a bit rusty with sed but maybe I can help.

EDIT:
Quote
changed group membership for User:Dominus Arbitrationis from abuseeditor, bureaucrat, check user, patroller and administrator to abuseeditor, bureaucrat, check user, patroller, administrator and bot ?(Automated work again)
:D
« Last Edit: April 27, 2015, 05:46:40 am by Pumpkin »
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Wiki - toolbox and navbars
« Reply #7 on: April 27, 2015, 10:59:27 am »
Is there a way to either tell the wiki engine to not display the namespace if no "|thing" is provided?

Templates. :D

Code: [Select]
//yes it needs to be one line like this, or you get an unwanted linebreak.
<includeonly>[[AI_War:{{#replace:{{{1}}}| |_}}|{{{1}}}]]</includeonly><noinclude>
{{/doc}}
[[Category:Templates|C]]
</noinclude>

Then your usage would be {{AI_War|EMP}} where you name the template "AI_War" (and then have different templates for each namespace).

(Random thought... *Looks at the DF wiki*)

Ok, DF managed to get [[links]] to only link within a namespace, but I have no idea how.  It's not a template, so there might be some setting in the admin section.  I can't find anything via google, though.


Edit, scratch that.  There is a simple method.  Use a pipe.

[[AI_War:EMP|]]

The empty string after the pipe will be auto-parsed to strip the namespace. [[AI_War:EMP|EMP]]
« Last Edit: April 27, 2015, 11:04:12 am by Draco18s »

Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Re: Wiki - toolbox and navbars
« Reply #8 on: April 27, 2015, 12:42:34 pm »
Nice !
Thank you very much, Draco!
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

 

SMF spam blocked by CleanTalk