Main Menu

News:

Please be aware of the Forum Rules of Conduct.

Table sorting

Started by egamma, April 12, 2012, 09:20:35 PM

Previous topic - Next topic

egamma

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

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

#2
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

Draco Tanos

Though not dealing with marketplaces, is there a way to do similar with temples of specific religions?

Indirik

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]].

Quote from: egamma on April 12, 2012, 10:14:16 PM
First, how can I notate the duchy as being the second value in the second column?
I don't understand. Example, please?

QuoteSecond, 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

Quote from: Indirik on April 13, 2012, 04:34:43 PM
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

I do discourage using it for this, however. There is no way you can keep that list updated.

egamma

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

Quote from: egamma on 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.

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

Quote from: Tom on April 16, 2012, 09:39:04 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

I don't have a suggestion, I'm just pointing out a problem.


Indirik

Quote from: egamma on April 16, 2012, 04:33:47 AM
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

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

#13
I don't expect marketplaces to be destroyed very often. I'm okay with 'undiscovered' marketplaces.

Indirik

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.