1. Go to this page and download the library: Download lucamauri/activitywiki library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lucamauri / activitywiki example snippets
wfLoadExtension( 'ActivityWiki' );
// Master switch — disable to pause all federation without uninstalling
$wgActivityWikiEnabled = true;
// Display name shown on Mastodon and other Fediverse clients
// Defaults to $wgSitename if not set
$wgActivityWikiActorName = null;
// The handle for the wiki actor (the part before @domain)
// Defaults to a slugified $wgSitename if not set
$wgActivityWikiActorUsername = null;
// Short bio shown on Mastodon profile
$wgActivityWikiActorSummary = '';
// Absolute URL to the wiki logo used as the actor avatar
// Defaults to $wgFavicon if not set
$wgActivityWikiActorIcon = null;
// RSA key size in bits for HTTP Signature key pair generation
// Minimum 2048, recommended 4096
$wgActivityWikiKeySize = 2048;
// Namespaces to federate — default is main namespace only
$wgActivityWikiPublishNamespaces = [ NS_MAIN ];
// Which event types to federate
$wgActivityWikiPublishCreations = true;
$wgActivityWikiPublishEdits = true;
$wgActivityWikiPublishDeletions = true;
$wgActivityWikiPublishMoves = true;
$wgActivityWikiPublishMinorEdits = false; // Minor edits suppressed by default
$wgActivityWikiPublishProtections = false;
// Maximum plain-text excerpt length in characters
nginx
# ActivityWiki — WebFinger discovery endpoint
location = /.well-known/webfinger {
fastcgi_param REQUEST_URI /your-script-path/rest.php/activitywiki/webfinger;
fastcgi_param QUERY_STRING $query_string;
# ... your existing fastcgi_pass and other fastcgi_param settings
}
bash
# First-time generation, or check current state (safe, no key yet):
php maintenance/run.php extensions/ActivityWiki/maintenance/GenerateKeys.php
# Deliberate rotation of an existing key:
php maintenance/run.php extensions/ActivityWiki/maintenance/GenerateKeys.php --force
# Rotation, printing the new public key PEM afterward for verification:
php maintenance/run.php extensions/ActivityWiki/maintenance/GenerateKeys.php --force --show
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.