Add Twitter, Facebook Like, Google plus one Social share - Version 1.0.1

Version Description

= * Add the option in settings to enter your twitter id. This will be used in "via @yourtweetid" in the tweet text. * Fixed a small CSS bug for facebook like (left floating).

=

Download this release

Release Info

Developer BeingMaverick
Plugin Icon wp plugin Add Twitter, Facebook Like, Google plus one Social share
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0.0 to 1.0.1

Files changed (3) hide show
  1. readme.txt +10 -1
  2. tf_admin_page.php +7 -1
  3. tf_display.php +18 -5
readme.txt CHANGED
@@ -4,7 +4,7 @@ Plugin Site: http://www.searchtechword.com
4
  Tags: Facebook like, twitter button, twitter share, Google +1 (plus one) button, Google plus one, Stumbleupon, social share, twitter facebook share, google +1 share
5
  Requires at least: 2.8+
6
  Tested up to: 3.1.3
7
- Stable tag: 1.0.0
8
 
9
  == Description ==
10
  <br />
@@ -43,3 +43,12 @@ I will try and help as much as possible and answer all your queries. I am ready
43
  == Screenshots ==
44
  You can Check Screen Shots on my website. I use the same plugin to display Social Share :<br />
45
  [Twitter Facebook Google Plusone Social Share](http://www.searchtechword.com/2011/06/wordpress-plugin-add-twitter-facebook-google-plus-one-share)<br />
 
 
 
 
 
 
 
 
 
4
  Tags: Facebook like, twitter button, twitter share, Google +1 (plus one) button, Google plus one, Stumbleupon, social share, twitter facebook share, google +1 share
5
  Requires at least: 2.8+
6
  Tested up to: 3.1.3
7
+ Stable tag: 1.0.1
8
 
9
  == Description ==
10
  <br />
43
  == Screenshots ==
44
  You can Check Screen Shots on my website. I use the same plugin to display Social Share :<br />
45
  [Twitter Facebook Google Plusone Social Share](http://www.searchtechword.com/2011/06/wordpress-plugin-add-twitter-facebook-google-plus-one-share)<br />
46
+
47
+ == Change log ==
48
+
49
+ == 1.0.1 ==
50
+ * Add the option in settings to enter your twitter id. This will be used in "via @yourtweetid" in the tweet text.
51
+ * Fixed a small CSS bug for facebook like (left floating).
52
+
53
+ == 1.0.0 ==
54
+ *Initial version
tf_admin_page.php CHANGED
@@ -39,7 +39,8 @@ $active_buttons = array(
39
 
40
  $option['bkcolor_value'] = esc_html($_POST['twitter_facebook_share_bkcolor_value']);
41
  $option['jsload'] = (isset($_POST['twitter_facebook_share_javascript_load']) and $_POST['twitter_facebook_share_javascript_load']=='on') ? true : false;
42
-
 
43
  $option['left_space'] = esc_html($_POST['twitter_facebook_share_left_space']);
44
  $option['bottom_space'] = esc_html($_POST['twitter_facebook_share_bottom_space']);
45
  $option['float_position'] = esc_html($_POST['twitter_facebook_share_float_position']);
@@ -134,6 +135,11 @@ $active_buttons = array(
134
  <input type="checkbox" name="twitter_facebook_share_javascript_load" '.$jsload.' />
135
  <span class="description">'.__("(Recommended, else loaded in header)", 'menu-test' ).'</span>
136
  </td></tr>
 
 
 
 
 
137
 
138
  <tr><td valign="top" colspan="2"><h3>'.__("Left Side Floating Specific Options", 'menu-test' ).'</h3></td></tr>
139
 
39
 
40
  $option['bkcolor_value'] = esc_html($_POST['twitter_facebook_share_bkcolor_value']);
41
  $option['jsload'] = (isset($_POST['twitter_facebook_share_javascript_load']) and $_POST['twitter_facebook_share_javascript_load']=='on') ? true : false;
42
+
43
+ $option['twitter_id'] = esc_html($_POST['twitter_facebook_share_twitter_id']);
44
  $option['left_space'] = esc_html($_POST['twitter_facebook_share_left_space']);
45
  $option['bottom_space'] = esc_html($_POST['twitter_facebook_share_bottom_space']);
46
  $option['float_position'] = esc_html($_POST['twitter_facebook_share_float_position']);
135
  <input type="checkbox" name="twitter_facebook_share_javascript_load" '.$jsload.' />
136
  <span class="description">'.__("(Recommended, else loaded in header)", 'menu-test' ).'</span>
137
  </td></tr>
138
+ <tr><td style="padding-bottom:20px;" valign="top">'.__("Your Twitter ID", 'menu-test' ).':</td>
139
+ <td style="padding-bottom:20px;">
140
+ <input type="text" name="twitter_facebook_share_twitter_id" value="'.$option['twitter_id'].'" size="30">
141
+ <span class="description">'.__("Specify your twitter id without @", 'menu-test' ).'</span>
142
+ </td></tr>
143
 
144
  <tr><td valign="top" colspan="2"><h3>'.__("Left Side Floating Specific Options", 'menu-test' ).'</h3></td></tr>
145
 
tf_display.php CHANGED
@@ -120,16 +120,23 @@ margin:4px 4px 4px 4px;
120
  if ($option['active_buttons']['facebook_like']==true) {
121
  $output .= '
122
  <div class="buttons">
123
- <fb:like href="' . urlencode(get_permalink($post->ID)) . '" layout="box_count" width="450" show_faces="false" font=""></fb:like>
124
  </div>';
125
  }
126
 
127
  if ($option['active_buttons']['twitter']==true) {
 
128
  $output .= '
129
  <div class="buttons">
130
- <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="searchtechword">Tweet</a>
 
 
 
 
 
131
  </div>';
132
  }
 
133
 
134
  if ($option['active_buttons']['Google_plusone']==true) {
135
  $output .= '
@@ -170,11 +177,17 @@ margin:4px 4px 4px 4px;
170
  }
171
 
172
  if ($option['active_buttons']['twitter']==true) {
173
- $output .= '
 
174
  <div class="buttons">
175
- <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="searchtechword">Tweet</a>
176
- <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
177
  </div>';
 
 
 
 
 
 
178
  }
179
  $output .= '
180
  </div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>';
120
  if ($option['active_buttons']['facebook_like']==true) {
121
  $output .= '
122
  <div class="buttons">
123
+ <fb:like href="' . urlencode(get_permalink($post->ID)) . '" layout="box_count" width="55px" show_faces="false" font=""></fb:like>
124
  </div>';
125
  }
126
 
127
  if ($option['active_buttons']['twitter']==true) {
128
+ if ($option['twitter_id'] != ''){
129
  $output .= '
130
  <div class="buttons">
131
+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="'. $option['twitter_id'] . '">Tweet</a>
132
+ </div>';
133
+ } else {
134
+ $output .= '
135
+ <div class="buttons">
136
+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a>
137
  </div>';
138
  }
139
+ }
140
 
141
  if ($option['active_buttons']['Google_plusone']==true) {
142
  $output .= '
177
  }
178
 
179
  if ($option['active_buttons']['twitter']==true) {
180
+ if ($option['twitter_id'] != ''){
181
+ $output .= '
182
  <div class="buttons">
183
+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="'. $option['twitter_id'] . '">Tweet</a>
 
184
  </div>';
185
+ } else {
186
+ $output .= '
187
+ <div class="buttons">
188
+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a>
189
+ </div>';
190
+ }
191
  }
192
  $output .= '
193
  </div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>';