Extension:YaShareForWiki
|
YaShare for Wiki Release status: stable |
|||
|---|---|---|---|
| Implementation | Tag | ||
| Description | Allow inclusion of social networking buttons. | ||
| Last version | 0.2.1 (2012-04-05) | ||
| MediaWiki | 1.15.0+ | ||
| License | GPL | ||
| Download | Download code | ||
|
|||
|
|||
|
|||
|
Check usage (experimental) |
|||
Contents |
[edit] What can this extension do?
Allow inclusion of social networking buttons. The extension based at Yandex Share API.
[edit] Installation
- Download the latest version and extract it into the extensions folder of your MediaWiki installation.
- Enable the extension by adding this line to your LocalSettings.php:
require_once('extensions/YaShare4Wiki/YaShare4Wiki.php');
[edit] Configuration parameters
There are various options for extension, you can put them into your LocalSettings.php file line. However, extension should work even out-of box.
[edit]
If not set, no share box is integrated (this is the default). Integrating a share box into the sidebar only works with skins based upon SkinTemplate, that is, Modern, Monobook, Chick, Simple, and MySkin, but not Standard, Nostalgia or CologneBlue.
$wgYaShare4WikiSidebar = true; #Integrating the share box in the sidebar
[edit]
- $wgYaShare4WikiCntStType
- style type of the block which show a pop-up menu. Default is YAS4W_ST_BUTTON.
You can use following style types:
-
- button
- (configuration constant YAS4W_ST_BUTTON);
- link
- (configuration constant YAS4W_ST_LINK);
- icon with no text
- (configuration constant YAS4W_ST_ICON);
- witout a pop-up menu
- (configuration constant YAS4W_ST_NONE).
$wgYaShare4WikiCntStType = YAS4W_ST_NONE;
- $wgYaShare4WikiBarStType
- style type of the block at the sidebar which show a pop-up menu. Default is YAS4W_ST_LINK.
You can use following style types:
-
- button
- (configuration constant YAS4W_ST_BUTTON);
- link
- (configuration constant YAS4W_ST_LINK);
- icon with no text
- (configuration constant YAS4W_ST_ICON).
$wgYaShare4WikiBarStType = YAS4W_ST_BUTTON;
[edit] Supported Services
- $wgYaShare4WikiServices
- an array defining the supported services.
The key is the name of a service. If value is either key/value configuration array or be not specified.
Default is:
$wgYaShare4WikiServices =array( 'vkontakte', 'facebook', 'odnoklassniki', 'lj', 'gplus', 'twitter', 'liveinternet', 'moikrug', 'moimir', 'yaru', 'myspace', 'tutby', 'blogger', 'juick', 'friendfeed', 'linkedin', 'digg', 'evernote', 'yazakladki', 'delicious', 'diary', );
Links configuration:
$wgYaShare4WikiServices['vkontakte']['at-popup'] = true; $wgYaShare4WikiServices['facebook']['at-quick']= true; $wgYaShare4WikiServices['odnoklassniki']['at-popup'] = false; $wgYaShare4WikiServices['odnoklassniki']['at-quick']= false;
Redefine services and service order:
$wgYaShare4WikiServices =array( 'facebook'=>array('at-quick'=> true), 'vkontakte' =>array('at-popup'=> true), 'odnoklassniki'=>array('at-popup'=> true, 'at-quick'=> true), 'myspace', );
[edit] Usage
The custom tag is called <ys4w>. For example, if you put <ys4w /> on a wiki page, it will show the social networking buttons.
Syntax:
<ys4w />
or
<ys4w></ys4w>
[edit] See also
| Language: | English • Русский |
|---|
