Extension talk:Data

Indexes
What indexing should be used on the data_extension table. John Stanton 19:47, 4 November 2006 (UTC)


 * I think at least item and key columns should be indexed. Nikola 02:28, 16 November 2006 (UTC)

Code
It seems that the following is needed to avoid PHP warnings:

$wgHooks['LanguageGetMagic'][] = 'wfDataLanguageGetMagic';

function wfDataLanguageGetMagic( &$magicWords, $langCode ) { switch ( $langCode ) { default: $magicWords['data']         = array( 0, 'data' ); $magicWords['sort']         = array( 0, 'sort' ); }   return true; }

Patrick 11:36, 5 February 2007 (UTC)

Added default handling
Hi!

I just want to inform you that I have added the handling of defaults to the get function, so that one can use constructs like

which will output "default" if key is not set. I have made it such, that it looks like parameter references in templates

I noticed that I needed this functionality pretty often, and that it can replace the somewhat lengthy

If you want to include this functionality into the extension, just go ahead. Here is the modified "get" function:

Cheers --141.2.138.89 16:27, 6 November 2007 (UTC) (de:Benutzer:olenz)

PHP failing
Just downloaded the code from the 3 Feb update. I get the following error (twice) when I load any wiki page Warning: array_slice [function.array-slice]: The first argument should be an array in /var/www/wikijfh/languages/Language.php on line 1153 Noted that an extra piece of code (function wfDataLanguageGetMagic) is recommended and included in the latest version, except for the line $wgHooks['LanguageGetMagic'][] = 'wfDataLanguageGetMagic'; I get the error with and without this extra line. I have created the required table in wikidb. My LocalSettings includes the following lines include("extensions/Expr.php"); include("extensions/ParserFunctions.php"); include("extensions/Data.php"); Ideas ???


 * The line is there, fourth line of code in wfDataExtension function. But something weird is going on. Try moving data extension to the top of your list of extensions (including it before any other extension), see if that works. Alternarively, you could add a @ at the beginning of the line 1153 in languages/Language.php . Nikola Smolenski 09:32, 9 February 2008 (UTC)

Comparison of Dynamic Pagelist x Semantic Mediawiki
Do you think, Extension:Data should also be listed in this comparison: Comparison of Dynamic Pagelist x Semantic Mediawiki?

If "yes" just add it there. --Jannis 13:49, 29 December 2009 (UTC)

Discussion of Potential Applications of Data Extension
I was recently researching the potential of a WikiData project, but it seems lost and forgotton and that this might be the best avenue for its completion. Is this the case?

Current Understandings
My current understanding is that this extension allows you to search for data left as parser functions within Wikipedia pages. It could be extended into a wikipedia project should there be enough support. It currently uses only text values.

Current Confusions
How can it be used now? (I don't know how to put the php into use...)

Permaculture Database application
Could this be used for an implimentation of a Permaculture Design database in which aspects of permaculture design could be parsed onto wikipedia page (actually better yet wikiSpecies pages) and then searched for and retrieved to find data such as which plants are suitable nitrogen fixers for which climates or forest layers, or the amount of biomass produced by such an animal. The questions associated with this application are:
 * 1) Could this be used in conjuction with the existing wikispecies database as invisible parsers which do not interfere with the viewing of wikispecies but piggyback their database offering varous information?
 * 2) What might a wikiDB project look like? For instance, might a Permaculture wikiDB page be a list of potential data fields, and standardized inputs with interpertation of fields as a launchpad for wikipedia/wikispecies based editing of data function parsers along with information on export of data, how data can be used etc and related wiki projects etc?
 * 3) Could this extension be used to extract data from the wikipedia database into a file (such as an excel file or other database files?)
 * 4) And could the data concivably be converted to other formats (like number) easily IF it conforms to certain standards?