Open main menu

Extension:SocialcastOGP

MediaWiki extensions manual
OOjs UI icon advanced.svg
SocialcastOGP
Release status: beta
Implementation Data extraction, Parser function
Description This extension adds Open Graph meta tags and Socialcast REACH extensions to share the content with your organization.
Author(s) Monica Wilkinson (Ciberchtalk)
Latest version 0.1
License GPL2+
Download
$wgSocialcastProfileToken, $wgSocialcastUseMicrodata , $wgSocialcastCommunityUrl, $wgSocialcastButtonToken, $wgSocialcastDiscussionToken
Translate the SocialcastOGP extension if it is available at translatewiki.net
Check usage and version matrix.

What can this extension do?Edit

SocialcastOGP is based on Extension:OpenGraphMeta and provides OpenGraph protocol metadata for articles on the wiki for Socialcast to extract. The primary use for this extension is for any wiki that provides its users a button to "Like" pages on the wiki and a comment box to share comments with the rest of your Socialcast community.

This extension includes a parser function {{#setmainimage:Filename.ext}} which also exports what it is passed so you can use it easily in a [[File:{{#setmainimage:Filename.ext}}|thumb|right|...]] format can be used to set the image in the article which you prefer Socialcast to use when displaying information about the page on your wiki (hint: This works very nicely when you incorporate it into an infobox template making the infobox image the preferred image for 3rd parties to use).

For more details see How to build a media wiki extension for Socialcast

UsageEdit

To add any reach extension in your wiki page you can use the following magic word:

{{#reach:profile_stream_id | width:300px;height:60px | afbb21af72dea1804bb4 }}

Download instructionsEdit

Please cut and paste the code found below and place it in $IP/extensions/ExtensionName/ExtensionName.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

InstallationEdit

  1. Copy the contents of SocialcastOGP MediaWiki Extension into your extensions directory. Choose the version that matches your version of MediaWiki.
  2. Add
    $wgSocialcastUseMicrodata = false;
    $wgSocialcastCommunityUrl = "demo.socialcast.com";
    $wgSocialcastDiscussionToken = "njjfjjf198192";
    $wgSocialcastButtonToken = "9485hdhd823u82"; // recommend button
    $wgSocialcastProfileToken = "349030394nsdsjd";
    require_once( "$IP/extensions/SocialcastOGP/SocialcastOGP.php" );
    
    to the bottom of LocalSettings.php inserting the proper tokens for each extension.
  3. Installation can now be verified through Special:Version of your wiki.

Configuration parametersEdit

  1. $wgSocialcastUseMicrodata set to true to use Microdata instead of RDFa with the Open Graph Vocabulary. For more details see http://developers.socialcast.com/publish/open-graph-protocol/
  2. $wgSocialcastButtonToken is the opaque token for the Recommendation button extension you created for your Media Wiki instance
  3. $wgSocialcastDiscussionToken is the opaque token for the discussion extension you created for your Media Wiki instance
  4. $wgSocialcastProfileToken is the opaque token for the profile stream extension you created for your Media Wiki instance
  5. $wgSocialcastCommunityUrl is the url for your community. Ex: "https://demo.socialcast.com"

See AlsoEdit

  • Extension:Description2 – Provides page description information. When installed OpenGraphMeta will use the information it extracts from articles.