Bücher online kostenlos Kostenlos Online Lesen
Working With MediaWiki

Working With MediaWiki

Titel: Working With MediaWiki Kostenlos Bücher Online Lesen
Autoren: Yaron Koren
Vom Netzwerk:
has, is not default behavior, but it can be done by setting the values of the variables $sdgFiltersSmallestFontSize and $sdgFiltersLargestFontSize in LocalSettings.php. Here were the settings used for this particular display:
$sdgFiltersSmallestFontSize = 12;
$sdgFiltersLargestFontSize = 21;
    You can also change the display of the result pages, to show them in, say, a table or a map, instead of just as a list of page names. To show results in a table, you could add something like the following to the category page:
[[Has display parameters::? Has coordinates; format=googlemaps| ]]
    There are various other features in Semantic Drilldown: you can manually set categories to appear or not appear in the list of categories (using the strings “__SHOWINDRILLDOWN__” and “__HIDEFROMDRILLDOWN__”), you can change the list of categories to show up as horizontal tabs instead of a vertical list, you can have certain filters only show up after other filters have been clicked on, etc. For more information and options, see the Semantic Drilldown homepage, at:
https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown

Semantic Watchlist
    The Semantic Watchlist extension lets users “watch” certain properties within certain groups of pages (i.e., categories, namespaces or concepts), in order to be notified by email any time one or more of those properties changes in any of those pages.
    Figure 19.4 shows the interface, at the page Special:WatchlistConditions, that Semantic Watchlist provides for administrators in order to create watchlist groups for the wiki. Each watchlist group consists of a category, namespace or concept, a set of one or more properties to be watched, and then optionally some specific text that users get emailed with on certain combinations of property and value.
    Figure 19.4 Special:WatchlistConditions, defined by the Semantic Watchlist extension
    Users can then choose to “subscribe” to any such group. For performance reasons, only administrators can define watchlist groups; regular users can’t (though of course they can request for new groups to be made).
    You can read more about Semantic Watchlist here:
https://www.mediawiki.org/wiki/Extension:Semantic_Watchlist

20  External data and applications
External Data
    We live in a world with an enormous and ever-growing amount of data, contained in lots of different sources: databases, spreadsheets, APIs, offline files and more. Sadly, most of it will never be entered into any wiki. But it can still be displayed and used within wikis, via the External Data extension. External Data provides an easy way to query data stored in various computerized formats. It can then be displayed on wiki pages or, via Semantic MediaWiki, stored for usage alongside the wiki’s own data.
    There are three basic data sources that External Data can query, handled by three different parser functions: #get_web_data, #get_db_data and #get_ldap_data. Let’s go through each one in turn.
Getting data from the web
    #get_web_data is used to retrieve data from any page on the web that holds structured data. It is usually used to retrieve data from a URL-based API, or what’s sometimes known as a RESTful API (the "REST" here stands for "Representational State Transfer"); but it can also be used to get data from a standalone file. If it can read the contents of such a page, it can then retrieve some or all of the values that that page contains, and display them on the wiki.
    #get_web_data is called in the following way:
{{#get_web_data:url= url |format= format
|data= local variable name 1=external variable name 1,local variable name 2=external variable name 2, ...
|filters= external variable name 1=filter value 1,external variable name 2=filter value 2, ...}}
    The ’url’ parameter is the URL being accessed. It does not have to be accessible to the user viewing the wiki, but it does have to be accessible to the wiki’s own server.
    The ’format’ parameter holds the format that the data is in. The allowed values are  ’CSV’, ’CSV with header’,  ’GFF’,  ’JSON’ and ’XML’. These represent, as you might guess, the data formats CSV, GFF, JSON and XML, respectively.
    CSV, JSON and XML you may well have heard of: these are standard formats for representing data. CSV is an old, very simple format. It stands for “comma-separated values”, and that’s essentially all it is. The difference between ’CSV’ and ’CSV with header’ is that, for ’CSV’,

Weitere Kostenlose Bücher