Extension:Snap! Project Embed

MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
SnapProjectEmbed
Release status: stable
SnapProjectEmbed example.png
Implementation Parser function
Description An extension to embed Snap! Projects into MediaWiki pages
Author(s) R4356th, GrahamSH-LLK
Latest version 3.0.0
MediaWiki 1.35+
PHP 7.0+
License GNU General Public License 3.0 or later
Download
Example Snap! Wiki
snap, snap-project

Check usage and version matrix.

The Snap! Project Embed extension adds a system for embedding Snap! projects. It uses <snap> tags.

InstallationEdit

  • Download and place the file(s) in a directory called Snap! Project Embed in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'Snap! Project Embed' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

UsageEdit

  • Loading a project with Snap!'s default width and height: <snap project="project-name" user="user" />
  • Loading a project with custom width and height:
  • <snap project="project-name" user="user" width="width" height="height" />
  • Loading a project without showing the title and author of the project (defaults to true): <snap project="project-name" user="user" width="width" taa="false" />
  • Loading a project without the edit button (defaults to true): <snap project="project-name" user="user" pause="false" />
  • Loading a project without the pause button (defaults to true): <snap project="project-name" user="user" pause="false" />

You can also use the extension like this- <snap project="project-name" user="user"></snap>. Additionally, instead of using the <snap> tag, you can also use the <snap-project> tag.

If you get a error message, you probably forgot the project name or the username. Error: Username Missing means that you forgot the username, and Error: Project Name Missing means that the project name is missing.

CompatibilityEdit

The development of Snap! Project Embed occurs on the main branch. Once a new version is ready to be released, the new code is pushed to the stable branch. These two branches always have support for the latest LTS version of MediaWiki and newer versions.

See alsoEdit