Forum:Database??

I was wondering if it's possible to create an database of an wiki, so you can request specific content in text form on 1 location. For example I currently working on an wiki where are id's to them:


 * 1=monster1
 * 2=monster2
 * 3=monster3
 * 4=monster4

I tryed it on another wiki with templates, but that doesn't seem to be really effective since some strings aren't working when you load template inside template inside template... It could be usefull in navigation templates so I can use an math function to calculated the next and previous id.

--Jens Ingels (talk) 18:09, October 23, 2012 (UTC)


 * I believe Semantic MediaWiki is the standard approach to using a wiki as a database [I think Wikia supports it]. I don't actually know anything about SMW myself though so I can't offer any pointers. You probably need to request that it be enabled if it isn't already, the manual is here so you can have a look at it.


 * Building a complex network of templates is doable, but it's more of a hack since the MediaWiki syntax is very awkward for doing any sort of content/parameter transformation [The only thing it does well is wrap things]. You can do it, the Kirby wiki does (Database templates) but SMW may be easier and more effective. Lunarity 19:23, October 23, 2012 (UTC)

Thx for the info, I was trying it again with template during that time. I will look into those databases but does it support mobile skinn? I think I will also have an look to those database templates.

Here's an example that gives trouble when try for templates: style="background: #; width: 100%; ; box-shadow:inset 0 0 10px #; -moz-box-shadow:inset 0 0 10px #;"

I need to replace  too   and   too   that's already an problem when type2 doesn't exist:

I tryed to make it work by adding an ifeq. It seems to work in an sandbox but get broken when I implement it as parameter string:

It's probaly to long so the sting get loaded to fast and so gives an white space I think. I also tryed an switch alternative but that plan was already doomed to fail since words aren't supported:

If someone known an fix, please tell me. The template that get loaded: it's an simple switch code that sort the data like an database.

--Jens Ingels (talk) 19:29, October 23, 2012 (UTC)

Edite: Still didn't figured out the problem. I think it's something with the switch from the color template:

I decided to still try for an template database. I currently figured out how to get the syntax to work with my current problem: --Jens Ingels (talk) 20:12, October 23, 2012 (UTC)


 * (Edit conflict) SMW is an extension. It adds new wikitext code features so the skin is irrelevant. It does something like you type  on the Sneazel page and it automatically creates a database entry saying "Sneazel has AttackType=Dark". You can then query that back using   which will automatically generate a list of the names of every Pokemon that has the Dark type. [Like I said, I've never used it so the above examples are probably not syntactically correct, but this is vaguely what it does] Lunarity 20:38, October 23, 2012 (UTC)

Does this extension requires an staff request? --Jens Ingels (talk) 20:43, October 23, 2012 (UTC)


 * Yes. Enabling/installing extensions require modifying the server, only staff can do that. Lunarity 20:49, October 23, 2012 (UTC)