Skip to content

Conversation

hrideshmg
Copy link
Contributor

This PR adds a new configuration option to extension.json which enables the user to specify a custom wiki API URL. This in conjunction with setting up $wgForeignFileRepos allows one to use another wikimedia instance as the source for images.

Should address #4

Example configuration:

LocalSettings.php

$wgForeignFileRepos[] = [
        'class' => ForeignAPIRepo::class,
        'name' => 'factgrid',
        'apibase' => 'https://test.wikipedia.org/w/api.php',
        'hashLevels' => 2,
];

extension.json

	"config": {
		"WikibaseLocalMediaRemoteApiUrl": {
			"value": "https://test.wikipedia.org/w/api.php",
			"description": "Optional wiki API URL, works in conjunction with $wgForeignFileRepos for retrieving images from any wiki"
		}
	},

This will enable use of images from test.wikipedia.org

@JeroenDeDauw
Copy link
Member

What versions of MediaWiki did you test this on?

@JeroenDeDauw JeroenDeDauw merged commit 42cce5c into ProfessionalWiki:master Feb 15, 2025
6 checks passed
@hrideshmg
Copy link
Contributor Author

hrideshmg commented Feb 15, 2025

What versions of MediaWiki did you test this on?

1.42.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants