From TestWiki
Jump to: navigation, search

Data types[edit]

Could you provide a list with all data types?

  • Good idea. I have added the page WikiDB/Data types, which covers the currently implemented core types. WikiDB includes an API for adding your own data types, e.g. you could add a URL data type which only accepts valid URLs, and automatically displays them as links. --HappyDog 18:39, 1 December 2006 (GMT)

Templated queries[edit]

I can declare data with a template, is there any way to pull data into a template?

Something like: <repeat table="Companies" template="Infobox company"></repeat>

It would look just like

{{Infobox company |name=Microsoft |founded=1492 |revenue=$8 }}

<data table="Companies" template="Infobox company"> name=Microsoft founded=1492 revenue=$8 </data>

Hi - I'm not sure I quite understand your question. Could you please try rephrasing it? Cheers --HappyDog 16:31, 10 July 2008 (BST)

Can we use it within Template??......[edit]

I ever tried to use this extension in dynamic... but always shows error message no matter within or not within Templates.

<data table="{{{something}}}"> </data>

how can I perform it? Please help!!!

In the current version, it extracts tags from the page before templates are expanded. I'm pretty sure I've fixed this in my local copy, but unfortunately my main PC died recently and I haven't had time to put the hard disks into a new PC yet (I know they're OK, so nothing's been lost - just need to find time to do it!). Once I do I'll check this and update the site with the latest version, which will hopefully fix the problem.
If you register on this site, set up your preferences to allow e-mail notification and add the main WikiDB page to your watchlist then you will get an e-mail when the update comes on-line.
Cheers --HappyDog 14:04, 23 July 2008 (BST)

Work with Parsar function ?[edit]

This is what I'm trying to do...

Here is Template:


<repeat table="Abc">
{{#expr: {{{a}}} * {{{input}}} }}

Here is page:

But I got error message only. Can we do this in future?
It's real an great extension, HappyDog  :)

I'm not quite sure what you're trying to do here. In terms of working with parser extensions, the next version should solve a lot of the current problems (see my response to the previous question), so if you mean that parser functions should be expanded before they are used in the extension then that will be resolved. If you mean something else then I am not quite so sure... Add WikiDB to your watchlist (and make sure you set your e-mail preferences correctly) so you're notified about the next release and if you're still unable to do what you want then please ask again! :-) --HappyDog 13:56, 24 July 2008 (BST)

      • Actually, I need to do some calculation with the data from database. {{{a}}} is the data from the database and {{{input}}} is the data directly from user. Desperately waiting for next version. ******

When will the next version available?[edit]

HappyDog, I would like to do some calculation within the database, When will the next version available? Want it desperately....

Come on..HappyDog~
We are your fans!!
Fans ita.jpg

*grin* ... I'll see what I can do... --HappyDog 14:45, 31 July 2008 (BST)
OK - You talked me into it. I managed to retrieve the data from my old PC and have checked it through, and it all seems in order. I was holding off doing an update as I hadn't written a script to rebuild the DB, but I decided that this shouldn't hold things back, as I probably won't get a chance to do that for a month or so. So here you go! v2 is officially released :-) --HappyDog 17:43, 31 July 2008 (BST) (PS - I have no idea whether it will fix your above issues or not. Please let me know, either way!)

:) When I try to build a Template, I put the codes as below ; (Just installed WikiDB v2. I'm using mediawiki 1.12 but it works fine with the previous version of WikiDB)

<repeat table="Abc">
{{#expr: {{{a1}}} * {{{input}}} }}
//{{{a}}} is the data from the database and {{{input}}} is the data directly from user.

Then I got the error message ; Fatal error: Call to a member function matchStartToEnd() on a non-object in /home/ooplalac/public_html/temmmp/wiki/includes/Parser.php on line 2771 --Jimmyyami 18:31, 5 August 2008 (BST)

Unfortunately it's only been fully tested on 1.6, so I didn't catch that problem. I'm going on holiday for a few weeks, but I will look at it when I get back. Sorry I can't sort it out any more speedily. --HappyDog 01:23, 5 August 2008 (BST)
It's OK, I'll keep trying.  :) --Jimmyyami 18:31, 5 August 2008 (BST)

Hi - just to update you, this bug has now (hopefully!) been fixed. Please let me know if you have any more problems having upgraded to the latest version. Cheers --HappyDog 02:26, 23 October 2008 (BST)

At last...... Everything seems better, So Far So Good. Cheers --Jimmyyami 19:37, 15 November 2008 (BST)
No probs :-) --HappyDog 19:14, 15 November 2008 (GMT)