2017 © Pedro Peláez
 

mediawiki-extension explore

image

wikifab/explore

  • Friday, July 6, 2018
  • by pyro853
  • Repository
  • 3 Watchers
  • 1 Stars
  • 223 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 39 Versions
  • 3 % Grown

The README.md

parsers usage :

explore Page :

Navigate to the page 'Spécial:WfExplore' to see the full explore page, (*1)

explore Query :

'exploreQuery' function just display a list of tutorials, accordint to a semantic query, (*2)

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), (*3)

Ex : {{#exploreQuery: [[area::Électronique]] | 8}} {{#exploreQuery: [[area::Électronique]] | sort=editdate|limit=8}} {{#exploreQuery: [[area::Électronique]] | sort=editdate|limit=8| layout=event}}, (*4)

displayExplore function

to display explorer in a page, insert the function displayExplore : {{#displayExplore: params}}, (*5)

Input Box function

to add an input box to search pages using Special:WfExplore : {{#exploreinputbox:}}, (*6)

you cant add 2 parameters : the first param is the button text, the second is the placehoder {{#exploreinputbox:GO| placeholder}}, (*7)

configuration using global vars :

2 vars enable to configure filters params :, (*8)

$wfexploreCategories = [ $categoriesName => [ CategorisValueName => CategorieValueLabel, ... ], ... ], (*9)

$wfexploreCategoriesNames = [ 'Type' => 'int:wfexplore-type' , 'area' => 'int:wfexplore-category', 'Difficulty' => 'int:wfexplore-difficulty', 'Cost' => 'int:wfexplore-cost', 'Complete' => 'Complete', ];, (*10)

Note : using prefix 'int' enable to use translation key, (*11)

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' ];, (*12)

then, when calling the explore with parser function in a page, set the 'layout' params : {{#displayExplore: layout=event}}, (*13)

configure filters for layout

it is possible te define other filter when a layout is given:, (*14)

$wfexploreCategoriesByLayout = [ 'event' => [ $categoriesName => [ CategorisValueName => CategorieValueLabel, ... ], ... ] ];, (*15)

Wikifab Groups config

To configure explore for groups like wikifab, here is the config : (it set no filters for groups), (*16)

$wgExploreResultsLayouts = [ 'group' => DIR . '/extensions/WfextStyle/templates/layout-group-search-result.html' ];, (*17)

$wfexploreCategoriesByLayout = [ 'group' => [] ];, (*18)

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';, (*19)

configuration using hooks :

Explore::OnGetFilters it is possible to change categories using hooks, this is recommended for internationalized wiki., (*20)

Record hooks in LocalSettings, and set a function, for example :, (*21)

$wgHooks['Explore::getFilters'][] = 'onExploreGetFilters'; function onExploreGetFilters(& $filters, $layout) { $filters["Type"] = [ ['Oukou'] = 'Oukoukou', ['Ouka'] = 'Oukaka' ]; return true; }, (*22)

The Versions

06/07 2018

dev-master

9999999-dev

  Sources   Download

04/07 2018

2.6.3

2.6.3.0

  Sources   Download

28/06 2018

2.6.2

2.6.2.0

  Sources   Download

25/06 2018

2.6.0

2.6.0.0

  Sources   Download

25/06 2018

2.6.1

2.6.1.0

  Sources   Download

13/06 2018

dev-julien

dev-julien

  Sources   Download

13/06 2018

dev-ticket-638

dev-ticket-638

  Sources   Download

13/06 2018

dev-ticket-640

dev-ticket-640

  Sources   Download

01/06 2018

dev-ticket-639

dev-ticket-639

  Sources   Download

09/05 2018

2.5.1

2.5.1.0

  Sources   Download

02/05 2018

dev-ticket-591

dev-ticket-591

  Sources   Download

23/04 2018

2.5.0

2.5.0.0

  Sources   Download

23/04 2018

dev-ticket-584

dev-ticket-584

  Sources   Download

19/04 2018

dev-ticket-580

dev-ticket-580

  Sources   Download

29/03 2018

2.4.0

2.4.0.0

  Sources   Download

24/03 2018

2.3.0

2.3.0.0

  Sources   Download

12/03 2018

2.2.2

2.2.2.0

  Sources   Download

26/02 2018

2.2.1

2.2.1.0

  Sources   Download

26/02 2018

2.2.0

2.2.0.0

  Sources   Download

19/01 2018

2.1.4

2.1.4.0

  Sources   Download

12/01 2018

2.1.3

2.1.3.0

  Sources   Download

10/01 2018

2.1.2

2.1.2.0

  Sources   Download

09/01 2018

2.1.1

2.1.1.0

  Sources   Download

09/01 2018

2.1.0

2.1.0.0

  Sources   Download

11/12 2017

2.0.3

2.0.3.0

  Sources   Download

17/11 2017

2.0.2

2.0.2.0

  Sources   Download

27/10 2017

2.0.1

2.0.1.0

  Sources   Download

20/09 2017

2.0.0

2.0.0.0

  Sources   Download

19/09 2017

1.0.1-rc1

1.0.1.0-RC1

  Sources   Download

18/09 2017

1.1.0

1.1.0.0

  Sources   Download

04/08 2017

1.0.0

1.0.0.0

  Sources   Download

23/06 2017

dev-Add-tools-recycling-categories

dev-Add-tools-recycling-categories

  Sources   Download

16/05 2017

0.2.5

0.2.5.0

  Sources   Download

04/05 2017

0.2.4

0.2.4.0

  Sources   Download

05/04 2017

0.2.3

0.2.3.0

  Sources   Download

21/12 2016

0.2.2

0.2.2.0

  Sources   Download

21/12 2016

0.2.1

0.2.1.0

  Sources   Download

19/12 2016

0.2.0

0.2.0.0

  Sources   Download

20/10 2016

0.1.0

0.1.0.0

  Sources   Download