Hello, I hope that I'm sending this queston to the appropriate place.
I'd like to create a wiki where articles are restricted to a specific format, for example the format will be that an article can have a number of separate paragraphs and each paragraph will have a title. So I'd like to store the parts of the article (paragraphs, titles) as separate fields in a database. I will then display the database data using a custom display.
Do I have to write my own extension to MediaWiki? Can I use the Semantic Forms extension which seems to provide all kinds of helpful ways of defining classes with properties, or is that a misuse of the Semantic Forms extension? Is there a different extension or way that I can do things like this where I'm basically using MediWiki to fill a database and then to display the contents of the database? Or maybe MediaWiki is not even the tool that I should be using?
Thank you very much.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 7656 (20121103) __________
The message was checked by ESET NOD32 Antivirus.
It's possible with Semantic Forms from Semantic MediaWiki extension bundle. The basic idea there is that you have so called 'properties' of the page that can be paragraphs of text, number, coordinates, etc. ----- Yury Katkov, WikiVote
On Wed, Feb 27, 2013 at 6:33 AM, Eli Handel elihandel@gmail.com wrote:
Hello, I hope that I'm sending this queston to the appropriate place.
I'd like to create a wiki where articles are restricted to a specific format, for example the format will be that an article can have a number of separate paragraphs and each paragraph will have a title. So I'd like to store the parts of the article (paragraphs, titles) as separate fields in a database. I will then display the database data using a custom display.
Do I have to write my own extension to MediaWiki? Can I use the Semantic Forms extension which seems to provide all kinds of helpful ways of defining classes with properties, or is that a misuse of the Semantic Forms extension? Is there a different extension or way that I can do things like this where I'm basically using MediWiki to fill a database and then to display the contents of the database? Or maybe MediaWiki is not even the tool that I should be using?
Thank you very much.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 7656 (20121103) __________
The message was checked by ESET NOD32 Antivirus.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Eli,
I've just had the same problem: in my case it was reference data about an article. It is bizarrely enough the task I am just working on. I have two motivations for answering: one is that this approach works and it answers your questions, the second is to perhaps get some feedback on the approach and see if it can be done in a more elegant way.
I solved the problem by having a single page that shows the reference data. I has to use the extension https://www.mediawiki.org/wiki/Extension:UrlGetParameters to allow access to the url parameters and my own parser extension to get the data out of the file system. I suspect you could use an existing extension if you wanted to get data out of a database.
In my case the page I have created is http://www.softwarefm.org/wiki/DependsOn. This page takes two url parameters "groupId" and "artifactId" (this section of the wiki holds data about maven artifacts). In your case you could just pass in the primary key for the article. At the moment this page looks like
{{#dependsOn:{{#urlget:groupId}}|{{#urlget:artifactId}}}}
Currently the parser extension does formatting which is obviously A Bad Thing(TM), so I am teasing the view out of the "dependsOn" parser extension into the DependsOn page.
To link to this page I am using a template at http://www.softwarefm.org/wiki/Template:LinkToDepends, which holds
<noinclude>The order of parameters is LinkText, GroupId, ArtifactId.</noinclude>
<span class="plainlinks">[{{fullurl:DependsOn}}?groupId={{{2}}}&artifactId={{{3}}} {{{1}}}]</span>
I use this by
{{LinkToDepends|Link To Depends|myGroupId|myArtifactId}}
I hope this was helpful
regards
Phil
mediawiki-l@lists.wikimedia.org