Download the PHP package dl/assetsource-mediawiki without Composer

On this page you can find all versions of the php package dl/assetsource-mediawiki. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package assetsource-mediawiki

Latest Stable Version Total Downloads License

MediaWiki Asset Source

This asset source uses the public API of MediaWiki installations like the Wikipedia, MediaWiki Commons or any other Media Wiki instance to make the used assets searchable within a Neos installation.

Installation

Install the package via composer:

Configuration

You can add arbitrary instances of this asset source, to query different wikimedia instances - e.g. the english and german instance. To do that, just add another configuration block with the specific settings under a custom identifier.

Setting Description
domain The domain on which the MediaWiki instance is available.
label The label of the instance, shown in the backend
searchStrategy A class with implemented search strategy. See the section below for details
searchStrategyOptions Search strategy specific options
useQueryResultCache Whether or not to use the result cache for queries to the API. If used, speeds up the pagination a lot but may return outdated results. The caching lifetime defaults to 1 day.
excludedIdentifierPatterns Asset identifiers which should be filtered out and not displayed. Used to filter out Wikipedias common icons.

Example for accessing the german Wikipedia:

Search Strategies

Searching in the wikipedia for images is a bit tricky. First there is not only one wikipedia instance, but one for each available language. Second an image can be stored in the language specific wikipedia or in Wikimedia Commons and included from there.

The package brings two different search strategies with different pros and cons.

Direct Image Search Strategy

This search strategy uses the filename and available meta data like the description of an asset to search on. That means if you configure the commons.wikimedia.org as domain, the package will search through about ~50 Million asssets available in all languages. But for historical reasons, some images are stored directly in the language specific wikipedia instances and therefore not available with that setting.

Article Search Strategy (Default)

This search strategy fits better to the Wikipedia use case. It doesn't search the images directly but uses the more powerfull article search to receive a number of wiki articles and then queries the images shown on that articles. The benefit is, if you configure the domain to en.wikipedia.org you will get assets, that are uploaded directly to this instance, as well as all fitting assets uploaded to Wikimedia Commons

Setting Description
articleLimit How many articles should be taken into account to query images from. Maximum are 50 articles. Higher values result in more returned articles, but the results may get inaccurate

Usage of images in your project

Please take care of the correct attribution of used photos in the frontend.

Known Issues

See the issue list for known issues and missing features.


All versions of assetsource-mediawiki with dependencies

PHP Build Version
Package Version
Requires neos/neos Version ^4.1 || ^5.0 || ^7.0 || ^8.0
guzzlehttp/guzzle Version ^6.3 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dl/assetsource-mediawiki contains the following files

Loading the files please wait ....