Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an Extension #71

Open
since1976 opened this issue Oct 25, 2013 · 2 comments
Open

Adding an Extension #71

since1976 opened this issue Oct 25, 2013 · 2 comments

Comments

@since1976
Copy link

Hi there straight up aplogies for the noob question, but how do you go about adding an extension?

I'd like to add a pinterest button—to the default set of networks—with a count sitting above it but for the life of me can't figure out how I get it to work.

Is there some documentation on how to go about this? Currently I'm using Socialite.load('.social-buttons'); to initiate the default buttons but how would I add Pinterest to that?

Thanks in advance for any help offered
Dan

@NicolasGraph
Copy link

I was looking how to extend socialite with the pinterest extension and this is what I'm now using.

  • Include Socialite.js or Socialite.min.js
<script src="<txp:site_url />js/socialite.min.js"></script>
  • Include the extension
<script src="<txp:site_url />js/extensions/socialite.pinterest.js"></script>
  • Initialize Socialite
<script>
$(document).ready(function() {
      Socialite.load();
   });
</script>
  • Set the pinit button
<a data-pin-log="button_pinit_bookmarklet" class="socialite pinterest-pinit" href="http://www.pinterest.com/pin/create/button/" rel="nofollow" target="_blank"><span class="vhidden">Share on Pinterest</span></a>

Unfortunatly, something goes wrong because the button appears but the Pinterest javascript is not loading properly (no popup, no count)…

See: http://developers.pinterest.com/pin_it/ > "The Pin It button should pop up the Create a Pin form in a small window. If it doesn't pop up, you'll see fewer Pins. That's because people expect Pinterest to look and act a certain way. If your JavaScript is broken or missing, your Pin It button will still work, but it won't be as useful or pretty! You won't get Pin counts and the Create a Pin form will appear full screen, which means people will have to press the Back button to keep browsing on your page."

@derpyherp
Copy link

I also have a problem with Pinterest - but their button doesn't display at all for me. The Pinterest script does load, I checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants