-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for adding extensions #807
Comments
Hi! 👋 Thank you so much for opening your first issue with us! 🎉 We are thrilled to have you here and really appreciate you taking the time to contribute. Your input is valuable in making our project better for everyone. If you have any questions, do not hesitate to ask. We're here to help and support you along the way! Here are a few links to get you started:
Looking forward to collaborating with you. We will get back to you on this issue within the next 14 days. 😊 Happy contributing! 🚀 |
Regarding extensions, I think that also the following configuration: # Load extensions if present, alphabetically ordered by filename
foreach (glob("LocalSettings.d/*.php") as $filename)
{
include $filename;
} needs a bit of explanation in the documentation. |
Please excuse the long wait, we have been a bit under stuffed during the holiday season. Thanks a lot for sharing your approach. This is definitely an option to add extensions to your Mediawiki. The reason why we do not officially advertise such an approach at the moment is that the responsibility for updates is now split between you and us. We ship updates to Wikibase Suite (as updates to docker containers) including updates to the Mediawiki extensions we bundle. But we cannot update the extensions you add in such a way. We are even planning for auto updates in the future to keep your instance patched automatically. User added extensions could then still lead to bugs and security issues. We still need to come up with a good solution here. Until then, your approach is definitely a good option. Just to connect the dots... An alternative approach is to build your own wikibase container with your extensions added. Best, |
Hi @lucamauri, This is true. This code will be put into your # Load extensions if present, alphabetically ordered by filename
foreach (glob("LocalSettings.d/*.php") as $filename)
{
include $filename;
} This will include all php files from In simple cases this could just be one line to load the extension: wfLoadExtension( 'Babel' ); In the wikibase case, the extension loading could require some more instructions: # Wikibase Repository
wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
# Wikibase Client
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php"; I think at the moment we somehow consider this code "internal" and not an explicit interface to the user. This is related to the fact that we are still planning on a solid design to include user extensions (see above). Once we are there, we also plan to document all the steps required. Best, |
In my
deploy/
folder I created a folder calledextensions/
where I put some extensions (e.g. WikibaseQualityConstraints).I then created
docker-compose.override.yml
that looks like:I feel like this would be something nice to put in the README for new people.
The text was updated successfully, but these errors were encountered: