Permalink
Browse files

fixed facebook

  • Loading branch information...
NoahY committed Apr 16, 2012
1 parent 4d04232 commit 0c849cead4e44679b6f718716ecb2173c97dbbf3
Showing with 2 additions and 6 deletions.
  1. +1 −1 qa-plugin.php
  2. +1 −5 qa-share-layer.php
View
@@ -5,7 +5,7 @@
Plugin URI: https://github.com/NoahY/q2a-share
Plugin Update Check URI: https://github.com/NoahY/q2a-share/raw/master/qa-plugin.php
Plugin Description: Adds social sharing buttons to questions
- Plugin Version: 1.0
+ Plugin Version: 1.1
Plugin Date: 2011-08-08
Plugin Author: NoahY
Plugin Author URI:
View
@@ -47,10 +47,6 @@ function q_view_buttons($q_view) {
function footer() {
qa_html_theme_base::footer();
if(@$this->content['q_view']) {
- if(qa_opt('share_plugin_facebook')) {
- $this->output('
- <script>document.getElementById("share-fb-like").innerHTML=\'<iframe src="http://www.facebook.com/plugins/like.php?href='.qa_path_html(qa_q_request($this->content['q_view']['raw']['postid'], $this->content['q_view']['raw']['title']), null, qa_opt('site_url')).'&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20&amp;appId=170382616390886" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:20px;" allowTransparency="true"></iframe>\'</script>');
- }
if(qa_opt('share_plugin_twitter')) {
$this->output('<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>');
}
@@ -77,7 +73,7 @@ function qa_share_buttons($q_view) {
$url = qa_path_html(qa_q_request($q_view['raw']['postid'], $q_view['raw']['title']), null, qa_opt('site_url'));
$code = array(
- 'facebook'=> '<span id="share-fb-like"></span>',
+ 'facebook'=> '<iframe src="//www.facebook.com/plugins/like.php?href='.qa_path_html(qa_q_request($this->content['q_view']['raw']['postid'], $this->content['q_view']['raw']['title']), null, qa_opt('site_url')).'&amp;send=false&amp;layout=standard&amp;width=49&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20&amp;appId=170382616390886" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:49px; height:20px;" allowTransparency="true"></iframe>',
'twitter'=>'<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>',

0 comments on commit 0c849ce

Please sign in to comment.