Page MenuHomePhabricator

Allow configuring Genealogy to be used in name spaces other than the main space
Closed, ResolvedPublic

Description

Like the title says. There are other extensions that do something similar: WikidataPageBanner, VisualEditor and Flow.

For example $wgGenealogyAvailableNamespaces = (NS_Person; NS_Biography)

In spanish: Genealogy debe poderse configurar en otros espacios de nombres como el espacio de nombres Persona o Info bajo la configuración adecuada.

Event Timeline

Does it need to be a specific list of namespaces, or could it just permit use in all namespaces? That'd be simpler, I think.

Change 559617 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/Genealogy@master] Include namespace when getting inbound props

https://gerrit.wikimedia.org/r/559617

Does it need to be a specific list of namespaces, or could it just permit use in all namespaces? That'd be simpler, I think.

If you think it's better that it's enabled by default in all the name spaces. I don't see a problem. You'll say. :)

Change 559617 merged by jenkins-bot:
[mediawiki/extensions/Genealogy@master] Include namespace when getting inbound props

https://gerrit.wikimedia.org/r/559617

Change 559654 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/Genealogy@master] Support namespaces in trees

https://gerrit.wikimedia.org/r/559654

Change 559654 merged by jenkins-bot:
[mediawiki/extensions/Genealogy@master] Support namespaces in trees

https://gerrit.wikimedia.org/r/559654

Genealogy links in any namespace should now work as expected, including in tree generation.

Let me know what issues you have, after upgrading to 1.9.1.

Thanks for reporting this!

This comment was removed by Samwilson.

Genealogy links in any namespace should now work as expected, including in tree generation.

Let me know what issues you have, after upgrading to 1.9.1.

Thanks for reporting this!

I've requested the upgrade. is there any configuration I need to make in the local template so that it can be in another namespace? Thank you very much.

Nope, it should just work.

But I meant to say: you can test the latest version on the Genealogy Demo wiki at https://tools.wmflabs.org/genealogy/ — it might be worth confirming that everything does what you want there, before worrying Miraheze sysadmins about upgrading.

Nope, it should just work.

But I meant to say: you can test the latest version on the Genealogy Demo wiki at https://tools.wmflabs.org/genealogy/ — it might be worth confirming that everything does what you want there, before worrying Miraheze sysadmins about upgrading.

It would be necessary to create another name space in order to test (in tools genealogy).

It would be necessary to create another name space in order to test (in tools genealogy).

Good point! :)

I've created the 'Biography' namespace.

It seems to work well, there is only the detail added by the name space when linked to another biography. It would be good to omit it, something similar is done by the GeoCrumbs extension that omits for example "Guide:" when adding {{Isin|United States}} although it is done with internal code in the corresponding template.

sometimes, does not link automatically and must be forced with the name space before the title.

Change 560370 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/Genealogy@master] Don't show namespace for person lists

https://gerrit.wikimedia.org/r/560370

there is only the detail added by the name space when linked to another biography. It would be good to omit it

Done. Will make another release shortly.

sometimes, does not link automatically and must be forced with the name space before the title.

This can be changed in the {{person}} template per-wiki, by making sure the namespace is added to the definition, for example:

{{#genealogy:partner | Biography:{{{partner1}}} }}

I don't think it can be done simply by the extension, because different wikis will have different ideas of how they want to organise things. We could define a default person namespace, but I think doing it in the template is just as easy and gives more power to wiki editors.

Change 560370 merged by jenkins-bot:
[mediawiki/extensions/Genealogy@master] Don't show namespace for person lists

https://gerrit.wikimedia.org/r/560370

I've updated the version on the genealogy demo site to 1.9.2, and Miraheze is now updated to that version too (the PRs I sent were merged within seconds!).

Let me know if there's anything else to do for this task.

@Samwilson Thank you very much, I'll check it out. I'll let you know if there's a problem or I have suggestions. Greetings.

The only thing I've noticed is that "partners" doesn't link to the existing article. For example "Husband/Wife there is no corresponding link, the same goes for "Family/Relative" and "Couple/Girlfriend". Is there a reason I don't know? I'm not sure if it's the cache, I've already purged it several times.

In the case of parents, siblings and children if it is working properly.

Example:

| Cónyuge    |{{#genealogy:partners | Biography:{{{conyuge1}}} }} 
| Parejas    |{{#genealogy:partners | Biography:{{{pareja1}}} }} 
| Familiares |{{#genealogy:partners | Biography:{{{familiar1}}} }}

Yes, the reason that partners is different is that it's a bi-directional link between pages and so can be defined from either end. That means that rather than defining a partner page and outputting its link at the same time (as works for parents) it's necessary to define it (with zero output) and then use {{#genealogy|partners}} to output the list of partners (which will include all partners including those defined from other pages). For example, the following first defines up to three partners, then prints them all together (with any externally-defined ones):

Partners:
{{#if: {{{partner1|}}} | {{#genealogy:partner | {{{partner1}}} }} }}
{{#if: {{{partner2|}}} | {{#genealogy:partner | {{{partner2}}} }} }}
{{#if: {{{partner3|}}} | {{#genealogy:partner | {{{partner3}}} }} }}
{{#genealogy:partners}}

However, I think you've highlighted an issue! It sounds like the parent parser function should be fixed to use the same customizable template as siblings, partners, and children. Do you think that makes sense? That way, when you define your custom namespace in the {{Person/list-item}} template, it'll be used for all outputs of links. It does mean that it'll only ever be a list of one (for each parent) but if they're concatenated they'll make sense.

Change 560828 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/Genealogy@master] Use the same person list for a parent, as other relations

https://gerrit.wikimedia.org/r/560828

Change 560828 merged by jenkins-bot:
[mediawiki/extensions/Genealogy@master] Use the same person list for a parent, as other relations

https://gerrit.wikimedia.org/r/560828

All patches merged. @Hispano76: Are there still further issues?

All patches merged. @Hispano76: Are there still further issues?

I didn't get the notification. I have requested here to use the most recent version of the extension.

Ah, I didn't realize that you don't run a MediaWiki instance yourself. So I guess my question goes to @Samwilson. :)

The version on Hispano wiki is now 2.0.1. @Hispano76 can you confirm that it does what you need?

The version on Hispano wiki is now 2.0.1. @Hispano76 can you confirm that it does what you need?

Sorry I'm late, I confirm it looks good to me. Thank you.