Социальные кнопки Drupal

  1. <div class="social-buttons">
  2. <div class="item googleplus">
  3. <!-- Place this tag where you want the +1 button to render. -->
  4. <div class="g-plusone" data-annotation="none"></div>
  5.  
  6. <!-- Place this tag after the last +1 button tag. -->
  7. <script type="text/javascript">
  8. window.___gcfg = {lang: 'ru'};
  9.  
  10. (function() {
  11. var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  12. po.src = 'https://apis.google.com/js/plusone.js';
  13. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  14. })();
  15. </script>
  16. </div>
  17.  
  18. <div class="item vkontakte">
  19. <script type="text/javascript" src="//vk.com/js/api/openapi.js?52"></script>
  20.  
  21. <script type="text/javascript">
  22. VK.init({apiId: 3428162, onlyWidgets: true});
  23. </script>
  24.  
  25.  
  26. <div id="vk_like_<?php print $node->nid;?>"></div>
  27. <script type="text/javascript">
  28. VK.Widgets.Like("vk_like_<?php print $node->nid;?>",
  29. {type: "mini",
  30. height: 20,
  31. pageTitle: '<?php print $node->title;?>',
  32. pageUrl: '<?php print url('node/'. $node->nid, array('absolute' => TRUE));?>'
  33. });
  34. </script>
  35. </div>
  36.  
  37. <div class="item facebook">
  38.  
  39. <div id="fb-root"></div>
  40. <script>(function(d, s, id) {
  41. var js, fjs = d.getElementsByTagName(s)[0];
  42. if (d.getElementById(id)) return;
  43. js = d.createElement(s); js.id = id;
  44. js.src = "//connect.facebook.net/ru_RU/all.js#xfbml=1";
  45. fjs.parentNode.insertBefore(js, fjs);
  46. }(document, 'script', 'facebook-jssdk'));</script>
  47. <div class="fb-like" data-href="<?php print url('node/'. $node->nid, array('absolute' => TRUE));?>" data-send="false" data-layout="button_count" data-width="225" data-width="25" data-show-faces="true"></div>
  48. </div>
  49.  
  50.  
  51.  
  52.  
  53. <div class="item twitter">
  54. <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php print url('node/'. $node->nid, array('absolute' => TRUE));?>" data-text="<?php print $node->title;?>" data-lang="ru">Твитнуть</a>
  55. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  56. </div>
  57. </div>
  58.  
  59.  
Russian
Категория: 
The code has been tested and works
Мультитег: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Target Image