Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+21 votes
3.4k views
in Plugins by
recategorized by

Another thing I thought useful is buttons for sharing content on social networks:

I think the benefit of having these buttons on each question page need not be elaborated on.

So, I made a plugin, and here it is:

https://github.com/NoahY/q2a-share

There is an admin block to toggle which of the (currently four, above) buttons to show, and in which order, as well as an optional "suggestion" text to show when there are no answers:

I'd consider this "beta" code.  It probably won't break your site, but it may still be buggy.

The buttons currently come after the question's response buttons, inside the same div.  That's the best I could do, if you think you can do better, you can always edit the qa-share-layer.php and change the function based on Q2A's layer module API:

http://www.question2answer.org/layers.php

EDIT: added email, new admin screen

by
This is a must have plugin.

I think "#xfbml=1" on qa-share-layer.php creating conflict with Facebook Login plugin. After removing #xfbml=1 Facebook Login now working.
by
Okay, I've removed that... I can't verify what you say, because I don't use facebook login.  Hopefully it is correct.
by
I installed for ver 1.5.3, however nothing happen affter selecting and saving. Please help me. Thanks in advance
by
Hi NoahY, I installed your plugin on my website here http://unconfessable.com/home/?qa=questions but it doesn't work ...Facbook and G+ buttons don't share. Twitter button only works correctly ...do you have any suggestion? Thank you

10 Answers

+2 votes
by
Thanks for another great plugin NoahY ! :)
0 votes
by
Nice plugin! Does it also show the number of people who liked/twittered?
by
It could be easily tweaked to, but it would take up a lot of space that way...
by
Define "a lot of space" please ... ;-)
by
About three times as tall as the current layout, I think.
by
You can have the numbers appear to the right of the buttons. AddThis.com has that as one of the options (if you haven't seen AddThis, take a look, it's pretty good).
by
We can have no's appear above the buttons
0 votes
by

First of all it's really beautiful and thank you

My question is this. If this plugin shows on all the questions Is it possible to add the code of Google advertising to Any question with this plugin?

If so, where should I add the code?

by
You could do better than to use this plugin.  Better to make a new theme, edit qa-theme.php and add code like:

        function q_view($q_view)

        {

            qa_html_theme_base::q_view($q_view);

           

            $this->output_raw('insert your html here');



        }
0 votes
by
Great plugin. Thanks!
+1 vote
by
It's one heck of a great plugin, many thanks to NoahY.

A tiny tip: it would be nice if there was the possibility to show the notification text always... wether there are answers or not.. so it would act like a title or so.
0 votes
by
Hi NoahY. First of all, Thank you for your plugins, you are doing a good job. Secondly,   i have a problem with Facebook logout button(i can't logout if i am loged in using FB account)  if like button from share plugin is active. I've got the same issue when i tried to embed facebook like button.
by
just download the new version of share plugin from https://github.com/NoahY or remove #xfbml=1 from qa-share-layer.php

I have the same problem. Now it solved.
by
Thanks for this nice plugin. Is there any way to share with facebook by giving some custom description which is not included int he question.
0 votes
by
Thanks NoahY for the plugin.. would it be possible to make the button a facebook sahre button rather than a like button?

Or ensure the little pop up window appears so text can be added to the share?
by
just go to the plugin folder qa-plugin/q2a-share-buttons/ and open the file: qa-share-layer.php

on line 76: 'facebook'=> '<iframe src="http://www.facebook.com/plugins/like.php?href='....
change this code as needed.

btw: "What happened to the old Share button? We deprecated the Share Button when we launched the Like button" http://developers.facebook.com/docs/reference/plugins/like/
0 votes
by
Grate Plugin @NoahY . Thanks for your contribution.

I have a little problem - I was trying to share my question on my Facebook Page wall but I am unable to do that.

Ex. I have a Facebook User ID and I have created 3 Pages. Now I want to share my question on my Page Wall. How can I do that. I did not get any option for that and it directly share the question on my user ID wall.

Thanks in Advance.
by
Anyone please guide me to share the question on my facebook Page wall instead of my Wall.
+3 votes
by

Hey Noahy  There is Tutorial For Making New Stackoverflow Style Shareing plugin please take a look and made this 

http://www.queness.com/post/309/create-a-digg-style-post-sharing-tool-with-jquery

 

0 votes
by

Downloaded this plugin. Using 1.5.3 Q2A. Facebook alone reports "Error".

This is the iframe code generated -
 
<iframe src="//www.facebook.com/plugins/like.php?href=www.clay6.com/qa/15734/overrightarrow-overrightarrow-overrightarrow-overrightarrow&send=false&layout=standard&width=53&layout=button_count&show_faces=false&action=like&colorscheme=light&font&height=20&appId=170382616390886" scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 53px; height: 20px;" allowtransparency="true"/>
 
Any help appreciated.
 
Thanks
 
pady
...