Plugin SocialNetworking

Plugin SocialNetworking
This extension brings XSLT helpers to share yours pages on social networks
(facebook, twitter, google+1...) and a service to insert a twitter feed in your contents.

Authors

Anyware Services

Most recent version

1.3.0

Tracking issues

https://issues.ametys.org/browse/SOCIAL

Download

Lastest version 

  1. Presentation
  2. Screenshots

Presentation

Features:

  • XSLT helpers to add Facebook Like, Google+1 or Share button in yours pages
  • XSLT helper to add ShareThis wiidgets in yours pages
  • Insert a Twitter feed

Screenshots

User manual

Facebook helpers

Like button

This helper allows you to add a Facebook Like button on your pages. The Like button lets a user share the content with his friends on Facebook.

The helper proposed three layouts :

Layout

Rendering

standard

button_count

box_count

To insert the Like button :

  • import the XSLT helper in your XSL

    <xsl:import href="plugin:socialnetworking://stylesheets/helpers/facebook.xsl" />
    
  • call the template named FB_like

    <xsl:call-template name="FB_like">
        <xsl:with-param name="absoluteUrl"><xsl:value-of select="concat($absolute-raw-context, '/', $lang, '/', $document, '.html')"/></xsl:with-param>
        <xsl:with-param name="back-office"><xsl:value-of select="$back-office"/></xsl:with-param>
        <xsl:with-param name="layout">standard</xsl:with-param>
    </xsl:call-template>
    

The template accept the following parameters :

absoluteUrl

The absolute url

layout

'standard', 'button_count' or 'box_count'. Defaults to 'standard.

action

'like' or 'recommend. The verb to display. Defaults to 'like'.

showFaces

true to display the profile pictures below the button. Defaults to true

width

the width in pixels. Defaults to 450

height

the heightin pixels. Defaults to 80

colorsheme

'light' or 'dark'. Defaults to "light"

The helper needs an absolute url. In your skin, to give the absolute url of the current page, use :

<xsl:value-of select="concat($absolute-raw-context, '/', $lang, '/', $document, '.html')"/>
Share button

This helper allows you to add a Facebook Share button on your pages. The Like button lets a user share the content with his friends on Facebook.

The helper proposed three layouts :

Layout

Rendering

button

button with counter

icon

box

To insert the Share button :

  • import the XSLT helper in your XSL

    <xsl:import href="plugin:socialnetworking://stylesheets/helpers/facebook.xsl" />
    
  • call the template named FB_share

The template accept the following parameters :

text

The text button. Defaults to "Share"

layout

'button', 'icon' or 'box'. Defaults to 'button'

counter

true to display a counter. Defaults to false

<xsl:call-template name="FB_share">
	<xsl:with-param name="text"><i18n:text i18n:key="SKIN_FACEBOOK_SHARE_TEXT"/></xsl:with-param>
	<xsl:with-param name="layout">box</xsl:with-param>
	<xsl:with-param name="back-office"><xsl:value-of select="$back-office"/></xsl:with-param>
</xsl:call-template>

Google+1 button (since 1.1.1)

This helper allows you to add a Google+1 button button on your pages.

The helper provides several size : small, medium, standard or tall.

Layout

Rendering

small

medium

standard

tall

And can be used with ou without counter (except for tall size which always have a counter)

First import the helper this way in the top part of your xsl

<xsl:import href="plugin:socialnetworking://stylesheets/helpers/google.xsl" />

Then add this at the place you want the counter :

<xsl:call-template name="GOOGLE_plus_one">
	<xsl:with-param name="counter">true</xsl:with-param>
</xsl:call-template>

where parameters are

  • size : small | medium | standard | tall . Defaults to "standard".
  • counter : true or false To display or not the counter (always true with tall size).
    others paramerters are
  • lang : language code for the counter (en, fr..) The default value is the current page language.
  • url : the url to share. The default is the current url.

ShareThis helper

This helper allows you to add a ShareThis widget to share your page.

The helper proposed five layouts :

Layout

Rendering

classic

multi-channel

multi-channel-large

vertical-counter

horizontal-counter

To insert the ShareThis widget :

  • import the XSLT helper in your XSL :

    <xsl:import href="plugin:socialnetworking://stylesheets/helpers/sharethis.xsl" />
    
  • call the template named ShareThis with the choosen layout :
<xsl:call-template name="ShareThis">
     <xsl:with-param name="layout">multi-channel</xsl:with-param>
</xsl:call-template>

Twitter feeds

Go to Add service menu and choose the Twitter stream item :

In service parameters dialog box, set :

  • Login(s) : the users' login of the feed twitter you want to display,
  • The max number of tweets. Defaults to 5,
  • Check the box Show profile pictures to display the user avatar
  • Select the view to use

Installation and download

Download

Installation

  • Add the plugin JAR in the WEB-INF/lib directory of your Ametys application.

Compatibility

Plugin version

1.0.x

1.1.x

1.2.x1.3.x

Ametys 3.0.x

 

 

  

Ametys 3.1.x

 

  

Ametys 3.2.x

 

  
Ametys 3.3.x  

 
Ametys 3.4.x