Author Topic: Table sorting  (Read 9671 times)

egamma

  • Guest
Table sorting
« Topic Start: April 12, 2012, 09:20:35 PM »
http://wiki.battlemaster.org/wiki/Dwilight/Marketplaces_of_Dwilight

Is there any way to make the table sortable, like the tables inside BM?

(and yes, I'm adding entries as I find the time)

Indirik

  • Exalted Emperor
  • ******
  • Posts: 10849
  • No pressure, no diamonds.
    • View Profile
Re: Table sorting
« Reply #1: April 12, 2012, 10:03:56 PM »
I bet there is. You could check the code for how the semantic tables are coded, and copy that.

In fact, you could do this by semantic data on the region pages, and then have the tables auto-populated by semantic queries. That automatically gets the semantic table sorters. You could use [[has feature::marketplace]] on the region page, then just write a simple query to find them.
If at first you don't succeed, don't take up skydiving.

egamma

  • Guest
Re: Table sorting
« Reply #2: April 12, 2012, 10:14:16 PM »
Ooh, nice. I like that.

A few quibbles. First, how can I notate the duchy as being the second value in the second column? Second, how do I put this on the region pages without it looking like a typo?

http://wiki.battlemaster.org/wiki/Chesland
« Last Edit: April 12, 2012, 10:30:28 PM by egamma »

Draco Tanos

  • Mighty Duke
  • ****
  • Posts: 1128
    • View Profile
    • Nova Roma
Re: Table sorting
« Reply #3: April 13, 2012, 12:58:03 PM »
Though not dealing with marketplaces, is there a way to do similar with temples of specific religions?

Indirik

  • Exalted Emperor
  • ******
  • Posts: 10849
  • No pressure, no diamonds.
    • View Profile
Re: Table sorting
« Reply #4: April 13, 2012, 04:34:43 PM »
The [[has feature::  ]] property takes any string value. You can put anything in there you want. You can make [[has feature::marketplace]] or [[has feature::palace]]  or [[has feature::forest]] or any other "feature" you can think you would want to note in the region. But please make sure that it is something that you will want in several regions, or something that you would want to assemble a list of. You would not, for instance, want to use [[has feature::Tanos Family Home]].

You can see the places that have a "has feature" property set here http://wiki.battlemaster.org/wiki/Property:Has_feature

If you want to set multiple features for one region, make sure you use a separate tag for each feature. Do not combine tags. Good: [[has feature::A]][[has feature::B]]. Bad: [[has feature::A,B]].

For specifying a region has a temple of a religion, you can use: [[has feature::Temple of the Church of Humanity]].

First, how can I notate the duchy as being the second value in the second column?
I don't understand. Example, please?

Quote
Second, how do I put this on the region pages without it looking like a typo?
Two ways:
  • The preferred way is the way you did it. Work it into the text on the page somehow.
  • The less preferred way is to hide it using blank alt text, like this: [[has feature::scouts guild| ]]. Note that we pipe an alternate text, and then use one space. You have to have the space there, or it doesn't work. This way puts the tag on the page, with no visible sign on the page itself.
If at first you don't succeed, don't take up skydiving.

egamma

  • Guest
Re: Table sorting
« Reply #5: April 16, 2012, 04:33:47 AM »
I don't understand. Example, please?

Look at the semantic table, second column. It has both the realm and duchy, but the column header only says 'realm'.

http://wiki.battlemaster.org/wiki/Dwilight/Marketplaces_of_Dwilight#Semantic_list

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Table sorting
« Reply #6: April 16, 2012, 09:16:44 AM »
I do discourage using it for this, however. There is no way you can keep that list updated.

egamma

  • Guest
Re: Table sorting
« Reply #7: April 16, 2012, 09:25:57 PM »
Then what do you propose? Using my Banker's bulletin, like I have been doing, spams the realm whenever I add a new marketplace to the list.

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Table sorting
« Reply #8: April 16, 2012, 09:39:04 PM »
Then what do you propose? Using my Banker's bulletin, like I have been doing, spams the realm whenever I add a new marketplace to the list.

The issue is not creating a list or not. The issue is making it obvious when the list was last updated, so people know when it's outdated.

egamma

  • Guest
Re: Table sorting
« Reply #9: April 16, 2012, 09:53:02 PM »
The issue is not creating a list or not. The issue is making it obvious when the list was last updated, so people know when it's outdated.

So using a traditional table, instead of a semantic list, so that the last-modified date at the bottom can be used, is your suggestion?

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Table sorting
« Reply #10: April 16, 2012, 10:39:24 PM »
I don't have a suggestion, I'm just pointing out a problem.


Indirik

  • Exalted Emperor
  • ******
  • Posts: 10849
  • No pressure, no diamonds.
    • View Profile
Re: Table sorting
« Reply #11: April 17, 2012, 08:09:53 PM »
Look at the semantic table, second column. It has both the realm and duchy, but the column header only says 'realm'.
This is because membership in both the duchy and the realm is denoted by the "part of" property. Tom has been adamant that these not be split, and that we don't make a "duchy of" property, or a "realm" of property.. The problem is that we have never been able to separate what each is talking about. It's easier of you selected based on "part of::Terran". (Well, it used to be, I guess, but now you can actually have a duchy named "Terran", like Iashalur has a duchy of Iashalur... What a mess.)

Given how the new duchies work, and the fact that you can have arbitrary numbers of duchies with arbitrary names, the external data feed and semantic properties may need to be revisited. There are already a lot of assumptions that we used to make that are no longer true.
If at first you don't succeed, don't take up skydiving.

Indirik

  • Exalted Emperor
  • ******
  • Posts: 10849
  • No pressure, no diamonds.
    • View Profile
Re: Table sorting
« Reply #12: April 17, 2012, 08:14:45 PM »
On a separate note, these types of lists may *seem* helpful and convenient. But mostly, they're a pain in the ass. They are rarely used, and quickly obsolete and misleading. They depend on a lot of people doing a lot of manual work. The semantic idea seems, to me, to be a bit cleaner and easier. All you have to do is add/remove the [[has feature:: ]] tag from the region page, and everything else is done for you. If it changes hands, then all the dependent information is automatically updated. Clean and easy. But still, requires a lot of manual work to keep it up to date.
If at first you don't succeed, don't take up skydiving.

egamma

  • Guest
Re: Table sorting
« Reply #13: April 18, 2012, 08:08:35 PM »
I don't expect marketplaces to be destroyed very often. I'm okay with 'undiscovered' marketplaces.
« Last Edit: April 18, 2012, 08:16:42 PM by egamma »

Indirik

  • Exalted Emperor
  • ******
  • Posts: 10849
  • No pressure, no diamonds.
    • View Profile
Re: Table sorting
« Reply #14: April 18, 2012, 08:18:02 PM »
Semantic queries are cached to prevent the load of constantly re-running them. The cache has a time-out of about a day or so. Therefore, changes to semantic properties may not be immediately reflected in pages that show queries using that data. You can do three things:

1) Do an Edit>Save of the page with the query on it. This will recalculate the page, even if you don't change anything. If you don't change anything, it wont even record a change in the page history.
2) Add "&action=purge" to the page URL and reload it. This will dump the cache and force it to recalculate the queries.
3) Wait and let the cache timeout and be recalculated. Could take up to a day for it to happen.
If at first you don't succeed, don't take up skydiving.