It sounds like a lot of the functionality you want - adding a class of objects to a page
with properties - is already supported by the Semantic MediaWiki extensions. You can
simply create a Semantic Form to add your new material, and fill in values for whatever
properties you've defined in your wiki.
Then you can query a particular property, property value, or list all materials and
properties in a tabular format using the Semantic Results Format extension.
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org
[mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Albert Coder
Sent: Wednesday, June 25, 2014 5:26 AM
To: mediawiki-l(a)lists.wikimedia.org
Subject: [MediaWiki-l] Need help regarding MediaWiki-extension
Hello!
My name is Albert. I am making an extension in mediawiki which is capable of storing
materials, values of their properties like tensile strength, specific heat etc., add new
material, view all stored values of properties, import/export in CSV, JSON etc. format.
But I have been able to do this to some extent with the help of two extensions.
First extension[1]-> Can add new material, add values for the properties of that
material.
Second extension[2]-> Can show the all the materials and values of their properties
with their timestamp in tabular form.
The code of first extension can be seen at [3]. And the code of second extension can be
seen at [4].
How can I merge the functionalities of both these extensions to make a single extension? I
wish to embed the code of second extension in my first extension. I tried doing this by
writing the code of second extension in a new class which extends SpecialPage class within
main file of my first extension and then included the name of the new class in
$wgAutoloadClasses[' ']. I am not sure if this method is right. In short I wish to
have a link "view all properties" on my special page of first extension such
that the code of my second extension gets executed and shows all properties.
Another query is that I wish to make certain forms like add new property, add new
material-type, add new property-type and so on. How can I navigate those forms with the
hyperlinks on the special page of my first extension. Or how can I add new pages or
special pages perhaps in my extension to achieve the required functionality?
I tried to study linker class from [5] but I could not understand because of absence of
examples. Also I tried to get help from #mediawiki IRC but could not earn much. Being a
beginner I feel it too tough to get a clear view of how to use the inbuilt functions of
mediawiki. I would be grateful if you share/help me with a simple extension which clears
all my doubts as above.
Please see the two extensions working at [1] and [2] respectively.
[1]->
http://202.164.53.122/~albertcoder/mediawiki-1.22.6/index.php/Special:Mat_e…
[2]->
http://202.164.53.122/~albertcoder/mediawiki-1.22.6/index.php/Special:Joins
[3]->
https://github.com/albertcoder/MaterialsDatabase
(Specialmat_ext.php has all the coding)
[4]->
https://github.com/albertcoder/SqlJoinsMediawiki
(SpecialJoins.php has all the coding)
[5]->
doc.wikimedia.org/
--
Thanks
Albert
www.coderalbert.wordpress.com
" Eat Sleep Conquer Repeat "
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l