facebook twitter hatena line google mixi email

Html/共有チェックボタンスマホ用

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

smarty用

<a href="https://m.facebook.com/sharer.php?u={{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}?lf=facebook" target="_blank"><img alt="facebook" src="/assets/img/share/icon_facebook.png" /></a>
<a href="https://twitter.com/intent/tweet?url={{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}&text={{$title|escape:url}}" target="_blank"><img alt="twitter" src="/assets/img/share/icon_twitter.png" /></a>
<a href="http://b.hatena.ne.jp/entry/http%3A%2F%2F{{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}" target="_blank"><img alt="hatena" src="/assets/img/share/icon_hatena.png" /></a>
<a href="http://line.naver.jp/R/msg/text/?{{$title|escape:url}}{{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}" target="_blank"><img alt="line" src="/assets/img/share/icon_line.png" /></a>



smarty用(analyticsEvent付き

<a href="https://m.facebook.com/sharer.php?u={{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}?lf=facebook" target="_blank" onclick="_gaq.push(['_trackEvent', 'sharebotton', 'facebook', 'facebook', 1, true]);"><img alt="facebook" src="/assets/img/share/icon_facebook.png" /></a>
<a href="https://twitter.com/intent/tweet?url={{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}&text={{$title|escape:url}}" target="_blank" onclick="_gaq.push(['_trackEvent', 'sharebotton', 'twitter', 'twitter', 1, true]);"><img alt="twitter" src="/assets/img/share/icon_twitter.png" /></a>
<a href="http://b.hatena.ne.jp/entry/http%3A%2F%2F{{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}" target="_blank" onclick="_gaq.push(['_trackEvent', 'sharebotton', 'hatena', 'hatena', 1, true]);"><img alt="hatena" src="/assets/img/share/icon_hatena.png" /></a>
<a href="http://line.naver.jp/R/msg/text/?{{$title|escape:url}}{{$smarty.server.HTTP_HOST|escape:url}}{{$smarty.server.REQUEST_URI|escape:url}}" target="_blank" onclick="_gaq.push(['_trackEvent', 'sharebotton', 'line', 'line', 1, true]);"><img alt="line" src="/assets/img/share/icon_line.png" /></a>