On 01/03/2008, DanTMan dan_the_man@telus.net wrote:
Sorry, I couldn't get time to look over and reply for awhile.
Yes, you should be able to do the same with Semantic MediaWiki. The primary difference between what you're doing in DPL and what you would be doing with SMW is that firstly, DPL restricts you to only being able to manage things with the Categories, SMW still works with categories, but also uses semantic attributes which will work even better for you in a number of cases. And secondly, rather than that dpl command which you're using to extract a single parameter from a template, you would instead have the included template add a semantic attribute to the page, and grab that using an #ask query. Actually you'd likely put the box inside of a template referenced inside of an ask query elsewhere which would allow you to use variables rather than doing multiple queries on the same page (bad for performance).
Actually, the moment you think of using something like [[Category:CU customer001]] you should probably stop and think again about instead making /CU customer/ a semantic attribute and using something like [[CU customer::001]] in a page. And use relations for other pages related to it, I haven't looked into them much but something like [[Has customer::001]] on a server page to relate it to the customer, and even then you could use an #ask query to list it in the box for that customer.
As for Semantic Forms, I know that it works by modifying templates, but I don't know if it can be uprooted from SMW. I have a feeling that it's integrated at a fair strong level to allow you to do things like creating a dropdown which would list useable values for a property as possible inputs. Perhaps something like a dropdown list of all current available customers you could attribute a server to.
~Daniel Friesen(Dantman) of: -The Gaiapedia (http://gaia.wikia.com) -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) -and Wiki-Tools.com (http://wiki-tools.com)
Herta Van den Eynde wrote:
On 27/02/2008, DanTMan dan_the_man@telus.net wrote:
Infobox templates separated and called by each other... You mean? [[Template:Foo]] has [[Category:Foo]] [[Template:Bar]] has [[Category:Bar]] [[Template:FooBar]] includes both of them. And [[FooBar]] includes {{FooBar}} and as a result has the categories Foo and Bar. Ya, that's all done with templates, it's got nothing to do with a DPL vs. Semantic MediaWiki difference, so whichever method you use you can still do that kind of thing. Actually, SMW is meant to be done using templates, they refer to the term "Semantic templates" allot because good practice is to put common attributes into templates to simplify and automate the use of them. A SMW version of that use would be something like: [[Template:Foo]] has [[Property::Foo]] [[Template:Bar]] has [[Property::Bar]] [[Template:FooBar]] includes both of them. And [[FooBar]] includes {{FooBar}} and as a result has Foo and Bar in it's 'Property'.
Actually, Semantic Forms basically covers your entire plan of a "Front-end". You can create custom forms with special markup and those forms can be used to edit pages with your infobox templates included
in
them. You can even then include those info final articles.
~Daniel Friesen(Dantman) of: -The Gaiapedia (http://gaia.wikia.com) -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) -and Wiki-Tools.com (http://wiki-tools.com)
Herta Van den Eynde wrote:
On 27/02/2008, DanTMan dan_the_man@telus.net wrote:
Hmmm... "relationships"
Whether or not you've fixed the problem. Have you taken a look at Semantic MediaWiki and Semantic Templates? What you're doing seams
a
lot
more like what SMW is meant to do than what DPL is for.
~Daniel Friesen(Dantman) of: -The Gaiapedia (http://gaia.wikia.com) -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) -and Wiki-Tools.com (http://wiki-tools.com)
Thanks for the suggestion, Dan.
No, I haven't looked at Semantic MediaWiki in great detail. Setting up this wiki was one of those proof of concepts projects which
turned
into a "we needed this yesterday".
As far as I could see, using dpl has the advantage that the infobox templates can be put in separate pages, so that they can easily be replaced, and can also be called from the final article itself.
As I explained, we're starting out with a minimal set of data,
because
we're currently more interested in the structure, and the final customer-service-servers articles where people can add free text (instructions on how to repair things for starters).
The idea is to later create a new set of infobox templates which
will
be pre-loaded with more detailed data from the CMDBs, but for which
we
will also write a front-end so that users can only pick predefined values for certain variables (or 'properties' in semantic
speak). If
the variables are embedded in the customer-service-servers articles,
I
wouldn't know how to add more variables automatically, other than starting to manipulate the article data in the database, which I prefer not to.
But then, there still is a lot I don't know about Mediawiki and its extensions, so feel free to correct me or point me to better ways of doing things. Always happy to learn.
Kind regards,
Herta
The Semantic Forms definitely sounds like it will help achieve our goal. But I'm still not clear about the Semantic Mediawiki. Perhaps a "small" example will explain it better. (Hope you have time to read this.) Right now, I have a page [[Infobox SVR SVR001]] which looks like this:
[[Category:Server]] [[Category:CU customer001]] [[Category:SC service001]]
{{Infobox Server Info | svr_name = SVR001 | svr_customer = [[CU customer001|customer001]] | svr_ctct = [[IR person001|person001]] | svr_sbu_port = 14001 }}
I have a [[Template:HW Server]], which looks like this:
{| | '''name:''' | {{#dpl: | title=Infobox SVR {{{svr_name}}} | include={Infobox Server Info}:svr_name }} |- | '''customer:''' | {{#dpl: | title=Infobox SVR {{{svr_name}}} | include={Infobox Server Info}:svr_customer}} |- | '''server contact:''' | {{#dpl: | title=Infobox SVR {{{svr_name}}} | include={Infobox Server Info}:svr_ctct}} |}
I then have an actual article page [[SVR SVR001]] that looks like this:
[[Category:Server]] [[Category:CU customer001]] [[Category:SC service001]]
{{HW Server | svr_name = SVR001 }}
<!--- Free text. E.g., --->
To log into this server, use port {{#dpl: | title=Infobox SVR
{{{SVR001}}}
| include={Infobox Server Info}:svr_sbu_port}}.
I may have other articles that refer to data in [[Infobox SVR
SVR001]]. E.g.,
the [[Template:SC Service]] will pick up all servers belonging to a
given
service using this snippet:
{{#dpl: | category = Server | category = SC {{{sc_id}}} | titlematch = Infobox SVR % | noresultsheader = {{Warning_Box | text = server(s) missing!}} | include = {Infobox Server
Info}:svr_name:svr_ctct:svr_customer
| table = class=sortable border=2
cellpadding=2,-,server,contact,customer }}
The idea is that I can e.g., change the contact in single place, add a
new
server, generate a list of all services without servers, etc., without having to update any of the other pages.
Can you do similar things with the Semantic Mediawiki?
Can you use Semantic Forms without the Semantic Mediawiki?
Kind regards,
Herta
I much appreciate your detailed explanations, Dan.
We have a kick-off meeting for the wiki project this Wednesday, so it's too late to go Semantic Wiki at this point, but I'll definitely look into it for phase 2. (Hopefully mid-April if nothing unexpected pops up.)
Kind regards,
Herta