User talk:Tpt/RFC

Jump to navigation Jump to search

About this board

Tpt (talkcontribs)

This seems very promising. Now, let's start with the questions :-)

  1. Will it be possible to set data for a page using current templates? E.g., in every page I already have a template called "header" and I want that some of its fields are stored as data, without modifications to the pages but only to the template. Can I do it?
  2. Will it be possible to get the data not only from the page I'm in, but also from other pages? E.g., in my authors' pages I have the list of the author's works, and for each work I want to show its data (year of publication, proofread quality, etc.), is it possible?
  3. Also, it will be useful to have 2 shortcuts, one that says "give me this data from the basepage, that is, in the page "My novel/Part 1/Chapter 2" get data from "My novel"; and another that says "give me this data from the upper level page" ("My novel/Part 1" in our example).
  4. Why only nsIndex and ns0? This system can be useful for other namespaces too, nsAuthor above all.

This post was posted by Tpt, but signed as Candalua.

Tpt (talkcontribs)
  1. Of course, the parser function {{#pfdata:ID_OF_THE_METADATA|VALUE}} is done for that.
  2. I haven't think about it. It's a good idea but there is a problem : it's that we have to do a lot of requests on the database in order to get these informations (It's why Semantic Mediawiki is not installed in Wikisource). But if we don't do complex requests, I think it's possible. We have to see with core developers. I don't want to kill the project because of such a problem. Do you have an idea of the parser function to create ?
  3. see 2.
  4. For nsAuthor the informations are the same as Wikipedia infobox ones that will be stored in Wikidata that will provide a module in order to show them in other wikis (see this discussion)
Reply to "Questions"
Beau (talkcontribs)

I like the general idea, as we should avoid any duplication of metadata. I would like to point out that MediaWiki has already page_props table, which can be used to store properties associated with the page. Those properties are already available through API (action=query&titles=Index:Title&prop=pageprops). I have prepared today a proof of concept patch - it is available at It is only a demonstration - it is very hacky and has many rough edges.

It uses ParserBeforeStrip hook (which is not the best solution, but I did not managed to find anything more useful) to parse the page content (using MediaWiki preprocessor) and inject page properties. Each property is named 'property-Arg', where 'Arg' is name of MediaWiki:Proofreadpage_index_template template argument. Current version does not handle wiki-syntax well as tags are visible as parser markers right now, but this can be fixed.

The metadata can be accessed using {{#indexinfo:index-name|property-name}}. Currently this magic word cannot be used in index namespace to avoid loops. The page containing this magic word is added to templatelinks table, so if 'index-name' is modified all pages using metadata will be rebuilt.

I have moved examples to User:Tpt/RFC#Using page props table.

Tpt (talkcontribs)

It's a very interesting solution. Thanks a lot ! Could you create a source repository somewhere in order to work both on it ? Can you also edit this draft page in order to describe your system ?

Reply to "Another storage proposal"
There are no older topics