Difference between revisions of "TaskForSaid"
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{ #ask:[[IsA::Event]] {{#ifeq:{{#urlget:limit}}}} [[Ordinal:{{#urlget:ordinal|1}}]] | + | {{ #ask:[[IsA::Event]] {{#ifeq:{{#urlget:limit}}}} [[Ordinal::{{#urlget:ordinal|1}}]] |
|?Acronym | |?Acronym | ||
|mainlabel=Event | |mainlabel=Event | ||
Line 15: | Line 15: | ||
1. this can be done by changing configuration parameters by the site administrators according to the configurations of the server. The maximum number of rows printed is set by the configuration parameter $smwgQMaxInlineLimit (500 by default) for setting the maximal number of rows ever printed by queries or the configuration parameter $smwgQMaxLimit (1000 by default) setting the maximal number of rows ever retrieved by queries in the "LocalSettings.php" file. The limit parameter will not normally help to increase the number beyond this limit. | 1. this can be done by changing configuration parameters by the site administrators according to the configurations of the server. The maximum number of rows printed is set by the configuration parameter $smwgQMaxInlineLimit (500 by default) for setting the maximal number of rows ever printed by queries or the configuration parameter $smwgQMaxLimit (1000 by default) setting the maximal number of rows ever retrieved by queries in the "LocalSettings.php" file. The limit parameter will not normally help to increase the number beyond this limit. | ||
− | 2-4. please see the query above. Please use the following URL to pass limit and ordinal parameters (https://www.openresearch.org/wiki/TaskForSaid?limit=10 | + | 2-4. please see the query above. Please use the following URL to pass limit and ordinal parameters (https://www.openresearch.org/wiki/TaskForSaid?limit=10&ordinal=1). |
5. The issue is not clear. What is meant by hide <code><nowiki>[[Category:{{#urlget:field}}]]</nowiki></code> in the #ask queries? In addition, there is no ‘field’ in the above query. | 5. The issue is not clear. What is meant by hide <code><nowiki>[[Category:{{#urlget:field}}]]</nowiki></code> in the #ask queries? In addition, there is no ‘field’ in the above query. |
Latest revision as of 22:29, 8 April 2021
Loading...
Solution
1. this can be done by changing configuration parameters by the site administrators according to the configurations of the server. The maximum number of rows printed is set by the configuration parameter $smwgQMaxInlineLimit (500 by default) for setting the maximal number of rows ever printed by queries or the configuration parameter $smwgQMaxLimit (1000 by default) setting the maximal number of rows ever retrieved by queries in the "LocalSettings.php" file. The limit parameter will not normally help to increase the number beyond this limit.
2-4. please see the query above. Please use the following URL to pass limit and ordinal parameters (https://www.openresearch.org/wiki/TaskForSaid?limit=10&ordinal=1).
5. The issue is not clear. What is meant by hide [[Category:{{#urlget:field}}]]
in the #ask queries? In addition, there is no ‘field’ in the above query.
Anyway, #urlget: is used to get a parameter from the URL to assign it to a property. A default value is used to set the value if the URL does not contain this parameter.
e.g., it should be [[Category:{{#urlget:field|chemistry}}]]
.
What improvements to that extension you could imagine?
The extension could support multi-value fields for the same parameter. e.g., consider the parameter city. If the user wants to retrieve conferences hold in only Berlin and Hannover, the parameter might be passed in the URL as ?city=Berlin, Hannover
.
The values then can be easily retrieved by .split(',')
method.
Another code improvement: The code should handle the case of parameters like city[[0] and city[0]].