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

Replace AddThis with SocialSharePrivacy (hopefully fixes #36) #57

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

thedod
Copy link

@thedod thedod commented Sep 9, 2013

Also disabled crazyegg unless it runs from sharefest.me
(similar to what is done with google analytics)

To avoid leaking of URLs to the ad/intelligence cartel :)

Also disabled crazyegg unless it runs from sharefest.me
(similar to what is done with google analytics)
@@ -0,0 +1 @@
../../../socialshareprivacy/jquery.socialshareprivacy.min.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how does this link suppose to work. or did you mean I just need to copy the original .min.js file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do git submodule update --init it should work (see change to README).
I prefer submodules to copying for 2 reasons:

  • It's easier to pull if there's an update (e.g. if there's a change in the way fb/twitter/g+ do things)
  • It also gives credit to the maintainer in a big-data kinda way ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did try the git submodule update --init, but still I"m left with a .js
that "../../../socialshareprivacy/jquery.socialshareprivacy.min.js" is its
content.

On another note,
Do socialshareprivacy have share buttons? We used the share buttons of
addthis where you can control the content you are advertising and even
private message someone in facebook, as opposed to "like/+1"?

Thanks,
Shachar

On Wed, Sep 11, 2013 at 1:53 AM, Nimrod S. Kerrett <[email protected]

wrote:

In sharefest/public/js/jquery.socialshareprivacy.min.js:

@@ -0,0 +1 @@
+../../../socialshareprivacy/jquery.socialshareprivacy.min.js

If you do git submodule update --init it should work (see change to
README).
I prefer submodules to copying for 2 reasons:

  • It's easier to pull if there's an update (e.g. if there's a change
    in the way fb/twitter/g+ do things)
  • It also gives credit to the maintainer in a big-data kinda way ;)


Reply to this email directly or view it on GitHubhttps://github.com//pull/57/files#r6281158
.

@shacharz
Copy link
Member

Is it possible to automatically .click() after the share button is activated (the user will need to click only once) but still if he doesn't click it won't load the buttons?

@thedod
Copy link
Author

thedod commented Sep 10, 2013

These buttons are iframes AFAIK, so browser security policy (which sometimes coincides with reasonable security considerations) wouldn't let us do this, or you could make your users auto-like your page :)

Anyway - Heise (with a huge readership in the land of CCC) tried their best and came up with this. I guess 1 click is either impossible or a vulnerability.

The Dod added 2 commits September 11, 2013 06:45
* Fix working dir for npm start
* Some path juggling to make submodule work when installing from zip
* Explain how to install submodule from zip in README
@thedod
Copy link
Author

thedod commented Sep 11, 2013

Note: even if you reject this pull request, the package.json patch is a bug fix (npm start didn't work before I did this).

@thedod
Copy link
Author

thedod commented Sep 11, 2013

There was a discussion on @shacharz hanging on a blame on an outdated diff, so for the sake of convenience, I'm moving the text here:

... stuff regarding submodule misbehaving ...

Note that I've moved the submodule's location @074c4ff from socialshareprivacy/ to socialshareprivacy-master/ (so that zip-installation instructions in the README wouldn't include those cumbersome rm and mv tweaks).
This may cause problems if your working directory is "from the @1446de4 era", but here's how to fix whatever the problem may be with the submodule [I hope]: cd to ShareFest/, apply @074c4ff, rm -rf socialshareprivacy (maybe it contains something that upsets git), then git submodule sync (to rebase the submodule) and finally git submodule update --init.

On another note, Do socialshareprivacy have share buttons?
We used the share buttons of addthis where you can control the content you are advertising
and even private message someone in facebook, as opposed to "like/+1"?

The default in Ssp is indeed a share button (in fact - this is Heise's default, but @patrickcheck decided to use the like button in his demo). The only problem is that since he probably only used the like option in everything he did, the button image for "share" (they call it "recommend") is in German 🙀.

The simplest workaround would be to create an English button ourselves and provide its URL in the settings to the socialshareprivacy() call at ui.js. I already have such a button at my own fork of ssp recommend. I know it says "recommend" (don't remember which fork it came from originally), but maybe it's appropriate for ShareFest.
I'll do this right away (expect a commit soon 😉).

Long term (i.e. if/when this works and you want it):

  • Maybe a more elegant option would be to use my fork (maybe I should have done it from the start, but I've decided to use a popular fork - hoping it would be better maintained that mine in the future).
  • Better yet - for that extra touch of elegance - once this works with my fork, @Peer5 could fork it and use its own fork as the submodule.

@thedod
Copy link
Author

thedod commented Sep 11, 2013

It's worse than I thought. Patched my code to "recommend", and indeed the button that comes from FB (after the first click) says "recommend", but what it actually does is a like. Worse. I've now noticed the url there was plaintext http: (ZOMG ❗).

I've found @panzi/SocialSharePrivacy (demo). It doesn't support FB share "out of the box", but it has a plugin architecture - so I might be able to add a sharer into it. It also does SSL (if current url is SSL), and seems to be a lot more up to date and feature rich than @patrickcheck's in general. Let's hope it solves the problem.

@thedod
Copy link
Author

thedod commented Sep 12, 2013

OK. It's a complete rewrite, and it's much better and simpler now (if you look at the diff, not the commits 😉).
Panzi's original fork didn't have a facebook share button, but it's easy to add modules to it, so I've added an fbshare one, and it's even 1-click.

Hope it's OK now.

Panzi's SocialSharePrivacy fork has a build.sh that generates
a compact distribution (this is where you define which share button
modules you want to include - if you want to change that).

sharefest/public/SocialSharePrivacy/ is a result of such a build,
and contains a README explaining how to regenerate it.
This is not a git submodule in order to simplify zip installation,
and minimize zip size.
@shacharz
Copy link
Member

Nicely done,
Couple of minor commens:

  1. The g+1 doesn't work (also can we make it a share like facebook?)
  2. We can loose the facebook like
    After those I'll merge it into an issue36 branch since we still need to make some UI work:
    placing the share buttons same as in sharefest.me
    get nice icons
    and add default content to the share buttons something like "Check out 'filename' on url" so the user won't have to do the entire thing by himself each time.
    Of course you are welcome to do all of the above and I"ll merge it straight to master :)
    Oh yea, thanks for all the work.

@thedod
Copy link
Author

thedod commented Sep 16, 2013

The g+1 doesn't work (also can we make it a share like facebook?)

I'll take a loook at it. Let's hope that once it works, it looks like "share" and not "like". Worst case, I'll write another module :)

We can loose the facebook like

No problem.
BTW, you can also add any of the modules you see at the project's gh-pages site. Except for Delicious, Stumbleupon, and Pinterest (which are SSL-hostile).

add default content to the share buttons something like "Check out 'filename' on url" so the user won't have to
do the entire thing by himself each time.

OK.

Of course you are welcome to do all of the above and I"ll merge it straight to master :)

Thing is - I'm color blind and CSS deaf 😏.
See how I just slapped the share div with absolute position that looked good on my machine.

If you want to change stuff, note that the files under SocialSharePrivacy are auto generated, so don't edit them directly.
I've added a README there, explaining what to clone, and the build.sh arguments you need in order to generate the content of SocialSharePrivacy (BTW, build.sh is where you select which button modules you want).

Oh yea, thanks for all the work.

🙏 Thank you for the other 99% of the code.
BTW. When I have time, I'm planning a waterproofed branch (would most probably have a demo instance) that tries to minimize the risk of leaking the link to 3rd parties: No share buttons, and if url contains a room id - no external links (chat, etc.) to avoid accidental referrer leaking.
Here's a draft screenshot 🙈

waterproofed-fest

@shacharz shacharz closed this Sep 18, 2013
@shacharz shacharz reopened this Sep 18, 2013
@shacharz
Copy link
Member

oops accidentally clicked the "close" button.

I'm planning a waterproofed branch

Looks sweet!

if url contains a room id - no external links (chat, etc.) to avoid accidental referrer leaking.

We should totally take care of that, adding an issue

@thedod
Copy link
Author

thedod commented Sep 23, 2013

Latest commit tries to satisfy requests by @shacharz

The g+1 doesn't work (also can we make it a share like facebook?)

Can't get it to work 😦. Looks like Google has changed something. Opened an issue regarding this. If you want, I can add some other button instead (maybe reddit?).

We can loose the facebook like

Done

add default content to the share buttons something like "Check out 'filename' on url" so the user won't have to do the entire thing by himself each time.

Done, except for fb share, because it always takes the title from the actual page (without running js on it, of course 😉), even if you specify the title explicitly.

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

Successfully merging this pull request may close these issues.

2 participants