Difference between revisions of "Wikispooks talk:Semantic Templates"

From Wikispooks
Jump to navigation Jump to search
(Import discussion from my user page)
 
m (Text replacement - "WikiSpooks" to "Wikispooks")
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Unresolved Issues==
 
==Unresolved Issues==
# What to do with existing WS param ''Description'' should that be assigned to WP param ''known for'' or probably better ''Footnote'' with its existing label '''"Notes"'''?; getting WP params ''Constitutes'' and ''ON Constitutes'' to display prominently may require using WP ''honorific suffix and prefix''; + a few others. --[[User:Peter|Peter P]] ([[User talk:Peter|talk]]) 07:27, 24 February 2014 (GMT)
+
1. What to do with existing WS param ''Description'' should that be assigned to WP param ''known for'' or probably better ''Footnote'' with its existing label '''"Notes"'''?; getting WP params ''Constitutes'' and ''ON Constitutes'' to display prominently may require using WP ''honorific suffix and prefix''; + a few others. --[[User:Peter|Peter P]] ([[User talk:Peter|talk]]) 07:27, 24 February 2014 (GMT)
: Modifying the infobox is ''probably'' a good way to do this. I added some parameters to [[Template:Infobox person]] for the WS parameters (though I think they don't yet work:).
+
: Modifying the infobox is ''probably'' a good way to do this. I added some parameters to [[Template:Infobox person]] for the WS parameters (though I think they don't yet work:). [[User:Robin|Robin]] ([[User talk:Robin|talk]]) 13:56, 24 February 2014 (GMT)
# Some of the WP parameters are in a processed form (e.g. {{t|birth date}} which is <nowiki>{{Birth date and age|YYYY|MM|DD}} or {{Birth-date and age|Month DD, YYYY}}</nowiki> - which is going to be non-trivial to decipher so that they can be picked up by SMW. There are not many of these, and it ''might'' be feasible to write templates to process them, which although it would be a bit of a hack, would allow for easy importing from WP. [[User:Robin|Robin]] ([[User talk:Robin|talk]]) 13:55, 24 February 2014 (GMT)
+
2. Some of the WP parameters are in a processed form (e.g. {{t|birth_date}} which is <nowiki>{{Birth date and age|YYYY|MM|DD}} or {{Birth-date and age|Month DD, YYYY}}</nowiki> - which is going to be non-trivial to decipher so that they can be picked up by SMW. There are not many of these, and it ''might'' be feasible to write templates to process them, which although it would be a bit of a hack, would allow for easy importing from WP. [[User:Robin|Robin]] ([[User talk:Robin|talk]]) 13:56, 24 February 2014 (GMT)
  
 
==A couple of questions about the {{tl|Person}} template...==
 
==A couple of questions about the {{tl|Person}} template...==
Line 21: Line 21:
 
Cheers!  [[User:Geo Swan|Geo Swan]] ([[User talk:Geo Swan|talk]]) 00:47, 24 February 2014 (GMT)
 
Cheers!  [[User:Geo Swan|Geo Swan]] ([[User talk:Geo Swan|talk]]) 00:47, 24 February 2014 (GMT)
  
:I just checked complexoperations and yes, that also uses SMW. See [[WikiSpooks:Semantic Mediawiki]] for how that is used here. You're correct about the "::" notation, though you don't need to know that syntax to use the semantic templates, which are invoked just like ordinary templates. The first thing you should be aware of is that the policy, templates and page data are all in flux; we only really got going with SMW last December, and until a month ago, there was no Scribunto, meaning that infoboxes didn't work at all. The ''plan'', such as there is a plan, is laid out in the {{SMW}} section of the community portal. I think we'll probably end up with:
+
:I just checked complexoperations and yes, that also uses SMW. See [[Wikispooks:Semantic Mediawiki]] for how that is used here. You're correct about the "::" notation, though you don't need to know that syntax to use the semantic templates, which are invoked just like ordinary templates. The first thing you should be aware of is that the policy, templates and page data are all in flux; we only really got going with SMW last December, and until a month ago, there was no Scribunto, meaning that infoboxes didn't work at all. The ''plan'', such as there is a plan, is laid out in the {{SMW}} section of the community portal. I think we'll probably end up with:
 
# A set of namespaces, 'person', 'event', 'website' ... in addition to (main)
 
# A set of namespaces, 'person', 'event', 'website' ... in addition to (main)
 
# A matching set of forms and templates, so that every page in the {{t|event:}} namespace uses [[template:event]], and semantic data can be input by people without neededing to learn and SMW (or even MW) mark-up
 
# A matching set of forms and templates, so that every page in the {{t|event:}} namespace uses [[template:event]], and semantic data can be input by people without neededing to learn and SMW (or even MW) mark-up

Latest revision as of 17:13, 14 October 2018

Unresolved Issues

1. What to do with existing WS param Description should that be assigned to WP param known for or probably better Footnote with its existing label "Notes"?; getting WP params Constitutes and ON Constitutes to display prominently may require using WP honorific suffix and prefix; + a few others. --Peter P (talk) 07:27, 24 February 2014 (GMT)

Modifying the infobox is probably a good way to do this. I added some parameters to Template:Infobox person for the WS parameters (though I think they don't yet work:). Robin (talk) 13:56, 24 February 2014 (GMT)

2. Some of the WP parameters are in a processed form (e.g. birth_date which is {{Birth date and age|YYYY|MM|DD}} or {{Birth-date and age|Month DD, YYYY}} - which is going to be non-trivial to decipher so that they can be picked up by SMW. There are not many of these, and it might be feasible to write templates to process them, which although it would be a bit of a hack, would allow for easy importing from WP. Robin (talk) 13:56, 24 February 2014 (GMT)

A couple of questions about the {{Person}} template...

Is the Person template a superset of {{infobox person}}? It incorporates semantic wiki extension, correct, while the old infobox person doesn't?

The complexoperations wiki used semantic wiki extensions, and I wonder if they are the same as those used here. Wikilinks with a pair of consecutive colons established a property for the article. So if an article on Eric the Red contained [[Father of::Lief Ericson]] the wikilink would render as a link to Lief Ericson, while adding a "Father of" property to the article.

I told Peter I would like to be fickle, and port articles that risk deletion at the wikipedia to multiple other wikis. The drawback of using even excellent, clever extensions, is that they make it more complicated to port them to other wikis.

I saw you put a {{Person}} template on Ahmed Siddiqui, when I went to put a more fully populated {{infobox person}} there.

I imagine there are no tools to transform one template to the other?

If you think the Person template is preferable please feel free to restore it.

Cheers! Geo Swan (talk) 00:47, 24 February 2014 (GMT)

I just checked complexoperations and yes, that also uses SMW. See Wikispooks:Semantic Mediawiki for how that is used here. You're correct about the "::" notation, though you don't need to know that syntax to use the semantic templates, which are invoked just like ordinary templates. The first thing you should be aware of is that the policy, templates and page data are all in flux; we only really got going with SMW last December, and until a month ago, there was no Scribunto, meaning that infoboxes didn't work at all. The plan, such as there is a plan, is laid out in the SMW section of the community portal. I think we'll probably end up with:
  1. A set of namespaces, 'person', 'event', 'website' ... in addition to (main)
  2. A matching set of forms and templates, so that every page in the event: namespace uses template:event, and semantic data can be input by people without neededing to learn and SMW (or even MW) mark-up
As regards the {{Person}} template, yes, this preferable since it adds SMW data. Now that infoboxes are working, it shouldn't take much work to fix the display. I might even try it now. If {{person}} takes a superset of the parameters taken by {{infobox person}}, we should be able to upgrade infoboxes to use SMW just by removing the "infobox ". Robin (talk) 03:29, 24 February 2014 (GMT)
I've studied the workings of the Infobox template quite closely and was gearing up to make the changes discussed here myself. However, if Robin is up for it I'd rather he did it because he is a far better coder than I. The fundamental thing about infoboxes is that they all use the same Lua (ie scribunto) modules to present the data. There are just two of them: Module:Infobox and Module:InfoboxImage - no need to do anything to that code but that's where it resides.
Parameters are passed to these modules by Infobox Person (or other Infoboxes) in numbered pairs representing the Label and the Value. To maintain WP compatibility we can make only minimal changes to the WP templates. I suggest picking maybe 4-6 parameters (possibly the unused ones currently labelled "Module") and using them for any required WS specific parameters not included in the WP template.
I conclude (provisionally) that the best way forward would be to do something similar with templates Person, Event etc, to what was done with (for example) the 200YT template; ie have them INCLUDE the major operational template to handle data formatting and display.
Work required: Modify the Person, Event etc templates to include the relevant Infobox templates. Assign and display SMW properties only and leave the included Infobox xxx template to format and display the infobox itself.
I modified Template:Person along these lines this morning. Not yet 100%, but maybe not far off. Robin (talk) 13:55, 24 February 2014 (GMT)
That way anything imported from WP should remain fully operational and such pages can have their SMW data added by simply changing the wikitext from the imported Infobox to Person, event etc. as and when.
Another thought: I spotted a tip on the SMW mailing list which we might consider when assigning properties in this context. The syntax {{#set:property=value}} can be used instead of [[Property::Value]] so that the value is not displayed by the act of assigning it. Display can then be handled by the suitably tweeked WP template. --Peter P (talk) 09:03, 24 February 2014 (GMT)
I've been using [[Property::Value| ]] which seems to do the same, though am I perhaps introducing a spurious " " character. Robin (talk) 13:55, 24 February 2014 (GMT)