Extension:Data Aggregator

What can this extension do?
The extension: Data Aggregator allows users to aggregate data from different pages, those pages must be conformed to a unified template. Data Aggregator will pull the specific data field from those pages and compose it into a single table. This extension can be widely used in comparison table and automated information aggregation.

Simple Usage
Sample: .

You have to specify the template name in the syntax,please note the template name must be same as its page name, and it's case-sensitive.

For example: Assume you have a template called 'Template:My Template', and your template page is http://mymediawiki.com/Template:My_Template, that means you have to specify your template name like this:



Advanced Usage
You can choose which row title to be displayed in the table with rowtitiles option:



A | (vertical bar/pipe) separates each row title. If you do not supply this option, all rows will be shown.

You may also customize the table with the standard table tags: border, cellspacing, cellpadding, class, align, and style. For example:



Any text between  and  will appear ABOVE the table that is produced.

Installation Instruction
To install this extension, copy and save the source code as data_aggregator.php, then put it in the mediawiki extension folder e.g. /var/lib/mediawiki/extensions. Add the following to LocalSettings.php:

Caching Note
MediaWiki caches pages. So, a change to a template value will not immediately show up in the Data Aggregator table. You can force it to update by going to the page with the table, clicking on edit, and then either saving the page unchanged, or - in the URL - changing "edit" to "purge". It would be nice if this extension added a small "update" link that purges the page.

Without some additional cache management, the extension will always show the data that were present the last time someone manually saved or purged the page, making this extension problematic in practice.

Code
\n";	}	else	{		// No data found		$output.= "Template ".$argv["template"]." has no data. Please double check your template name spelling.";	}	return $output; }

?>