WikibaseLexeme
<https://gerrit.wikimedia.org/g/mediawiki/extensions/WikibaseLexeme/>
and WikibaseMediaInfo
<https://gerrit.wikimedia.org/g/mediawiki/extensions/WikibaseMediaInfo/>
are two extensions that add new entity types, including datatypes for
those entities. I suspect that WikibaseMediaInfo might be easier to look
into – in WikibaseLexeme, the extension registration is complicated a
bit by the fact that the extension has to be installed on client wikis
as well, but only the client parts, not the repo parts, whereas
WikibaseMediaInfo doesn’t have this issue.
Several other extensions add new datatypes (but not entity types): at
least Math <https://gerrit.wikimedia.org/g/mediawiki/extensions/Math/>,
Score <https://gerrit.wikimedia.org/g/mediawiki/extensions/Score/>,
Kartographer
<https://gerrit.wikimedia.org/g/mediawiki/extensions/Kartographer>, I
believe.
I’m not aware of any extensions that add new datatypes and are
specifically intended to be used as examples or building blocks for your
own extensions.
Cheers,
Lucas
On 30.05.20 17:52, Yuri Astrakhan wrote:
Hi, I would like to implement a new property type for
my project. Are
there any examples of extensions that add new prop types to wikibase?
I already implemented most of what I need by changing wikibase code,
but I doubt a property to store multiline code snippets will be
accepted into wikibase at this stage, so it has to be done as an
extension. Any suggestions would be appreciated.
Note that I had to change two repos:
https://github.com/nyurik/mediawiki-extensions-Wikibase/pull/1/files
https://github.com/nyurik/data-values-value-view/pull/1/files
_______________________________________________
Wikidata mailing list
Wikidata(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata