Skip to content

Commit

Permalink
check for q_view
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahY committed Nov 22, 2011
1 parent f3d56ff commit b095564
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions qa-share-layer.php
Expand Up @@ -46,17 +46,18 @@ function q_view_buttons($q_view) {

function footer() {
qa_html_theme_base::footer();
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=21&amp;appId=170382616390886" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:21px;" allowTransparency="true"></iframe>\'</script>');
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=21&amp;appId=170382616390886" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:21px;" allowTransparency="true"></iframe>\'</script>');
}
if(qa_opt('share_plugin_twitter')) {
$this->output('<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>');
}
if(qa_opt('share_plugin_google')) {
$this->output('<script type="text/javascript">(function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);})();</script>');
}
}
if(qa_opt('share_plugin_twitter')) {
$this->output('<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>');
}
if(qa_opt('share_plugin_google')) {
$this->output('<script type="text/javascript">(function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);})();</script>');
}

}


Expand Down

0 comments on commit b095564

Please sign in to comment.