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
Oops ! Copy to clipboard failed. Open the code and copy it manually.<xsl:import href="plugin:socialnetworking://stylesheets/helpers/facebook.xsl" />
<xsl:import href="plugin:socialnetworking://stylesheets/helpers/facebook.xsl" />
<xsl:import href="plugin:socialnetworking://stylesheets/helpers/facebook.xsl" />
call the template named FB_like
Oops ! Copy to clipboard failed. Open the code and copy it manually.<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>
<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>
<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 :
Oops ! Copy to clipboard failed. Open the code and copy it manually.<xsl:value-of select="concat($absolute-raw-context, '/', $lang, '/', $document, '.html')"/>
<xsl:value-of select="concat($absolute-raw-context, '/', $lang, '/', $document, '.html')"/>
<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 :
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
Oops ! Copy to clipboard failed. Open the code and copy it manually.<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>
<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>
<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
Oops ! Copy to clipboard failed. Open the code and copy it manually.<xsl:import href="plugin:socialnetworking://stylesheets/helpers/google.xsl" />
<xsl:import href="plugin:socialnetworking://stylesheets/helpers/google.xsl" />
<xsl:import href="plugin:socialnetworking://stylesheets/helpers/google.xsl" />
Then add this at the place you want the counter :
Oops ! Copy to clipboard failed. Open the code and copy it manually.<xsl:call-template name="GOOGLE_plus_one">
<xsl:with-param name="counter">true</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="GOOGLE_plus_one">
<xsl:with-param name="counter">true</xsl:with-param>
</xsl:call-template>
<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 :
call the template named ShareThis with the choosen layout :
Oops ! Copy to clipboard failed. Open the code and copy it manually.<xsl:call-template name="ShareThis">
<xsl:with-param name="layout">multi-channel</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="ShareThis">
<xsl:with-param name="layout">multi-channel</xsl:with-param>
</xsl:call-template>
<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.x 1.3.x Ametys 3.0.x
Ametys 3.1.x
Ametys 3.2.x
Ametys 3.3.x
Ametys 3.4.x