wikifab / explore
Installs: 2 979
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 5
Forks: 2
Open Issues: 2
Language:JavaScript
Type:mediawiki-extension
- dev-master
- 1427.x-dev
- 2.13.2
- 2.13.1
- 2.13.0
- 2.12.2
- 2.12.1
- 2.12.0
- 2.11.1
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.0
- 1.0.1-rc1
- 1.0.0
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-ticket-909
- dev-mikael
- dev-mickael
- dev-ticket-1427
- dev-ticket-422
- dev-julien
- dev-ticket-1408
- dev-ticket-1291
- dev-ticket-1290
- dev-develop
- dev-ticket-1048
- dev-ticket-989
- dev-Add-tools-recycling-categories
This package is auto-updated.
Last update: 2025-02-15 01:02:31 UTC
README
explore Page :
Navigate to the page 'Spécial:WfExplore' to see the full explore page
explore Query :
'exploreQuery' function just display a list of tutorials, accordint to a semantic query
1st param is the query, the second param (optional) is the number limite of results to display. other named parameters can be set :
- sort : field to use to sort results
- limit : number of result to display
- layout : layout to use (see layout config)
Ex : {{#exploreQuery: [[area::Électronique]] | 8}} {{#exploreQuery: [[area::Électronique]] | sort=editdate|limit=8}} {{#exploreQuery: [[area::Électronique]] | sort=editdate|limit=8| layout=event}}
displayExplore function
to display explorer in a page, insert the function displayExplore : {{#displayExplore: params}}
Input Box function
to add an input box to search pages using Special:WfExplore : {{#exploreinputbox:}}
you cant add 2 parameters : the first param is the button text, the second is the placehoder {{#exploreinputbox:GO| placeholder}}
configuration using global vars :
2 vars enable to configure filters params :
$wfexploreCategories = [ $categoriesName => [ CategorisValueName => CategorieValueLabel, ... ], ... ]
$wfexploreCategoriesNames = [ 'Type' => 'int:wfexplore-type' , 'area' => 'int:wfexplore-category', 'Difficulty' => 'int:wfexplore-difficulty', 'Cost' => 'int:wfexplore-cost', 'Complete' => 'Complete', ];
Note : using prefix 'int' enable to use translation key
configure layout to display results :
it is possible to change the layout of results, to do it, set the available layouts in LocalSettings.php : $wgExploreResultsLayouts = [ 'event' => DIR . '/views/layout-event.html' ];
then, when calling the explore with parser function in a page, set the 'layout' params : {{#displayExplore: layout=event}}
configure filters for layout
it is possible te define other filter when a layout is given:
$wfexploreCategoriesByLayout = [ 'event' => [ $categoriesName => [ CategorisValueName => CategorieValueLabel, ... ], ... ] ];
Wikifab Groups config
To configure explore for groups like wikifab, here is the config : (it set no filters for groups)
$wgExploreResultsLayouts = [ 'group' => DIR . '/extensions/WfextStyle/templates/layout-group-search-result.html' ];
$wfexploreCategoriesByLayout = [ 'group' => [] ];
default sort order
Default sort order can be configured using the $wfeSortField var in LocalSettings.php. For instance, to sort by date of last change : $wfeSortField = 'Modification date';
configuration using hooks :
Explore::OnGetFilters it is possible to change categories using hooks, this is recommended for internationalized wiki.
Record hooks in LocalSettings, and set a function, for example :
$wgHooks['Explore::getFilters'][] = 'onExploreGetFilters'; function onExploreGetFilters(& $filters, $layout) { $filters["Type"] = [ ['Oukou'] = 'Oukoukou', ['Ouka'] = 'Oukaka' ]; return true; }