Permalink
Browse files

fixed empty title

  • Loading branch information...
1 parent 33b9ae6 commit 4d04232d74ff2a249037c26a832a783928d293b5 @NoahY committed Mar 1, 2012
Showing with 17 additions and 17 deletions.
  1. +1 −1 qa-plugin.php
  2. +16 −16 qa-share-widget.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.0b1
+ Plugin Version: 1.0
Plugin Date: 2011-08-08
Plugin Author: NoahY
Plugin Author URI:
View
@@ -1,6 +1,6 @@
<?php
- class qa_share_widget {
+ class qa_share_widget {
var $urltoroot;
@@ -9,19 +9,19 @@ function load_module($directory, $urltoroot)
$this->urltoroot = $urltoroot;
}
- function allow_template($template)
- {
+ function allow_template($template)
+ {
- return ($template == 'question');
- }
+ return ($template == 'question');
+ }
- function allow_region($region)
- {
- return ($region=='side');
- }
+ function allow_region($region)
+ {
+ return ($region=='side');
+ }
- function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
- {
+ function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
+ {
$themeobject->output(
'<H2 STYLE="margin-top:0; padding-top:0;">',
qa_opt('share_plugin_widget_title'),
@@ -32,14 +32,14 @@ function output_widget($region, $place, $themeobject, $template, $request, $qa_c
$code = array(
'facebook'=> '<div class="fb-like" data-href="'.$url.'" data-send="false" data-layout="button_count" data-width="36" data-show-faces="false"></div>',
-
+
'twitter'=>'<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>',
'google'=>'<g:plusone size="medium" annotation="none"></g:plusone>',
'linkedin'=>'<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share"></script>',
- 'email'=>'<a title="Share this question via email" id="share-button-email" href="mailto:?subject='.rawurlencode('['.qa_opt('site_title').'] '.$q_view['raw']['title']).'&body='.rawurlencode($url).'"><img height="24" src="'.$this->urltoroot.'qa-share-mail.png'.'"/></a>'
+ 'email'=>'<a title="Share this question via email" id="share-button-email" href="mailto:?subject='.rawurlencode('['.qa_opt('site_title').'] '.@$qa_content['q_view']['raw']['title']).'&body='.rawurlencode($url).'"><img height="24" src="'.$this->urltoroot.'qa-share-mail.png'.'"/></a>'
);
@@ -67,10 +67,10 @@ function output_widget($region, $place, $themeobject, $template, $request, $qa_c
$themeobject->output(
$output
);
- }
- };
+ }
+ };
/*
- Omit PHP closing tag to help avoid accidental output
+ Omit PHP closing tag to help avoid accidental output
*/

0 comments on commit 4d04232

Please sign in to comment.