DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:socialite

Socialite Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" yes
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" unknown

plugin Adds responsive lightweight social share buttons anywhere on page

Last updated on
2017-12-07
Provides
Syntax
Repository
Source

Tagged with button, share, social

Lightweight Social Buttons Plugin

This plugin allows you to add fully configurable lightweight and responsive social share buttons to your wiki.

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

See the plugin in action here. The sample page shows all the styles available with the plugin.

To add the lightweight social share buttons just at the tag ~~socialite~~ anywhere in you page. From the Dokuwiki configuration page, you can select three visualisation options (color(default), name, icon) and the list of social buttons do display.

Option Display : color. This option only uses css styles, so it is really lightweight:

Option Display : name. Displays the social share icon and name:

Option Display : icon. Displays a small button wit the social network icon:

Syntax

The following syntax is available:

  • ~~socialite~~ uses the default display mode to print the default list of social buttons;
  • ~~socialite social1 social2 socialn~~ uses the default display mode to print the defined social buttons;
  • ~~socialite:icon~~ prints buttons with icons of the default list of social buttons;
  • ~~socialite:name social1 social2 socialn~~ prints buttons with names of the the defined social buttons;

Examples

To add the lightweight social share buttons just at the tag ~~socialite~~ anywhere in you page. This minimal configuration will use the default settings.

~~socialite~~

You can also select which buttons to display and in which order. This example displays Facebook and Twitter buttons:

~~socialite facebook twitter~~

Finally, you can define the display mode. This example displays buttons icons for Google+, Tumblr and Reddit:

~~socialite:icon googleplus tumblr reddit~~

Configuration and Settings

Default settings

You can define the socialite plugin default options in your Dokuwiki Configuration Page:

  1. networks This configuration setting allows you to select the default social network buttons to display and its sort order. Available networks are:
    twitter, facebook, googleplus, linkedin, pinterest, tumblr, reddit, taringa, stumbleupon, xing, vk and email.
  2. display This configuration setting allows you to select the display mode. Available options are:
    • color (default) Displays the name of the social network with its background color. This option only uses css so it is really lightweight
    • name: Displays the icon and name of the social network
    • icon: Displays just the icon of the social network
  3. target: Link target: specifies where to open the social network page.
    Available options are:
    • _blank (default): Opens the linked document in a new window or tab
    • _self: Opens the linked document in the same frame as it was clicked
    • _parent: Opens the linked document in the parent frame
    • _top: Opens the linked document in the full body of the window
  4. twitter_user Twitter username of content author (don't include “@”), to share via @twitter_user.

Local settings

Optionally, it is possible to define locally the display mode and network list. This will always override the default settings. Use the syntax ~~socialite[:display_mode] [network …]~~ to define local settings.

Development

Socialite plugin is hosted on GitHub.com.

Change Log

Known Bugs and Issues

Check the Issue Tracker

ToDo/Wish List

FAQ

  1. This plugin counts the number of shares? No. To count and displays the number of shares lots of external scripts are injected on your site, the page will be much heavier and will take longer to download and display. This plugin only calls the external social site if and when you click on the button.

Discussion

Before reporting any issues (bugs or requests), please first take a look at the FAQ on plugin problems.

You can report any issues either on the Issue Tracker.

– Add your comments here —

Hi. I'm sorry but lsb sounds like <CENSORED> :-( Maybe to rename the plugin?— Aleksandr SelivanovAleksandr Selivanov
Aleksandr

2015-08-27 11:07

Can you clarify what you mean? When I google “lsb”, nothing suspicious comes up. Is it language-specific and similar to the name for the UniversalEditButton? — Anika HenkeAnika Henke
ach

2015-09-05 14:37
Hi, Aleksandr SelivanovAleksandr Selivanov
Aleksandr

, Anika HenkeAnika Henke
ach

, I decided to rename the plugin, just in case. Also I was not happy with the previous name. Thanks both! — Fernando RibeiroFernando Ribeiro

2015-09-13 17:58
Many thanks, Fernando! — Aleksandr SelivanovAleksandr Selivanov
Aleksandr

2015-09-13 18:01

Hola! If you end up with this error: can't use method return value in write context, an easy fix is to edit lib\plugins\socialite\syntax\button.php file:

On line 132, edit

if ($this->getConf('twitter_user')) { $href .= "&via=" . rawurlencode($this->getConf('twitter_user')); } 

And, on line 165, edit

if ($this->getConf('delicious_provider')) { $href .= "&provider=" . rawurlencode($this->getConf('delicious_provider')); }

Why? Because “empty() needs to access value by reference (in order to check whether that reference points to something that exists), and PHP before 5.5 didn't support references to temporary values returned from functions. (Please, see more on StackOverflow.)”

Moises JafetMoises Jafet
moijafcor

2016-03-20 07:04

Thanks Moises JafetMoises Jafet
moijafcor

, The error: can't use method return value in write context is now fixed!
Fernando RibeiroFernando Ribeiro

2016-10-16 17:19

Dear Aleksandr SelivanovAleksandr Selivanov
Aleksandr

, as some mobile browsers can have issues displaying *.ico files, please explore the possibility of using *.png files instead. Just my two cents ;-).

Moises JafetMoises Jafet
moijafcor

2016-03-20 10:24

Thanks, Moises. — Aleksandr SelivanovAleksandr Selivanov
Aleksandr

2016-03-20 20:23

Why does not the new window open? (target=“_blank” or popup window) 2017-06-03

Ok, you asked for it, you got it: Now you have an option to select link target :-)
Fernando RibeiroFernando Ribeiro

2017-11-28 14:42
plugin/socialite.txt · Last modified: 2017-12-07 23:09 by 89.152.76.65