10076 shaares
2750 liens privés
2750 liens privés
Ajouter le code suivant dans le fichier /tpl/linklist.html
<div class="am-partagesocial">
<a target="_blank" title="Diaspora*" href="http://sharetodiaspora.github.io/?url={$value.url|rawurlencode}&title={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;">diaspora*</a> ·
<a target="_blank" title="Twitter" href="https://twitter.com/share?url={$value.url|rawurlencode}&text={$value.title|rawurlencode(str_replace('|','-',$value.title));}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;">twitter</a> ·
<a target="_blank" title="Facebook" href="https://www.facebook.com/sharer.php?u={$value.url|rawurlencode}&t={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700');return false;">facebook</a> ·
<a target="_blank" title="Google +" href="https://plus.google.com/share?url={$value.url|rawurlencode}&hl=fr" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">google+</a> ·
<a target="_blank" title="LinkedIn" href="https://www.linkedin.com/shareArticle?mini=true&url={$value.url|rawurlencode}&title={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">linkedin</a> ·
<a target="_blank" title="Pinterest" href="http://pinterest.com/pin/create/button/?url={$value.url|rawurlencode}&media={$value.url|rawurlencode}&description={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">pinterest</a> ·
<a target="_blank" title="Scoop.it" href="http://www.scoop.it/oexchange/share?url={$value.url|rawurlencode}&title={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=800px,width=1150px');return false;">scoop.it</a> ·
<a target="_blank" title="Envoyer par mail" href="mailto:?subject={$value.title|rawurlencode}&body={$value.url|rawurlencode}" rel="nofollow">courriel</a>
</div>
C'est tout!
Démo sur mon Shaarli : http://liens.effingo.be/
Disponible dans le template AlbinoMouse : https://github.com/alexisju/albinomouse-template
C'est une adaptation du code de Korben ici : http://korben.info/bouton-partage-twitter-facebook-sans-tracking.html
Remarques:
- ça ne fonctionne justement pas super bien avec un lien autoréférant car l'url donnée n'est pas absolue.. On pourrait utiliser la valeur {$scripturl}?{$value.linkdate|smallHash} à la place de {$value.url|htmlspecialchars} mais ça obligerait les cliqueurs suivant à repasser par votre shaarli avant d'arriver sur le lien final (j'aime pas trop ça). Autre proposition?
- Bug Pinterest : thumbnail n’apparaît pas, mais tout fonctionne bien pour les images. Pour les vidéos (youtube), ça ne marche pas bien. Pinterest demande une valeur &media= que n'a pas Shaarli en l'état. Pas évident d'utiliser les thumbnails pour ça. Pour l'instant c'est donc l'url qui est employée.
<div class="am-partagesocial">
<a target="_blank" title="Diaspora*" href="http://sharetodiaspora.github.io/?url={$value.url|rawurlencode}&title={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;">diaspora*</a> ·
<a target="_blank" title="Twitter" href="https://twitter.com/share?url={$value.url|rawurlencode}&text={$value.title|rawurlencode(str_replace('|','-',$value.title));}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;">twitter</a> ·
<a target="_blank" title="Facebook" href="https://www.facebook.com/sharer.php?u={$value.url|rawurlencode}&t={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700');return false;">facebook</a> ·
<a target="_blank" title="Google +" href="https://plus.google.com/share?url={$value.url|rawurlencode}&hl=fr" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">google+</a> ·
<a target="_blank" title="LinkedIn" href="https://www.linkedin.com/shareArticle?mini=true&url={$value.url|rawurlencode}&title={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">linkedin</a> ·
<a target="_blank" title="Pinterest" href="http://pinterest.com/pin/create/button/?url={$value.url|rawurlencode}&media={$value.url|rawurlencode}&description={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">pinterest</a> ·
<a target="_blank" title="Scoop.it" href="http://www.scoop.it/oexchange/share?url={$value.url|rawurlencode}&title={$value.title|rawurlencode}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=800px,width=1150px');return false;">scoop.it</a> ·
<a target="_blank" title="Envoyer par mail" href="mailto:?subject={$value.title|rawurlencode}&body={$value.url|rawurlencode}" rel="nofollow">courriel</a>
</div>
C'est tout!
Démo sur mon Shaarli : http://liens.effingo.be/
Disponible dans le template AlbinoMouse : https://github.com/alexisju/albinomouse-template
C'est une adaptation du code de Korben ici : http://korben.info/bouton-partage-twitter-facebook-sans-tracking.html
Remarques:
- ça ne fonctionne justement pas super bien avec un lien autoréférant car l'url donnée n'est pas absolue.. On pourrait utiliser la valeur {$scripturl}?{$value.linkdate|smallHash} à la place de {$value.url|htmlspecialchars} mais ça obligerait les cliqueurs suivant à repasser par votre shaarli avant d'arriver sur le lien final (j'aime pas trop ça). Autre proposition?
- Bug Pinterest : thumbnail n’apparaît pas, mais tout fonctionne bien pour les images. Pour les vidéos (youtube), ça ne marche pas bien. Pinterest demande une valeur &media= que n'a pas Shaarli en l'état. Pas évident d'utiliser les thumbnails pour ça. Pour l'instant c'est donc l'url qui est employée.