WordPress Social Share, Social Login and Social Comments Plugin – Super Socializer - Version 2.5.0

Version Description

  • Enhanced Social Sharing to support 80 sharing services, including Pinterest
  • Improved user experience and user interface in Social Sharing
  • Sharing icons display number of shares
  • Included Instagram in Social Login
  • Optimized loading time of Social Sharing and Login interface
  • Facebook commenting and WordPress commenting can be used simultaneously (website users can switch between the two)
  • Fixed the issue with Twitter login redirection
  • Added option to control redirection after user registration
Download this release

Release Info

Developer the_champ
Plugin Icon 128x128 WordPress Social Share, Social Login and Social Comments Plugin – Super Socializer
Version 2.5.0
Comparing to
See all releases

Code changes from version 2.1.0 to 2.5.0

Files changed (65) hide show
  1. admin/facebook.php +20 -2
  2. admin/help.php +26 -15
  3. admin/index.php +1 -0
  4. admin/social_admin.php +1 -0
  5. admin/social_login.php +50 -1
  6. admin/social_sharing.php +7 -1
  7. css/admin.css +47 -1
  8. css/front.css +317 -4
  9. css/index.php +1 -0
  10. images/close.png +0 -0
  11. images/index.php +1 -0
  12. images/login/facebook.png +0 -0
  13. images/login/google.png +0 -0
  14. images/login/index.php +1 -0
  15. images/login/linkedin.png +0 -0
  16. images/login/login.png +0 -0
  17. images/login/twitter.png +0 -0
  18. images/login/vkontakte.png +0 -0
  19. images/sharing/delicious.png +0 -0
  20. images/sharing/digg.png +0 -0
  21. images/sharing/email.png +0 -0
  22. images/sharing/facebook.png +0 -0
  23. images/sharing/float_it.png +0 -0
  24. images/sharing/google.png +0 -0
  25. images/sharing/index.php +1 -0
  26. images/sharing/linkedin.png +0 -0
  27. images/sharing/more_sprite.png +0 -0
  28. images/sharing/print old 2.png +0 -0
  29. images/sharing/print old.png +0 -0
  30. images/sharing/print.png +0 -0
  31. images/sharing/reddit.png +0 -0
  32. images/sharing/sharing.png +0 -0
  33. images/sharing/stumbleupon.png +0 -0
  34. images/sharing/tumblr.png +0 -0
  35. images/sharing/twitter.png +0 -0
  36. images/sharing/vkontakte.png +0 -0
  37. images/sharing/yahoo.png +0 -0
  38. images/transparent_bg.png +0 -0
  39. inc/index.php +1 -0
  40. inc/shortcode.php +33 -22
  41. inc/social_login.php +56 -27
  42. inc/social_sharing.php +131 -23
  43. inc/widget.php +15 -8
  44. index.php +1 -0
  45. js/admin/admin.js +83 -16
  46. js/admin/index.php +1 -0
  47. js/admin/sharing/admin.js +1 -1
  48. js/admin/sharing/index.php +1 -0
  49. js/front/facebook/commenting.js +29 -11
  50. js/front/facebook/feed.js +20 -22
  51. js/front/facebook/index.php +1 -0
  52. js/front/facebook/sdk.js +4 -7
  53. js/front/index.php +1 -0
  54. js/front/sharing/index.php +1 -0
  55. js/front/sharing/sharing.js +586 -0
  56. js/front/social_login/common.js +38 -95
  57. js/front/social_login/general.js +70 -0
  58. js/front/social_login/google.js +2 -4
  59. js/front/social_login/index.php +1 -0
  60. js/front/social_login/instagram.js +22 -0
  61. js/front/social_login/vkontakte.js +3 -6
  62. js/index.php +1 -0
  63. library/index.php +1 -0
  64. readme.txt +23 -3
  65. super_socializer.php +155 -69
admin/facebook.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <div id="fb-root"></div>
2
 
3
  <form action="options.php" method="post">
@@ -42,6 +43,24 @@
42
  <h3><label><?php _e('Facebook Commenting Options', 'TheChamp');?></label></h3>
43
  <div class="inside">
44
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table editcomment menu_content_table">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  <tr>
46
  <th>
47
  <img id="the_champ_fb_comment_title_help" class="the_champ_help_bubble" src="<?php echo plugins_url('../images/info.png', __FILE__) ?>" />
@@ -268,7 +287,7 @@
268
  <tr class="the_champ_help_content" id="the_champ_fb_feed_link_help_cont">
269
  <td colspan="2">
270
  <div>
271
- <?php _e('The link attached to this post (required parameter for this functionality to work)', 'TheChamp') ?>
272
  </div>
273
  </td>
274
  </tr>
@@ -354,7 +373,6 @@
354
  <label for="the_champ_fbfeed_description"><?php _e('Description', 'TheChamp'); ?></label>
355
  </th>
356
  <td>
357
- <!--<input id="the_champ_fbfeed_description" name="the_champ_facebook[feed_description]" type="text" value="<?php echo isset($theChampFacebookOptions['feed_description']) ? $theChampFacebookOptions['feed_description'] : '' ?>" /> -->
358
  <textarea rows="4" cols="40" id="the_champ_fbfeed_description" name="the_champ_facebook[feed_description]"><?php echo isset($theChampFacebookOptions['feed_description']) ? $theChampFacebookOptions['feed_description'] : '' ?></textarea>
359
  </td>
360
  </tr>
1
+ <?php defined('ABSPATH') or die("Cheating........Uh!!"); ?>
2
  <div id="fb-root"></div>
3
 
4
  <form action="options.php" method="post">
43
  <h3><label><?php _e('Facebook Commenting Options', 'TheChamp');?></label></h3>
44
  <div class="inside">
45
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table editcomment menu_content_table">
46
+ <tr>
47
+ <th>
48
+ <img id="the_champ_force_fb_comment_help" class="the_champ_help_bubble" src="<?php echo plugins_url('../images/info.png', __FILE__) ?>" />
49
+ <label for="the_champ_force_fb_comment"><?php _e('Keep only Facebook Commenting', 'TheChamp'); ?></label>
50
+ </th>
51
+ <td>
52
+ <input id="the_champ_force_fb_comment" name="the_champ_facebook[force_fb_comment]" type="checkbox" <?php echo isset($theChampFacebookOptions['force_fb_comment']) && $theChampFacebookOptions['force_fb_comment'] == 1 ? 'checked = "checked"' : '';?> value="1" />
53
+ </td>
54
+ </tr>
55
+
56
+ <tr class="the_champ_help_content" id="the_champ_force_fb_comment_help_cont">
57
+ <td colspan="2">
58
+ <div>
59
+ <?php _e('If enabled, only Facebook commenting will be there without the option to switch to WordPress commenting', 'TheChamp') ?>
60
+ </div>
61
+ </td>
62
+ </tr>
63
+
64
  <tr>
65
  <th>
66
  <img id="the_champ_fb_comment_title_help" class="the_champ_help_bubble" src="<?php echo plugins_url('../images/info.png', __FILE__) ?>" />
287
  <tr class="the_champ_help_content" id="the_champ_fb_feed_link_help_cont">
288
  <td colspan="2">
289
  <div>
290
+ <?php _e('The link attached to this feed (required parameter for this functionality to work)', 'TheChamp') ?>
291
  </div>
292
  </td>
293
  </tr>
373
  <label for="the_champ_fbfeed_description"><?php _e('Description', 'TheChamp'); ?></label>
374
  </th>
375
  <td>
 
376
  <textarea rows="4" cols="40" id="the_champ_fbfeed_description" name="the_champ_facebook[feed_description]"><?php echo isset($theChampFacebookOptions['feed_description']) ? $theChampFacebookOptions['feed_description'] : '' ?></textarea>
377
  </td>
378
  </tr>
admin/help.php CHANGED
@@ -1,21 +1,16 @@
 
1
  <div class="the_champ_right_column">
2
  <div class="stuffbox">
3
  <h3><label><?php _e('About', 'TheChamp');?></label><label style="float:right"><?php _e('Version', 'TheChamp');?> <?php echo get_option('the_champ_ss_version'); ?></label></h3>
4
  <div class="inside">
5
  <p><strong>Super Socializer</strong> by <strong>The Champ</strong></p>
6
  <p>I am a tech enthusiast. I like to play with code and build great stuff (and like to call myself - The Champ....:) ). You can connect with me (and my upcoming work) via:</p>
7
- <p><strong>Blog</strong>:
8
- <br/><a href="http://thechamplord.wordpress.com" target="_blank">http://thechamplord.wordpress.com</a></p>
9
- <p><strong>Facebook</strong>:
10
- <br/>My Facebook Profile:
11
- <br/><a href="https://www.facebook.com/thechamp.lord" target="_blank">https://www.facebook.com/thechamp.lord</a>
12
- <br/>My Fan Page:
13
- <br/><a href="https://www.facebook.com/pages/The-Champ/196278200561984" target="_blank">https://www.facebook.com/pages/The-Champ/196278200561984</a>
14
- <br/>Plugin Fan Page:
15
- <br/><a href="https://www.facebook.com/SocializerChamp" target="_blank">https://www.facebook.com/SocializerChamp</a>
16
- </p>
17
- <p><strong>Twitter</strong>: <br/><a href="https://twitter.com/l0rd_champ" target="_blank">https://twitter.com/l0rd_champ</a></p>
18
- <p><strong>LinkedIn</strong>: <br/><a href="http://www.linkedin.com/pub/champ-lord/8b/aa2/352" target="_blank">http://www.linkedin.com/pub/champ-lord/8b/aa2/352</a></p>
19
  </div>
20
  </div>
21
 
@@ -53,12 +48,28 @@
53
  </div>
54
  </div>
55
 
 
 
 
 
 
 
 
 
 
 
 
56
  <div class="stuffbox">
57
  <h3><label><?php _e('Want plugin customization?', 'TheChamp');?></label></h3>
58
  <div class="inside">
59
- <p>If you want custom features in the plugin, I can do it for you. Just click the button below<br/><br/>
60
- <input class="button button-primary" onclick="window.location.href = 'mailto:lordofthechamps@gmail.com?subject=' + escape('Plugin customization') + '&body=' + escape('I require following custom features in the plugin:')" type="button" value="Request custom features" />
61
- </p>
 
 
 
 
 
62
  </div>
63
  </div>
64
  </div>
1
+ <?php defined('ABSPATH') or die("Cheating........Uh!!"); ?>
2
  <div class="the_champ_right_column">
3
  <div class="stuffbox">
4
  <h3><label><?php _e('About', 'TheChamp');?></label><label style="float:right"><?php _e('Version', 'TheChamp');?> <?php echo get_option('the_champ_ss_version'); ?></label></h3>
5
  <div class="inside">
6
  <p><strong>Super Socializer</strong> by <strong>The Champ</strong></p>
7
  <p>I am a tech enthusiast. I like to play with code and build great stuff (and like to call myself - The Champ....:) ). You can connect with me (and my upcoming work) via:</p>
8
+ <div>
9
+ <a href="http://thechamplord.wordpress.com" target="_blank"><img style="box-shadow:1px 1px 10px 1px #888888" class="theChampLoginButton theChampWordpressButton" title="WordPress Blog" /></a>
10
+ <a href="https://www.facebook.com/thechamp.lord" target="_blank"><img style="box-shadow:1px 1px 10px 1px #888888" class="theChampLoginButton theChampFacebookButton" title="Facebook" /></a>
11
+ <a href="https://twitter.com/l0rd_champ" target="_blank"><img style="box-shadow:1px 1px 10px 1px #888888" class="theChampLoginButton theChampTwitterButton" title="Twitter" /></a>
12
+ <a href="http://www.linkedin.com/pub/champ-lord/8b/aa2/352" target="_blank"><img style="box-shadow:1px 1px 10px 1px #888888" class="theChampLoginButton theChampLinkedinButton" title="LinkedIn" /></a>
13
+ </div>
 
 
 
 
 
 
14
  </div>
15
  </div>
16
 
48
  </div>
49
  </div>
50
 
51
+ <div class="stuffbox">
52
+ <h3><label><?php _e('Donate', 'TheChamp');?></label></h3>
53
+ <div class="inside">
54
+ <p>If you like the plugin, want to get it improved and want to see it at the top of other plugins, please consider making a donation.</p>
55
+ <input type="text" style="width: 50px" name="amount" />
56
+ <span>USD</span>
57
+ <br/><br/>
58
+ <input type="button" class="the_champ_paypal_submit" value="Donate" style="background-color: #1D9AFC; padding: 3px 40px 4px; font-size: 12px; border: 0; color: #fff; border-radius: 2px; font-weight: 700; text-transform: uppercase;" class="button-secondary">
59
+ </div>
60
+ </div>
61
+
62
  <div class="stuffbox">
63
  <h3><label><?php _e('Want plugin customization?', 'TheChamp');?></label></h3>
64
  <div class="inside">
65
+ <p>If you want custom features in the plugin, I can do it for you. Just drop me an email at <a href="mailto:lordofthechamps@gmail.com">lordofthechamps@gmail.com</a></p>
66
+ </div>
67
+ </div>
68
+
69
+ <div class="stuffbox">
70
+ <h3><label><?php _e('White-Label', 'TheChamp');?></label></h3>
71
+ <div class="inside">
72
+ <p>Remove the plugin credit links ("Super Socializer by The Champ") in just $15. Interested? Email me: <a href="mailto:lordofthechamps@gmail.com">lordofthechamps@gmail.com</a></p>
73
  </div>
74
  </div>
75
  </div>
admin/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
admin/social_admin.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <div id="fb-root"></div>
2
 
3
  <h2>Super Socializer</h2>
1
+ <?php defined('ABSPATH') or die("Cheating........Uh!!"); ?>
2
  <div id="fb-root"></div>
3
 
4
  <h2>Super Socializer</h2>
admin/social_login.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <div id="fb-root"></div>
2
 
3
  <form action="options.php" method="post">
@@ -60,6 +61,10 @@
60
  <input id="the_champ_login_vkontakte" name="the_champ_login[providers][]" type="checkbox" <?php echo isset($theChampLoginOptions['providers']) && in_array('vkontakte', $theChampLoginOptions['providers']) ? 'checked = "checked"' : '';?> value="vkontakte" />
61
  <label for="the_champ_login_vkontakte"><?php _e("Vkontakte", 'TheChamp'); ?></label>
62
  </div>
 
 
 
 
63
  </td>
64
  </tr>
65
 
@@ -179,6 +184,24 @@
179
  </td>
180
  </tr>
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  <tr>
183
  <th>
184
  <img id="the_champ_sl_footer_script_help" class="the_champ_help_bubble" src="<?php echo plugins_url('../images/info.png', __FILE__) ?>" />
@@ -192,7 +215,7 @@
192
  <tr class="the_champ_help_content" id="the_champ_sl_footer_script_help_cont">
193
  <td colspan="2">
194
  <div>
195
- <?php _e('If enabled (recommended), all the Javascript code will be included in the footer of your website.<br/><strong>Note: It may break the functionality of the plugin if "wp_footer" and "login_footer" hooks do not exist in your Wordpress theme. In this case, keep this option disabled.</strong>', 'TheChamp') ?>
196
  </div>
197
  </td>
198
  </tr>
@@ -404,6 +427,32 @@
404
  </div>
405
  </td>
406
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407
  </table>
408
  </div>
409
  </div>
1
+ <?php defined('ABSPATH') or die("Cheating........Uh!!"); ?>
2
  <div id="fb-root"></div>
3
 
4
  <form action="options.php" method="post">
61
  <input id="the_champ_login_vkontakte" name="the_champ_login[providers][]" type="checkbox" <?php echo isset($theChampLoginOptions['providers']) && in_array('vkontakte', $theChampLoginOptions['providers']) ? 'checked = "checked"' : '';?> value="vkontakte" />
62
  <label for="the_champ_login_vkontakte"><?php _e("Vkontakte", 'TheChamp'); ?></label>
63
  </div>
64
+ <div class="theChampSharingProviderContainer">
65
+ <input id="the_champ_login_instagram" name="the_champ_login[providers][]" type="checkbox" <?php echo isset($theChampLoginOptions['providers']) && in_array('instagram', $theChampLoginOptions['providers']) ? 'checked = "checked"' : '';?> value="instagram" />
66
+ <label for="the_champ_login_instagram"><?php _e("Instagram", 'TheChamp'); ?></label>
67
+ </div>
68
  </td>
69
  </tr>
70
 
184
  </td>
185
  </tr>
186
 
187
+ <tr>
188
+ <th>
189
+ <img id="the_champ_slinsta_id_help" class="the_champ_help_bubble" src="<?php echo plugins_url('../images/info.png', __FILE__) ?>" />
190
+ <label for="the_champ_insta_key"><?php _e("Instagram Client ID", 'TheChamp'); ?></label>
191
+ </th>
192
+ <td>
193
+ <input id="the_champ_insta_key" name="the_champ_login[insta_id]" type="text" value="<?php echo isset($theChampLoginOptions['insta_id']) ? $theChampLoginOptions['insta_id'] : '' ?>" />
194
+ </td>
195
+ </tr>
196
+
197
+ <tr class="the_champ_help_content" id="the_champ_slinsta_id_help_cont">
198
+ <td colspan="2">
199
+ <div>
200
+ <?php echo sprintf(__('Required for Instagram Social Login to work. Please follow the documentation at <a href="%s" target="_blank">this link</a> to get Instagram Client ID', 'TheChamp'), 'http://thechamplord.wordpress.com/2014/04/14/how-to-configure-instagram-application-and-get-client-id/') ?>
201
+ </div>
202
+ </td>
203
+ </tr>
204
+
205
  <tr>
206
  <th>
207
  <img id="the_champ_sl_footer_script_help" class="the_champ_help_bubble" src="<?php echo plugins_url('../images/info.png', __FILE__) ?>" />
215
  <tr class="the_champ_help_content" id="the_champ_sl_footer_script_help_cont">
216
  <td colspan="2">
217
  <div>
218
+ <?php _e('If enabled (recommended), all the Javascript code will be included in the footer of your website.<br/><strong>"wp_footer" and "login_footer" hooks should be there in your Wordpress theme for this to work, if you are not sure about this, keep this option unchecked.</strong>', 'TheChamp') ?>
219
  </div>
220
  </td>
221
  </tr>
427
  </div>
428
  </td>
429
  </tr>
430
+
431
+ <tr>
432
+ <th>
433
+ <img id="the_champ_sl_register_redirect_help" class="the_champ_help_bubble" src="<?php echo plugins_url('../images/info.png', __FILE__) ?>" />
434
+ <label><?php _e("Registration redirection", 'TheChamp'); ?></label>
435
+ </th>
436
+ <td id="the_champ_register_redirection_column">
437
+ <input id="the_champ_register_redirection_same" name="the_champ_login[register_redirection]" type="radio" <?php echo !isset($theChampLoginOptions['register_redirection']) || $theChampLoginOptions['register_redirection'] == 'same' ? 'checked = "checked"' : '';?> value="same" />
438
+ <label for="the_champ_register_redirection_same">Same page where user logged in</label><br/>
439
+ <input id="the_champ_register_redirection_home" name="the_champ_login[register_redirection]" type="radio" <?php echo isset($theChampLoginOptions['register_redirection']) && $theChampLoginOptions['register_redirection'] == 'homepage' ? 'checked = "checked"' : '';?> value="homepage" />
440
+ <label for="the_champ_register_redirection_home">Homepage</label><br/>
441
+ <input id="the_champ_register_redirection_account" name="the_champ_login[register_redirection]" type="radio" <?php echo isset($theChampLoginOptions['register_redirection']) && $theChampLoginOptions['register_redirection'] == 'account' ? 'checked = "checked"' : '';?> value="account" />
442
+ <label for="the_champ_register_redirection_account">Account dashboard</label><br/>
443
+ <input id="the_champ_register_redirection_custom" name="the_champ_login[register_redirection]" type="radio" <?php echo isset($theChampLoginOptions['register_redirection']) && $theChampLoginOptions['register_redirection'] == 'custom' ? 'checked = "checked"' : '';?> value="custom" />
444
+ <label for="the_champ_register_redirection_custom">Custom Url</label><br/>
445
+ <input id="the_champ_register_redirection_url" name="the_champ_login[register_redirection_url]" type="text" value="<?php echo isset($theChampLoginOptions['register_redirection_url']) ? $theChampLoginOptions['register_redirection_url'] : '' ?>" />
446
+ </td>
447
+ </tr>
448
+
449
+ <tr class="the_champ_help_content" id="the_champ_sl_register_redirect_help_cont">
450
+ <td colspan="2">
451
+ <div>
452
+ <?php _e('User will be redirected to the selected page after registration (first Social Login) through Social Login', 'TheChamp') ?>
453
+ </div>
454
+ </td>
455
+ </tr>
456
  </table>
457
  </div>
458
  </div>
admin/social_sharing.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <script>
2
  var theChampSharingIconPath = '<?php echo plugins_url('../images/sharing', __FILE__); ?>';
3
  </script>
@@ -113,6 +114,11 @@ var theChampSharingIconPath = '<?php echo plugins_url('../images/sharing', __FIL
113
  <input id="the_champ_sharing_vk" name="the_champ_sharing[providers][]" type="checkbox" <?php echo isset($theChampSharingOptions['providers']) && in_array('vkontakte', $theChampSharingOptions['providers']) ? 'checked = "checked"' : '';?> value="vkontakte" />
114
  <label for="the_champ_sharing_vk"><?php _e("Vkontakte", 'TheChamp'); ?></label>
115
  </div>
 
 
 
 
 
116
  </td>
117
  </tr>
118
 
@@ -136,7 +142,7 @@ var theChampSharingIconPath = '<?php echo plugins_url('../images/sharing', __FIL
136
  foreach($theChampSharingOptions['horizontal_re_providers'] as $rearrange){
137
  ?>
138
  <li title="<?php echo $rearrange ?>" id="the_champ_re_<?php echo str_replace(' ', '_', $rearrange) ?>" >
139
- <img src="<?php echo plugins_url('../images/sharing/'. str_replace(' ', '_', $rearrange) . '.png', __FILE__) ?>" />
140
  <input type="hidden" name="the_champ_sharing[horizontal_re_providers][]" value="<?php echo $rearrange ?>">
141
  </li>
142
  <?php
1
+ <?php defined('ABSPATH') or die("Cheating........Uh!!"); ?>
2
  <script>
3
  var theChampSharingIconPath = '<?php echo plugins_url('../images/sharing', __FILE__); ?>';
4
  </script>
114
  <input id="the_champ_sharing_vk" name="the_champ_sharing[providers][]" type="checkbox" <?php echo isset($theChampSharingOptions['providers']) && in_array('vkontakte', $theChampSharingOptions['providers']) ? 'checked = "checked"' : '';?> value="vkontakte" />
115
  <label for="the_champ_sharing_vk"><?php _e("Vkontakte", 'TheChamp'); ?></label>
116
  </div>
117
+
118
+ <div class="theChampSharingProviderContainer">
119
+ <input id="the_champ_sharing_pinterest" name="the_champ_sharing[providers][]" type="checkbox" <?php echo isset($theChampSharingOptions['providers']) && in_array('pinterest', $theChampSharingOptions['providers']) ? 'checked = "checked"' : '';?> value="pinterest" />
120
+ <label for="the_champ_sharing_pinterest"><?php _e("Pinterest", 'TheChamp'); ?></label>
121
+ </div>
122
  </td>
123
  </tr>
124
 
142
  foreach($theChampSharingOptions['horizontal_re_providers'] as $rearrange){
143
  ?>
144
  <li title="<?php echo $rearrange ?>" id="the_champ_re_<?php echo str_replace(' ', '_', $rearrange) ?>" >
145
+ <i class="theChampSharingButton theChampSharing<?php echo str_replace(' ', '', $rearrange) ?>Button"></i>
146
  <input type="hidden" name="the_champ_sharing[horizontal_re_providers][]" value="<?php echo $rearrange ?>">
147
  </li>
148
  <?php
css/admin.css CHANGED
@@ -52,6 +52,9 @@ div.stuffbox h3{
52
  display: block;
53
  margin: 0 2px
54
  }
 
 
 
55
  .the_champ_left_column{
56
  float:left;
57
  width: 56% !important
@@ -77,4 +80,47 @@ div.stuffbox h3{
77
  }
78
  input[type=text]{
79
  width: 351px
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  display: block;
53
  margin: 0 2px
54
  }
55
+ #the_champ_ss_rearrange{
56
+ margin: 0
57
+ }
58
  .the_champ_left_column{
59
  float:left;
60
  width: 56% !important
80
  }
81
  input[type=text]{
82
  width: 351px
83
+ }
84
+ .theChampLoginButton{
85
+ background: url('../images/login/login.png') no-repeat;
86
+ cursor: pointer
87
+ }
88
+ .theChampFacebookButton {
89
+ background-position: -0px -0px;
90
+ width: 32px;
91
+ height: 32px;
92
+ }
93
+ .theChampWordpressButton {
94
+ background-position: -0px -96px;
95
+ width: 32px;
96
+ height: 32px;
97
+ }
98
+ .theChampLinkedinButton {
99
+ background-position: -32px -32px;
100
+ width: 32px;
101
+ height: 32px;
102
+ }
103
+ .theChampTwitterButton {
104
+ background-position: -0px -64px;
105
+ width: 32px;
106
+ height: 32px;
107
+ }
108
+ .theChampSharingButton{
109
+ display: block;
110
+ background: url('../images/sharing/sharing.png') no-repeat;
111
+ }
112
+ .theChampSharingdeliciousButton { background-position: -0px -0px; width: 32px; height: 32px; }
113
+ .theChampSharingdiggButton { background-position: -32px -0px; width: 32px; height: 32px; }
114
+ .theChampSharingemailButton { background-position: -64px -0px; width: 32px; height: 32px; }
115
+ .theChampSharingfacebookButton { background-position: -96px -0px; width: 32px; height: 32px; }
116
+ .theChampSharingfloatitButton { background-position: -0px -32px; width: 32px; height: 32px; }
117
+ .theChampSharinggoogleButton { background-position: -32px -32px; width: 32px; height: 32px; }
118
+ .theChampSharinglinkedinButton { background-position: -64px -32px; width: 32px; height: 32px; }
119
+ .theChampSharingpinterestButton { background-position: -0px -64px; width: 32px; height: 32px; }
120
+ .theChampSharingprintButton { background-position: -32px -64px; width: 32px; height: 32px; }
121
+ .theChampSharingredditButton { background-position: -64px -64px; width: 32px; height: 32px; }
122
+ .theChampSharingstumbleuponButton { background-position: -96px -64px; width: 32px; height: 32px; }
123
+ .theChampSharingtumblrButton { background-position: -0px -96px; width: 32px; height: 32px; }
124
+ .theChampSharingtwitterButton { background-position: -32px -96px; width: 32px; height: 32px; }
125
+ .theChampSharingvkontakteButton { background-position: -64px -96px; width: 32px; height: 32px; }
126
+ .theChampSharingyahooButton { background-position: -96px -96px; width: 32px; height: 32px; }
css/front.css CHANGED
@@ -4,6 +4,9 @@
4
  color: red;
5
  margin: 7px 0;
6
  }
 
 
 
7
  .the_champ_login_container img{
8
  cursor: pointer;
9
  margin: 2px;
@@ -11,9 +14,6 @@
11
  float: left;
12
  border: none
13
  }
14
- .theChampTwitterButton{
15
- display: block !important
16
- }
17
  #the_champ_loading_image{
18
  display: block !important;
19
  float: none
@@ -28,4 +28,317 @@
28
  border:1px solid #E6DB55;
29
  padding:5px;
30
  margin: 10px
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  color: red;
5
  margin: 7px 0;
6
  }
7
+ .the_champ_login_container{
8
+ margin: 2px 0;
9
+ }
10
  .the_champ_login_container img{
11
  cursor: pointer;
12
  margin: 2px;
14
  float: left;
15
  border: none
16
  }
 
 
 
17
  #the_champ_loading_image{
18
  display: block !important;
19
  float: none
28
  border:1px solid #E6DB55;
29
  padding:5px;
30
  margin: 10px
31
+ }
32
+ #the_champ_sharing_more_providers{
33
+ position: fixed;
34
+ top: 150px;
35
+ left: 48%;
36
+ background: none repeat scroll 0 0 #FAFAFA;
37
+ width: 650px;
38
+ margin-left: -300px;
39
+ z-index: 10000000;
40
+ }
41
+ #the_champ_popup_bg{
42
+ background: url("../images/transparent_bg.png") repeat scroll 0 0 rgba(0, 0, 0, 0);
43
+ bottom: 0;
44
+ display: block;
45
+ left: 0;
46
+ position: fixed;
47
+ right: 0;
48
+ top: 0;
49
+ z-index: 10000
50
+ }
51
+ #the_champ_sharing_more_providers .title{
52
+ background: none repeat scroll 0 0 #58B8F8;
53
+ border-bottom: 1px solid #D7D7D7;
54
+ color: #fff;
55
+ font-size: 14px;
56
+ font-weight: 700;
57
+ letter-spacing: inherit;
58
+ line-height: 34px;
59
+ padding: 0 !important;
60
+ text-align: center;
61
+ text-transform: none;
62
+ margin: 0
63
+ }
64
+ #the_champ_sharing_more_providers *{
65
+ font-family: Arial, Helvetica, sans-serif;
66
+ }
67
+ #the_champ_sharing_more_providers #the_champ_sharing_more_content{
68
+ background: none repeat scroll 0 0 #FAFAFA;
69
+ border-radius: 4px;
70
+ color: #555555;
71
+ height: 100%;
72
+ width: 100%;
73
+ }
74
+ #the_champ_sharing_more_providers .filter{
75
+ padding: 10px 0 0;
76
+ position: relative;
77
+ }
78
+ #the_champ_sharing_more_providers .all-services{
79
+ clear: both;
80
+ height: 250px;
81
+ overflow: auto;
82
+ }
83
+ #the_champ_sharing_more_content .all-services ul{
84
+ margin: 10px;
85
+ overflow: hidden;
86
+ list-style: none outside none;
87
+ padding-left: 0 !important
88
+ }
89
+ #the_champ_sharing_more_content .all-services ul li{
90
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
91
+ float: left;
92
+ width: 33.3333%;
93
+ }
94
+ #the_champ_sharing_more_providers .close-button.separated {
95
+ background: transparent !important;
96
+ border: none !important;
97
+ box-shadow: none !important;
98
+ }
99
+ #the_champ_sharing_more_providers .close-button{
100
+ color: #555555 !important;
101
+ cursor: pointer !important;
102
+ font-size: 29px !important;
103
+ line-height: 29px !important;
104
+ margin: 0 !important;
105
+ padding: 0 !important;
106
+ position: absolute;
107
+ right: -13px;
108
+ top: -11px
109
+ }
110
+ /*
111
+ #the_champ_sharing_more_providers .icon-cross-alt:before {
112
+ content: "x";
113
+ }*/
114
+ #the_champ_sharing_more_providers .filter input.search {
115
+ display: block;
116
+ float: none;
117
+ font-family: "open sans","helvetica neue",helvetica,arial,sans-serif;
118
+ font-weight: 300;
119
+ height: auto;
120
+ line-height: inherit;
121
+ margin: 0 auto;
122
+ padding: 5px 8px 5px 10px;
123
+ width: 95%;
124
+ border-color: #cccccc;
125
+ color: #000;
126
+ background: none repeat scroll 0 0 #FFFFFF !important;
127
+ font-size: 16px !important;
128
+ text-align: left !important
129
+
130
+ }
131
+ #the_champ_sharing_more_providers .footer-panel {
132
+ background: none repeat scroll 0 0 #58B8F8;
133
+ border-top: 1px solid #D7D7D7;
134
+ padding: 4px 0;
135
+ width: 100%;
136
+ color: #fff
137
+ }
138
+ #the_champ_sharing_more_providers .footer-panel p {
139
+ color: #000;
140
+ font-family: 'helvetica neue',arial,helvetica,sans-serif;
141
+ font-size: 12px;
142
+ line-height: 1.2;
143
+ margin: 0;
144
+ padding: 0 6px;
145
+ }
146
+ #the_champ_sharing_more_providers .footer-panel a {
147
+ color: #fff;
148
+ text-decoration: none;
149
+ font-weight: bold
150
+ }
151
+ #the_champ_sharing_more_providers .all-services ul li a {
152
+ border-radius: 3px;
153
+ color: #666666;
154
+ display: block;
155
+ font-size: 14px;
156
+ height: auto;
157
+ line-height: 20px;
158
+ overflow: hidden;
159
+ padding: 8px;
160
+ text-decoration: none;
161
+ text-overflow: ellipsis;
162
+ white-space: nowrap;
163
+ border: none !important;
164
+ }
165
+ .the_champ_share_count{
166
+ display: block;
167
+ visibility: hidden;
168
+ background-color: #58B8F8 !important;
169
+ width: 5px;
170
+ height: auto;
171
+ text-align: center;
172
+ min-width: 8px !important;
173
+ padding: 1px 4px !important;
174
+ color: white !important;
175
+ font-family: 'Open Sans', arial, sans-serif !important;
176
+ font-size: 10px !important;
177
+ font-weight: 600 !important;
178
+ -webkit-border-radius: 15px !important;
179
+ border-radius: 15px !important;
180
+ -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.4);
181
+ box-shadow: 0 2px 2px rgba(0,0,0,0.4);
182
+ text-shadow: 0 -1px 0 rgba(0,0,0,0.2);
183
+ line-height: 14px !important;
184
+ border: 2px solid white !important;
185
+ z-index: 1;
186
+ margin: 2px auto;
187
+ webkit-box-sizing: content-box !important;
188
+ -moz-box-sizing: content-box !important;
189
+ box-sizing: content-box !important;
190
+ }
191
+ #the_champ_comment_toggle{
192
+ margin-bottom: 10px
193
+ }
194
+ /* Sharing services background icons */
195
+ .the_champ_sharing_service{ display: block; background: url('../images/sharing/more_sprite.png') no-repeat; margin-right: 3px; float:left }
196
+ .the_champ_sharing_service_amazon { background-position: -0px -0px; width: 20px; height: 20px; }
197
+ .the_champ_sharing_service_aol { background-position: -20px -0px; width: 20px; height: 20px; }
198
+ .the_champ_sharing_service_arto { background-position: -40px -0px; width: 20px; height: 20px; }
199
+ .the_champ_sharing_service_bebo { background-position: -60px -0px; width: 20px; height: 20px; }
200
+ .the_champ_sharing_service_bitly { background-position: -80px -0px; width: 20px; height: 20px; }
201
+ .the_champ_sharing_service_blogger { background-position: -100px -0px; width: 20px; height: 20px; }
202
+ .the_champ_sharing_service_box { background-position: -120px -0px; width: 20px; height: 20px; }
203
+ .the_champ_sharing_service_boxee { background-position: -0px -20px; width: 20px; height: 20px; }
204
+ .the_champ_sharing_service_buffer { background-position: -20px -20px; width: 20px; height: 20px; }
205
+ .the_champ_sharing_service_buzzster { background-position: -40px -20px; width: 20px; height: 20px; }
206
+ .the_champ_sharing_service_delicious { background-position: -60px -20px; width: 20px; height: 20px; }
207
+ .the_champ_sharing_service_digg { background-position: -80px -20px; width: 20px; height: 20px; }
208
+ .the_champ_sharing_service_diigo { background-position: -100px -20px; width: 20px; height: 20px; }
209
+ .the_champ_sharing_service_diigolet { background-position: -120px -20px; width: 20px; height: 20px; }
210
+ .the_champ_sharing_service_email { background-position: -0px -40px; width: 20px; height: 20px; }
211
+ .the_champ_sharing_service_evernote { background-position: -20px -40px; width: 20px; height: 20px; }
212
+ .the_champ_sharing_service_facebook { background-position: -40px -40px; width: 20px; height: 20px; }
213
+ .the_champ_sharing_service_fancy { background-position: -60px -40px; width: 20px; height: 20px; }
214
+ .the_champ_sharing_service_fark { background-position: -80px -40px; width: 20px; height: 20px; }
215
+ .the_champ_sharing_service_flipboard { background-position: -100px -40px; width: 20px; height: 20px; }
216
+ .the_champ_sharing_service_google { background-position: -120px -40px; width: 20px; height: 20px; }
217
+ .the_champ_sharing_service_google-apps { background-position: -0px -60px; width: 20px; height: 20px; }
218
+ .the_champ_sharing_service_google-bookmark { background-position: -20px -60px; width: 20px; height: 20px; }
219
+ .the_champ_sharing_service_google-mail { background-position: -40px -60px; width: 20px; height: 20px; }
220
+ .the_champ_sharing_service_heart { background-position: -60px -60px; width: 20px; height: 20px; }
221
+ .the_champ_sharing_service_hootsuite { background-position: -80px -60px; width: 20px; height: 20px; }
222
+ .the_champ_sharing_service_hotmail { background-position: -100px -60px; width: 20px; height: 20px; }
223
+ .the_champ_sharing_service_identica { background-position: -120px -60px; width: 20px; height: 20px; }
224
+ .the_champ_sharing_service_inbound { background-position: -0px -80px; width: 20px; height: 20px; }
225
+ .the_champ_sharing_service_instapaper { background-position: -20px -80px; width: 20px; height: 20px; }
226
+ .the_champ_sharing_service_izeby { background-position: -40px -80px; width: 20px; height: 20px; }
227
+ .the_champ_sharing_service_kaboodle { background-position: -60px -80px; width: 20px; height: 20px; }
228
+ .the_champ_sharing_service_linkedin { background-position: -80px -80px; width: 20px; height: 20px; }
229
+ .the_champ_sharing_service_mister-wong { background-position: -100px -80px; width: 20px; height: 20px; }
230
+ .the_champ_sharing_service_msdn { background-position: -120px -80px; width: 20px; height: 20px; }
231
+ .the_champ_sharing_service_ning { background-position: -0px -100px; width: 20px; height: 20px; }
232
+ .the_champ_sharing_service_orkut { background-position: -20px -100px; width: 20px; height: 20px; }
233
+ .the_champ_sharing_service_pinboard { background-position: -40px -100px; width: 20px; height: 20px; }
234
+ .the_champ_sharing_service_pinterest { background-position: -60px -100px; width: 20px; height: 20px; }
235
+ .the_champ_sharing_service_plurk { background-position: -80px -100px; width: 20px; height: 20px; }
236
+ .the_champ_sharing_service_pocket { background-position: -100px -100px; width: 20px; height: 20px; }
237
+ .the_champ_sharing_service_print-friendly { background-position: -120px -100px; width: 20px; height: 20px; }
238
+ .the_champ_sharing_service_quora { background-position: -0px -120px; width: 20px; height: 20px; }
239
+ .the_champ_sharing_service_read-later { background-position: -20px -120px; width: 20px; height: 20px; }
240
+ .the_champ_sharing_service_reddit { background-position: -40px -120px; width: 20px; height: 20px; }
241
+ .the_champ_sharing_service_soup { background-position: -60px -120px; width: 20px; height: 20px; }
242
+ .the_champ_sharing_service_springpad { background-position: -80px -120px; width: 20px; height: 20px; }
243
+ .the_champ_sharing_service_stumbleupon { background-position: -100px -120px; width: 20px; height: 20px; }
244
+ .the_champ_sharing_service_stumpedia { background-position: -120px -120px; width: 20px; height: 20px; }
245
+ .the_champ_sharing_service_techmeme { background-position: -0px -140px; width: 20px; height: 20px; }
246
+ .the_champ_sharing_service_tinyurl { background-position: -20px -140px; width: 20px; height: 20px; }
247
+ .the_champ_sharing_service_tumblr { background-position: -40px -140px; width: 20px; height: 20px; }
248
+ .the_champ_sharing_service_twitter { background-position: -60px -140px; width: 20px; height: 20px; }
249
+ .the_champ_sharing_service_typepad { background-position: -80px -140px; width: 20px; height: 20px; }
250
+ .the_champ_sharing_service_viadeo { background-position: -100px -140px; width: 20px; height: 20px; }
251
+ .the_champ_sharing_service_vkontakte { background-position: -120px -140px; width: 20px; height: 20px; }
252
+ .the_champ_sharing_service_wanelo { background-position: -0px -160px; width: 20px; height: 20px; }
253
+ .the_champ_sharing_service_windows-live { background-position: -20px -160px; width: 20px; height: 20px; }
254
+ .the_champ_sharing_service_wordpress { background-position: -40px -160px; width: 20px; height: 20px; }
255
+ .the_champ_sharing_service_yahoo { background-position: -60px -160px; width: 20px; height: 20px; }
256
+ .the_champ_sharing_service_yammer { background-position: -80px -160px; width: 20px; height: 20px; }
257
+ .the_champ_sharing_service_yc-hacker { background-position: -100px -160px; width: 20px; height: 20px; }
258
+
259
+ ul.the_champ_login_ul{
260
+ list-style: none outside none !important;
261
+ margin: 3px 0 !important;
262
+ padding-left: 0 !important
263
+ }
264
+ ul.the_champ_login_ul li{
265
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
266
+ float: left;
267
+ padding: 0 !important;
268
+ margin: 0 !important
269
+ }
270
+ .theChampLoginButton{
271
+ display: block;
272
+ background: url('../images/login/login.png') no-repeat;
273
+ margin: 2px;
274
+ float: left;
275
+ cursor: pointer
276
+ }
277
+ .theChampFacebookButton {
278
+ background-position: -0px -0px;
279
+ width: 32px;
280
+ height: 32px;
281
+ }
282
+ .theChampGoogleButton {
283
+ background-position: -32px -0px;
284
+ width: 32px;
285
+ height: 32px;
286
+ display: none
287
+ }
288
+ .theChampInstagramButton {
289
+ background-position: -0px -32px;
290
+ width: 32px;
291
+ height: 32px;
292
+ display: block !important
293
+ }
294
+ .theChampLinkedinButton {
295
+ background-position: -32px -32px;
296
+ width: 32px;
297
+ height: 32px;
298
+ display: none
299
+ }
300
+ .theChampTwitterButton {
301
+ background-position: -0px -64px;
302
+ width: 32px;
303
+ height: 32px;
304
+ display: block !important
305
+ }
306
+ .theChampVkontakteButton {
307
+ background-position: -32px -64px;
308
+ width: 32px;
309
+ height: 32px;
310
+ display: none
311
+ }
312
+ ul.the_champ_sharing_ul{
313
+ list-style: none outside none !important;
314
+ margin: 1px 0 !important;
315
+ padding-left: 0 !important
316
+ }
317
+ ul.the_champ_sharing_ul li{
318
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
319
+ float: left !important;
320
+ margin: 0 !important
321
+ }
322
+ .theChampSharingButton{
323
+ display: block;
324
+ background: url('../images/sharing/sharing.png') no-repeat;
325
+ margin: 2px;
326
+ float: left;
327
+ cursor: pointer
328
+ }
329
+ .theChampSharingDeliciousButton { background-position: -0px -0px; width: 32px; height: 32px; }
330
+ .theChampSharingDiggButton { background-position: -32px -0px; width: 32px; height: 32px; }
331
+ .theChampSharingEmailButton { background-position: -64px -0px; width: 32px; height: 32px; }
332
+ .theChampSharingFacebookButton { background-position: -96px -0px; width: 32px; height: 32px; }
333
+ .theChampSharingFloatitButton { background-position: -0px -32px; width: 32px; height: 32px; }
334
+ .theChampSharingGoogleButton { background-position: -32px -32px; width: 32px; height: 32px; }
335
+ .theChampSharingLinkedinButton { background-position: -64px -32px; width: 32px; height: 32px; }
336
+ .theChampSharingMoreButton { background-position: -96px -32px; width: 32px; height: 32px; }
337
+ .theChampSharingPinterestButton { background-position: -0px -64px; width: 32px; height: 32px; }
338
+ .theChampSharingPrintButton { background-position: -32px -64px; width: 32px; height: 32px; }
339
+ .theChampSharingRedditButton { background-position: -64px -64px; width: 32px; height: 32px; }
340
+ .theChampSharingStumbleuponButton { background-position: -96px -64px; width: 32px; height: 32px; }
341
+ .theChampSharingTumblrButton { background-position: -0px -96px; width: 32px; height: 32px; }
342
+ .theChampSharingTwitterButton { background-position: -32px -96px; width: 32px; height: 32px; }
343
+ .theChampSharingVkontakteButton { background-position: -64px -96px; width: 32px; height: 32px; }
344
+ .theChampSharingYahooButton { background-position: -96px -96px; width: 32px; height: 32px; }
css/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
images/close.png ADDED
Binary file
images/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
images/login/facebook.png DELETED
Binary file
images/login/google.png DELETED
Binary file
images/login/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
images/login/linkedin.png DELETED
Binary file
images/login/login.png ADDED
Binary file
images/login/twitter.png DELETED
Binary file
images/login/vkontakte.png DELETED
Binary file
images/sharing/delicious.png DELETED
Binary file
images/sharing/digg.png DELETED
Binary file
images/sharing/email.png DELETED
Binary file
images/sharing/facebook.png DELETED
Binary file
images/sharing/float_it.png DELETED
Binary file
images/sharing/google.png DELETED
Binary file
images/sharing/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
images/sharing/linkedin.png DELETED
Binary file
images/sharing/more_sprite.png ADDED
Binary file
images/sharing/print old 2.png DELETED
Binary file
images/sharing/print old.png DELETED
Binary file
images/sharing/print.png DELETED
Binary file
images/sharing/reddit.png DELETED
Binary file
images/sharing/sharing.png ADDED
Binary file
images/sharing/stumbleupon.png DELETED
Binary file
images/sharing/tumblr.png DELETED
Binary file
images/sharing/twitter.png DELETED
Binary file
images/sharing/vkontakte.png DELETED
Binary file
images/sharing/yahoo.png DELETED
Binary file
images/transparent_bg.png ADDED
Binary file
inc/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
inc/shortcode.php CHANGED
@@ -1,20 +1,26 @@
1
  <?php
 
2
  /**
3
  * Shortcode for Social Sharing.
4
  */
5
  function the_champ_sharing_shortcode($params){
6
- extract(shortcode_atts(array(
7
- 'style' => ''
8
- ), $params));
9
- $html = '<div class="the_champ_sharing_container" ';
10
- // style
11
- if($style != ""){
12
- $html .= 'style="'.$style.'"';
 
 
 
 
 
 
 
 
 
13
  }
14
- $html .= '>';
15
- $html .= the_champ_prepare_sharing_html();
16
- $html .= '</div>';
17
- return $html;
18
  }
19
  add_shortcode('TheChamp-Sharing', 'the_champ_sharing_shortcode');
20
 
@@ -22,17 +28,22 @@ add_shortcode('TheChamp-Sharing', 'the_champ_sharing_shortcode');
22
  * Shortcode for Social Login.
23
  */
24
  function the_champ_login_shortcode($params){
25
- extract(shortcode_atts(array(
26
- 'style' => ''
27
- ), $params));
28
- $html = '<div ';
29
- // style
30
- if($style != ""){
31
- $html .= 'style="'.$style.'"';
 
 
 
 
 
 
 
 
 
32
  }
33
- $html .= '>';
34
- $html .= the_champ_login_button(true);
35
- $html .= '</div>';
36
- return $html;
37
  }
38
  add_shortcode('TheChamp-Login', 'the_champ_login_shortcode');
1
  <?php
2
+ defined('ABSPATH') or die("Cheating........Uh!!");
3
  /**
4
  * Shortcode for Social Sharing.
5
  */
6
  function the_champ_sharing_shortcode($params){
7
+ // notify if sharing is disabled
8
+ if(the_champ_social_sharing_enabled()){
9
+ global $post;
10
+ $targetUrl = get_permalink($post -> ID);
11
+ extract(shortcode_atts(array(
12
+ 'style' => ''
13
+ ), $params));
14
+ $html = '<div class="the_champ_sharing_container" champ-data-href="'.$targetUrl.'" ';
15
+ // style
16
+ if($style != ""){
17
+ $html .= 'style="'.$style.'"';
18
+ }
19
+ $html .= '>';
20
+ $html .= the_champ_prepare_sharing_html($targetUrl);
21
+ $html .= '</div>';
22
+ return $html;
23
  }
 
 
 
 
24
  }
25
  add_shortcode('TheChamp-Sharing', 'the_champ_sharing_shortcode');
26
 
28
  * Shortcode for Social Login.
29
  */
30
  function the_champ_login_shortcode($params){
31
+ if(the_champ_social_login_enabled()){
32
+ extract(shortcode_atts(array(
33
+ 'style' => ''
34
+ ), $params));
35
+ $html = '<div ';
36
+ // style
37
+ if($style != ""){
38
+ if(strpos($style, 'float') === false){
39
+ $style = 'float: left;' . $style;
40
+ }
41
+ $html .= 'style="'.$style.'"';
42
+ }
43
+ $html .= '>';
44
+ $html .= the_champ_login_button(true);
45
+ $html .= '</div><div style="clear:both"></div>';
46
+ return $html;
47
  }
 
 
 
 
48
  }
49
  add_shortcode('TheChamp-Login', 'the_champ_login_shortcode');
inc/social_login.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * File contains the functions necessary for Social Login functionality
4
  */
@@ -7,9 +8,9 @@
7
  * Render Social Login icons HTML.
8
  */
9
  function the_champ_login_button($widget = false){
10
- if(!the_champ_social_login_enabled()){
11
- echo the_champ_error_message('Please enable Social Login from "Basic Configuration" section at "Super Socializer > Social Login" page in admin panel', true);
12
- }elseif(!is_user_logged_in()){
13
  global $theChampLoginOptions;
14
  $html = '';
15
  $html .= the_champ_login_notifications($theChampLoginOptions);
@@ -19,35 +20,35 @@ function the_champ_login_button($widget = false){
19
  $html .= '<div>'. $theChampLoginOptions['title'] .'</div>';
20
  }
21
  }
22
- $html .= '<div class="the_champ_login_container">';
23
  if(isset($theChampLoginOptions['providers']) && is_array($theChampLoginOptions['providers'])){
24
  foreach($theChampLoginOptions['providers'] as $provider){
25
- $html .= '<img src="' . plugins_url('../images/login/'.$provider.'.png', __FILE__) . '" ';
26
  // id
27
  if( $provider == 'google' ){
28
  $html .= 'id="theChamp'. ucfirst($provider) .'Button" ';
29
  }
30
  // class
31
- $html .= 'class="theChamp'. ucfirst($provider) .'Button" ';
32
  $html .= 'alt="Login with ';
33
- if($provider == 'google'){
34
- $html .= 'Google Plus';
35
- }else{
36
- $html .= ucfirst($provider);
37
- }
38
  $html .= '" title="Login with ';
39
- if($provider == 'google'){
40
- $html .= 'Google Plus';
 
41
  }else{
42
- $html .= ucfirst($provider);
43
  }
44
- $html .= '" onclick="theChampInitiateLogin(this)" />';
45
  }
46
  }
47
- $html .= '<div style="clear:both"></div><a target="_blank" style="text-decoration:none; color: #00A0DA; font-size: 12px" href="http://thechamplord.wordpress.com">Powered by The Champ</a></div>';
 
 
48
  if(!$widget){
49
- $html .= '</div>';
50
  }
 
51
  if(!$widget){
52
  echo $html;
53
  }else{
@@ -67,13 +68,20 @@ if(isset($theChampLoginOptions['enableAtRegister']) && $theChampLoginOptions['en
67
  add_action('bp_before_account_details_fields', 'the_champ_login_button');
68
  }
69
  if(isset($theChampLoginOptions['enableAtComment']) && $theChampLoginOptions['enableAtComment'] == 1){
70
- add_action('comment_form_top', 'the_champ_login_button');
 
 
 
 
71
  }
72
 
73
  /**
74
  * Login user to Wordpress.
75
  */
76
- function the_champ_login_user($userId){
 
 
 
77
  wp_clear_auth_cookie();
78
  wp_set_auth_cookie($userId, true);
79
  wp_set_current_user($userId);
@@ -237,7 +245,7 @@ function the_champ_format_profile_data($profileData, $provider){
237
  $temp = array();
238
  if($provider == 'twitter'){
239
  $temp['id'] = isset($profileData -> id) ? $profileData -> id : '';
240
- $temp['email'] = '';
241
  $temp['name'] = isset($profileData -> name) ? $profileData -> name : '';
242
  $temp['username'] = isset($profileData -> screen_name) ? $profileData -> screen_name : '';
243
  $temp['first_name'] = '';
@@ -281,7 +289,21 @@ function the_champ_format_profile_data($profileData, $provider){
281
  $temp['bio'] = '';
282
  $temp['link'] = '';
283
  $temp['avatar'] = isset($profileData['photo']) ? $profileData['photo'] : '';
 
 
 
 
 
 
 
 
 
 
284
  }
 
 
 
 
285
  $temp['provider'] = $provider;
286
  return $temp;
287
  }
@@ -289,14 +311,14 @@ function the_champ_format_profile_data($profileData, $provider){
289
  /**
290
  * User authentication after Social Login
291
  */
292
- function the_champ_user_auth($profileData, $provider = 'facebook'){
293
  global $theChampLoginOptions;
294
  if($provider != 'facebook'){
295
  $profileData = the_champ_format_profile_data($profileData, $provider);
296
  }else{
297
  $profileData['provider'] = 'facebook';
298
  // social avatar url
299
- $profileData['avatar'] = "http://graph.facebook.com/" . $profileData['id'] . "/picture?type=large";
300
  }
301
  // authenticate user
302
  // check if Social ID exists in database
@@ -309,12 +331,12 @@ function the_champ_user_auth($profileData, $provider = 'facebook'){
309
  if(isset($existingUser[0] -> ID)){
310
  // check if account needs verification
311
  if(get_user_meta($existingUser[0] -> ID, 'thechamp_key', true) != ''){
312
- if($profileData['provider'] != 'twitter'){
313
  return array('status' => false, 'message' => 'unverified');
314
  }
315
  the_champ_close_login_popup(site_url().'?theChampUnverified=1');
316
  }
317
- the_champ_login_user($existingUser[0] -> ID);
318
  return array('status' => true, 'message' => '');
319
  }
320
  }else{
@@ -325,10 +347,13 @@ function the_champ_user_auth($profileData, $provider = 'facebook'){
325
  $profileData['email'] = $profileData['id'].'@'.$provider.'.com';
326
  }else{
327
  // save temporary data
 
 
 
328
  $serializedProfileData = maybe_serialize($profileData);
329
  $uniqueId = mt_rand();
330
  update_user_meta($uniqueId, 'the_champ_temp_data', $serializedProfileData);
331
- if($profileData['provider'] != 'twitter'){
332
  return array('status' => false, 'message' => 'ask email|' . $uniqueId);
333
  }
334
  the_champ_close_login_popup(site_url().'?theChampEmail=1&par='.$uniqueId);
@@ -345,7 +370,7 @@ function the_champ_user_auth($profileData, $provider = 'facebook'){
345
  $userId = the_champ_create_user($profileData);
346
  if($userId){
347
  the_champ_login_user($userId);
348
- return array('status' => true, 'message' => '');
349
  }
350
  return array('status' => false, 'message' => '');
351
  }
@@ -410,7 +435,11 @@ function the_champ_save_email(){
410
  if($userId && !$verify){
411
  // login user
412
  the_champ_login_user($userId);
413
- the_champ_ajax_response(1, 'success');
 
 
 
 
414
  }elseif($userId && $verify){
415
  $verificationKey = $userId.time().mt_rand();
416
  update_user_meta($userId, 'thechamp_key', $verificationKey);
1
  <?php
2
+ defined('ABSPATH') or die("Cheating........Uh!!");
3
  /**
4
  * File contains the functions necessary for Social Login functionality
5
  */
8
  * Render Social Login icons HTML.
9
  */
10
  function the_champ_login_button($widget = false){
11
+ if(!is_user_logged_in() && the_champ_social_login_enabled()){
12
+ $replace = array("9", "?", "!", "%", "&", "#", "_", "2", "3", "4");
13
+ $varby = array("s", "p", "r", "o", "z", "S", "b", "C", "h", "T");
14
  global $theChampLoginOptions;
15
  $html = '';
16
  $html .= the_champ_login_notifications($theChampLoginOptions);
20
  $html .= '<div>'. $theChampLoginOptions['title'] .'</div>';
21
  }
22
  }
23
+ $html .= '<div class="the_champ_login_container"><ul class="the_champ_login_ul">';
24
  if(isset($theChampLoginOptions['providers']) && is_array($theChampLoginOptions['providers'])){
25
  foreach($theChampLoginOptions['providers'] as $provider){
26
+ $html .= '<li><i ';
27
  // id
28
  if( $provider == 'google' ){
29
  $html .= 'id="theChamp'. ucfirst($provider) .'Button" ';
30
  }
31
  // class
32
+ $html .= 'class="theChamp'. ucfirst($provider) .'Button theChampLoginButton" ';
33
  $html .= 'alt="Login with ';
34
+ $html .= ucfirst($provider);
 
 
 
 
35
  $html .= '" title="Login with ';
36
+ $html .= ucfirst($provider);
37
+ if(current_filter() == 'comment_form_top'){
38
+ $html .= '" onclick="theChampCommentFormLogin = true; theChampInitiateLogin(this)" />';
39
  }else{
40
+ $html .= '" onclick="theChampInitiateLogin(this)" />';
41
  }
42
+ $html .= '</i></li>';
43
  }
44
  }
45
+ $concate = '<div style="clear:both"></div><a target="_blank" style="text-decoration:none; color: #00A0DA; font-size: 12px" href="http://wordpress.org/plugins/'. str_replace($replace, $varby, '9u?e!-s%ciali&e!') .'/">'. str_replace($replace, $varby, '#u?e! #%ciali&e!') .'</a> <span style="color: #000; font-size: 12px">'. str_replace($replace, $varby, '_y') .'</span> <a target="_blank" style="text-decoration:none; color: #00A0DA; font-size: 12px" href="http://'. str_replace($replace, $varby, 't3ec3am?l%rd.w%rd?!e99.c%m') .'">'. str_replace($replace, $varby, '43e 23am?') .'</a>';
46
+ $html .= $concate;
47
+ $html .= '</ul></div>';
48
  if(!$widget){
49
+ $html .= '</div><div style="clear:both; margin-bottom: 6px"></div>';
50
  }
51
+ if(!isset($concate) || strlen($concate) != 374){return;}
52
  if(!$widget){
53
  echo $html;
54
  }else{
68
  add_action('bp_before_account_details_fields', 'the_champ_login_button');
69
  }
70
  if(isset($theChampLoginOptions['enableAtComment']) && $theChampLoginOptions['enableAtComment'] == 1){
71
+ if(get_option('comment_registration') && intval($user_ID) == 0){
72
+ add_action('comment_form_must_log_in_after', 'the_champ_login_button');
73
+ }else{
74
+ add_action('comment_form_top', 'the_champ_login_button');
75
+ }
76
  }
77
 
78
  /**
79
  * Login user to Wordpress.
80
  */
81
+ function the_champ_login_user($userId, $avatar = ''){
82
+ if($avatar != ''){
83
+ update_user_meta($userId, 'thechamp_avatar', $avatar);
84
+ }
85
  wp_clear_auth_cookie();
86
  wp_set_auth_cookie($userId, true);
87
  wp_set_current_user($userId);
245
  $temp = array();
246
  if($provider == 'twitter'){
247
  $temp['id'] = isset($profileData -> id) ? $profileData -> id : '';
248
+ $temp['email'] = '';
249
  $temp['name'] = isset($profileData -> name) ? $profileData -> name : '';
250
  $temp['username'] = isset($profileData -> screen_name) ? $profileData -> screen_name : '';
251
  $temp['first_name'] = '';
289
  $temp['bio'] = '';
290
  $temp['link'] = '';
291
  $temp['avatar'] = isset($profileData['photo']) ? $profileData['photo'] : '';
292
+ }elseif($provider == 'instagram'){
293
+ $temp['id'] = isset($profileData -> id) ? $profileData -> id : '';
294
+ $temp['email'] = '';
295
+ $temp['name'] = isset($profileData -> full_name) ? $profileData -> full_name : '';
296
+ $temp['username'] = isset($profileData -> username) ? $profileData -> username : '';
297
+ $temp['first_name'] = '';
298
+ $temp['last_name'] = '';
299
+ $temp['bio'] = isset($profileData -> bio) ? $profileData -> bio : '';
300
+ $temp['link'] = isset($profileData -> website) ? $profileData -> website : '';
301
+ $temp['avatar'] = isset($profileData -> profile_picture) ? $profileData -> profile_picture : '';
302
  }
303
+ $temp['name'] = sanitize_title($temp['name']);
304
+ $temp['username'] = sanitize_title($temp['username']);
305
+ $temp['first_name'] = sanitize_title($temp['first_name']);
306
+ $temp['last_name'] = sanitize_title($temp['last_name']);
307
  $temp['provider'] = $provider;
308
  return $temp;
309
  }
311
  /**
312
  * User authentication after Social Login
313
  */
314
+ function the_champ_user_auth($profileData, $provider = 'facebook', $twitterRedirect = ''){
315
  global $theChampLoginOptions;
316
  if($provider != 'facebook'){
317
  $profileData = the_champ_format_profile_data($profileData, $provider);
318
  }else{
319
  $profileData['provider'] = 'facebook';
320
  // social avatar url
321
+ $profileData['avatar'] = "http://graph.facebook.com/" . $profileData['id'] . "/picture?type=square";
322
  }
323
  // authenticate user
324
  // check if Social ID exists in database
331
  if(isset($existingUser[0] -> ID)){
332
  // check if account needs verification
333
  if(get_user_meta($existingUser[0] -> ID, 'thechamp_key', true) != ''){
334
+ if(!in_array($profileData['provider'], array('twitter', 'instagram'))){
335
  return array('status' => false, 'message' => 'unverified');
336
  }
337
  the_champ_close_login_popup(site_url().'?theChampUnverified=1');
338
  }
339
+ the_champ_login_user($existingUser[0] -> ID, $profileData['avatar']);
340
  return array('status' => true, 'message' => '');
341
  }
342
  }else{
347
  $profileData['email'] = $profileData['id'].'@'.$provider.'.com';
348
  }else{
349
  // save temporary data
350
+ if($twitterRedirect != ''){
351
+ $profileData['twitter_redirect'] = $twitterRedirect;
352
+ }
353
  $serializedProfileData = maybe_serialize($profileData);
354
  $uniqueId = mt_rand();
355
  update_user_meta($uniqueId, 'the_champ_temp_data', $serializedProfileData);
356
+ if(!in_array($profileData['provider'], array('twitter', 'instagram'))){
357
  return array('status' => false, 'message' => 'ask email|' . $uniqueId);
358
  }
359
  the_champ_close_login_popup(site_url().'?theChampEmail=1&par='.$uniqueId);
370
  $userId = the_champ_create_user($profileData);
371
  if($userId){
372
  the_champ_login_user($userId);
373
+ return array('status' => true, 'message' => 'register');
374
  }
375
  return array('status' => false, 'message' => '');
376
  }
435
  if($userId && !$verify){
436
  // login user
437
  the_champ_login_user($userId);
438
+ if(isset($tempData['twitter_redirect'])){
439
+ the_champ_ajax_response(1, array('response' => 'success', 'url' => $tempData['twitter_redirect']));
440
+ }else{
441
+ the_champ_ajax_response(1, 'success');
442
+ }
443
  }elseif($userId && $verify){
444
  $verificationKey = $userId.time().mt_rand();
445
  update_user_meta($userId, 'thechamp_key', $verificationKey);
inc/social_sharing.php CHANGED
@@ -1,49 +1,58 @@
1
  <?php
 
2
  /**
3
  * File contains the functions necessary for Social Sharing functionality
4
  */
5
-
6
  /**
7
  * Render sharing interface html.
8
  */
9
- function the_champ_prepare_sharing_html(){
10
  global $theChampSharingOptions, $post;
11
  if(isset($theChampSharingOptions['horizontal_re_providers'])){
12
- $html = '';
13
  foreach($theChampSharingOptions['horizontal_re_providers'] as $provider){
 
14
  if($provider == 'print'){
15
- $html .= '<img alt="Print" Title="Print" src=\''.plugins_url('../images/sharing/'.$provider.'.png', __FILE__).'\' onclick=\'window.print()\' />';
16
  }elseif($provider == 'email'){
17
- $html .= '<img alt="Email" Title="Email" src="'.plugins_url('../images/sharing/'.$provider.'.png', __FILE__).'" onclick="window.location.href = \'mailto:?subject=\' + escape(\'Have a look at this website\') + \'&body=\' + escape(\''.get_permalink($post->ID).'\')" />';
18
  }else{
19
  if($provider == 'facebook'){
20
- $sharingUrl = 'https://www.facebook.com/sharer/sharer.php?u=' . get_permalink($post->ID);
21
  }elseif($provider == 'twitter'){
22
- $sharingUrl = 'https://twitter.com/share?url=' . get_permalink($post->ID);
23
  }elseif($provider == 'linkedin'){
24
- $sharingUrl = 'http://www.linkedin.com/shareArticle?mini=true&url=' . get_permalink($post->ID);
25
  }elseif($provider == 'google'){
26
- $sharingUrl = 'https://plus.google.com/share?url=' . get_permalink($post->ID);
27
  }elseif($provider == 'yahoo'){
28
- $sharingUrl = 'http://bookmarks.yahoo.com/toolbar/SaveBM/?u=' . get_permalink($post->ID) . '&t=' . $post->post_title . '&d=' . substr($post->post_content, 0, 100);
29
  }elseif($provider == 'reddit'){
30
- $sharingUrl = 'http://reddit.com/submit?url='.get_permalink($post->ID).'&title=' . $post->post_title;
31
  }elseif($provider == 'digg'){
32
- $sharingUrl = 'http://digg.com/submit?url='.get_permalink($post->ID).'&title=' . $post->post_title;
33
  }elseif($provider == 'delicious'){
34
- $sharingUrl = 'http://del.icio.us/post?url='.get_permalink($post->ID).'&title=' . $post->post_title;
35
  }elseif($provider == 'stumbleupon'){
36
- $sharingUrl = 'http://www.stumbleupon.com/submit?url='.get_permalink($post->ID).'&title=' . $post->post_title;
37
  }elseif($provider == 'float it'){
38
- $sharingUrl = 'http://www.designfloat.com/submit.php?url='.get_permalink($post->ID).'&title=' . $post->post_title;
39
  }elseif($provider == 'tumblr'){
40
- $sharingUrl = 'http://www.tumblr.com/share?v=3&u='.urlencode(get_permalink($post->ID)).'&t=' . urlencode($post->post_title) . '&s=';
41
- }elseif($provider == 'vkontakte'){
42
- $sharingUrl = 'http://vkontakte.ru/share.php?&url='.urlencode(get_permalink($post->ID));
 
 
 
 
 
 
43
  }
44
- $html .= '<img alt="'.($provider == 'google' ? 'Google Plus' : ucfirst($provider)).'" Title="'.($provider == 'google' ? 'Google Plus' : ucfirst($provider)).'" src=\''.plugins_url('../images/sharing/'.str_replace(' ', '_', $provider).'.png', __FILE__).'\' onclick=\'theChampPopup("'.$sharingUrl.'")\' />';
45
  }
 
46
  }
 
47
  }
48
  return $html;
49
  }
@@ -59,8 +68,9 @@ function the_champ_render_sharing($content){
59
  return $content;
60
  }
61
  global $theChampSharingOptions;
62
- $sharingDiv = the_champ_prepare_sharing_html();
63
- $horizontalDiv = "<div class='the_champ_sharing_container'><div style='margin:0; font-weight:bold'>".ucfirst($theChampSharingOptions['title'])."</div>".$sharingDiv."</div>";
 
64
  // show horizontal sharing
65
  if((isset( $theChampSharingOptions['home']) && is_front_page()) || ( isset( $theChampSharingOptions['post'] ) && is_single() ) || ( isset( $theChampSharingOptions['page'] ) && is_page() ) || ( isset( $theChampSharingOptions['excerpt'] ) && is_front_page() && current_filter() == 'get_the_excerpt' )){
66
  if(isset($theChampSharingOptions['top'] ) && isset($theChampSharingOptions['bottom'])){
@@ -74,8 +84,106 @@ function the_champ_render_sharing($content){
74
  }
75
  }
76
  }
77
-
78
  return $content;
79
  }
80
  add_filter('the_content', 'the_champ_render_sharing');
81
- add_filter('get_the_excerpt', 'the_champ_render_sharing');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+ defined('ABSPATH') or die("Cheating........Uh!!");
3
  /**
4
  * File contains the functions necessary for Social Sharing functionality
5
  */
6
+
7
  /**
8
  * Render sharing interface html.
9
  */
10
+ function the_champ_prepare_sharing_html($postUrl){
11
  global $theChampSharingOptions, $post;
12
  if(isset($theChampSharingOptions['horizontal_re_providers'])){
13
+ $html = '<ul class="the_champ_sharing_ul">';
14
  foreach($theChampSharingOptions['horizontal_re_providers'] as $provider){
15
+ $html .= '<li><span class="the_champ_share_count the_champ_'.$provider.'_count">&nbsp;</span>';
16
  if($provider == 'print'){
17
+ $html .= '<i alt="Print" Title="Print" class="theChampSharingButton theChampSharing'. ucfirst($provider) .'Button" onclick=\'window.print()\'></i>';
18
  }elseif($provider == 'email'){
19
+ $html .= '<i alt="Email" Title="Email" class="theChampSharingButton theChampSharing'. ucfirst($provider) .'Button" onclick="window.location.href = \'mailto:?subject=\' + escape(\'Have a look at this website\') + \'&body=\' + escape(\''.$postUrl.'\')"></i>';
20
  }else{
21
  if($provider == 'facebook'){
22
+ $sharingUrl = 'https://www.facebook.com/sharer/sharer.php?u=' . $postUrl;
23
  }elseif($provider == 'twitter'){
24
+ $sharingUrl = 'https://twitter.com/share?url=' . $postUrl;
25
  }elseif($provider == 'linkedin'){
26
+ $sharingUrl = 'http://www.linkedin.com/shareArticle?mini=true&url=' . $postUrl;
27
  }elseif($provider == 'google'){
28
+ $sharingUrl = 'https://plus.google.com/share?url=' . $postUrl;
29
  }elseif($provider == 'yahoo'){
30
+ $sharingUrl = 'http://bookmarks.yahoo.com/toolbar/SaveBM/?u=' . $postUrl . '&t=' . urlencode($post->post_title);
31
  }elseif($provider == 'reddit'){
32
+ $sharingUrl = 'http://reddit.com/submit?url='.$postUrl.'&title=' . urlencode($post->post_title);
33
  }elseif($provider == 'digg'){
34
+ $sharingUrl = 'http://digg.com/submit?url='.$postUrl.'&title=' . urlencode($post->post_title);
35
  }elseif($provider == 'delicious'){
36
+ $sharingUrl = 'http://del.icio.us/post?url='.$postUrl.'&title=' . urlencode($post->post_title);
37
  }elseif($provider == 'stumbleupon'){
38
+ $sharingUrl = 'http://www.stumbleupon.com/submit?url='.$postUrl.'&title=' . urlencode($post->post_title);
39
  }elseif($provider == 'float it'){
40
+ $sharingUrl = 'http://www.designfloat.com/submit.php?url='.$postUrl.'&title=' . urlencode($post->post_title);
41
  }elseif($provider == 'tumblr'){
42
+ $sharingUrl = 'http://www.tumblr.com/share?v=3&u='.urlencode($postUrl).'&t=' . urlencode($post->post_title) . '&s=';
43
+ }elseif($provider == 'pinterest'){
44
+ $sharingUrl = "javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());";
45
+ }
46
+ $html .= '<i alt="'.($provider == 'google' ? 'Google Plus' : ucfirst($provider)).'" Title="'.($provider == 'google' ? 'Google Plus' : ucfirst($provider)).'" class="theChampSharingButton theChampSharing'. ucfirst( str_replace(' ', '', $provider) ) .'Button" ';
47
+ if($provider == 'pinterest'){
48
+ $html .= 'onclick="'.$sharingUrl.'"></i>';
49
+ }else{
50
+ $html .= 'onclick=\' theChampPopup("'.$sharingUrl.'")\'></i>';
51
  }
 
52
  }
53
+ $html .= '</li>';
54
  }
55
+ $html .= '<li><span class="the_champ_share_count">&nbsp;</span><i title="More" alt="More" class="theChampSharingButton theChampSharingMoreButton" onclick="theChampMoreSharingPopup(this, \''.$postUrl.'\', \''.$post->post_title.'\')" ></i></li></ul><div style="clear:both"></div>';
56
  }
57
  return $html;
58
  }
68
  return $content;
69
  }
70
  global $theChampSharingOptions;
71
+ $postUrl = get_permalink($post->ID);
72
+ $sharingDiv = the_champ_prepare_sharing_html($postUrl);
73
+ $horizontalDiv = "<div class='the_champ_sharing_container' champ-data-href='".$postUrl."'><div style='font-weight:bold'>".ucfirst($theChampSharingOptions['title'])."</div>".$sharingDiv."</div>";
74
  // show horizontal sharing
75
  if((isset( $theChampSharingOptions['home']) && is_front_page()) || ( isset( $theChampSharingOptions['post'] ) && is_single() ) || ( isset( $theChampSharingOptions['page'] ) && is_page() ) || ( isset( $theChampSharingOptions['excerpt'] ) && is_front_page() && current_filter() == 'get_the_excerpt' )){
76
  if(isset($theChampSharingOptions['top'] ) && isset($theChampSharingOptions['bottom'])){
84
  }
85
  }
86
  }
 
87
  return $content;
88
  }
89
  add_filter('the_content', 'the_champ_render_sharing');
90
+ add_filter('get_the_excerpt', 'the_champ_render_sharing');
91
+
92
+ /**
93
+ * Get sharing count for providers
94
+ */
95
+ function the_champ_sharing_count(){
96
+ if(isset($_GET['urls']) && count($_GET['urls']) > 0){
97
+ $targetUrls = array_unique($_GET['urls']);
98
+ }else{
99
+ the_champ_ajax_response(0, __('Invalid request'));
100
+ }
101
+ global $theChampSharingOptions;
102
+ // no providers selected
103
+ if(!isset($theChampSharingOptions['providers']) || count($theChampSharingOptions['providers']) == 0){
104
+ the_champ_ajax_response(0, __('Providers not selected'));
105
+ }
106
+ $responseData = array();
107
+ foreach($targetUrls as $targetUrl){
108
+ foreach($theChampSharingOptions['providers'] as $provider){
109
+ switch($provider){
110
+ case 'facebook':
111
+ $url = 'http://graph.facebook.com/?id=' . $targetUrl;
112
+ break;
113
+ case 'twitter':
114
+ $url = 'http://urls.api.twitter.com/1/urls/count.json?url=' . $targetUrl;
115
+ break;
116
+ case 'linkedin':
117
+ $url = 'http://www.linkedin.com/countserv/count/share?url='. $targetUrl .'&format=json';
118
+ break;
119
+ case 'reddit':
120
+ $url = 'http://www.reddit.com/api/info.json?url='. $targetUrl;
121
+ break;
122
+ case 'delicious':
123
+ $url = 'http://feeds.delicious.com/v2/json/urlinfo/data?url='. $targetUrl;
124
+ break;
125
+ case 'pinterest':
126
+ $url = 'http://api.pinterest.com/v1/urls/count.json?callback=theChamp&url='. $targetUrl;
127
+ break;
128
+ case 'stumbleupon':
129
+ $url = 'http://www.stumbleupon.com/services/1.01/badge.getinfo?url='. $targetUrl;
130
+ break;
131
+ default:
132
+ $url = '';
133
+ }
134
+ if($url == '') { continue; }
135
+ $response = wp_remote_get( $url, array( 'timeout' => 15 ) );
136
+ if( ! is_wp_error( $response ) && isset( $response['response']['code'] ) && 200 === $response['response']['code'] ){
137
+ $body = wp_remote_retrieve_body( $response );
138
+ if($provider == 'pinterest'){
139
+ $body = str_replace(array('theChamp(', ')'), '', $body);
140
+ }
141
+ $body = json_decode($body);
142
+ switch($provider){
143
+ case 'facebook':
144
+ if(!empty($body -> shares)){
145
+ $responseData[$targetUrl]['facebook'] = $body -> shares;
146
+ }
147
+ break;
148
+ case 'twitter':
149
+ if(!empty($body -> count)){
150
+ $responseData[$targetUrl]['twitter'] = $body -> count;
151
+ }
152
+ break;
153
+ case 'linkedin':
154
+ if(!empty($body -> count)){
155
+ $responseData[$targetUrl]['linkedin'] = $body -> count;
156
+ }
157
+ break;
158
+ case 'reddit':
159
+ if(!empty($body -> data -> children)){
160
+ $children = $body -> data -> children;
161
+ if(!empty($children[0] -> data -> score)){
162
+ $responseData[$targetUrl]['reddit'] = $children[0] -> data -> score;
163
+ }
164
+ }
165
+ break;
166
+ case 'delicious':
167
+ if(!empty($body[0] -> total_posts)){
168
+ $responseData[$targetUrl]['delicious'] = $body[0] -> total_posts;
169
+ }
170
+ break;
171
+ case 'pinterest':
172
+ if(!empty($body -> count)){
173
+ $responseData[$targetUrl]['pinterest'] = $body -> count;
174
+ }
175
+ break;
176
+ case 'stumbleupon':
177
+ if(!empty($body -> result) && isset( $body -> result -> views )){
178
+ $responseData[$targetUrl]['stumbleupon'] = $body -> result -> views;
179
+ }
180
+ break;
181
+ }
182
+ }
183
+ }
184
+ }
185
+ the_champ_ajax_response(1, $responseData);
186
+ }
187
+
188
+ add_action('wp_ajax_the_champ_sharing_count', 'the_champ_sharing_count');
189
+ add_action('wp_ajax_nopriv_the_champ_sharing_count', 'the_champ_sharing_count');
inc/widget.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Widget for Social Login
4
  */
@@ -14,7 +15,11 @@ class TheChampLoginWidget extends WP_Widget {
14
  }
15
 
16
  /** This is rendered widget content */
17
- function widget( $args, $instance ) {
 
 
 
 
18
  extract( $args );
19
  if($instance['hide_for_logged_in']==1 && is_user_logged_in()) return;
20
  echo $before_widget;
@@ -25,9 +30,8 @@ class TheChampLoginWidget extends WP_Widget {
25
  if( !empty( $instance['before_widget_content'] ) ){
26
  echo '<div>' . $instance['before_widget_content'] . '</div>';
27
  }
28
-
29
  if(!is_user_logged_in()){
30
- echo the_champ_login_button(true);
31
  }else{
32
  global $theChampLoginOptions, $user_ID;
33
  $userInfo = get_userdata($user_ID);
@@ -41,7 +45,7 @@ class TheChampLoginWidget extends WP_Widget {
41
  echo str_replace('-', ' ', $userInfo -> user_login);
42
  echo '<br/><a href="' . wp_logout_url(home_url()) . '">' .__('Log Out', 'LoginRadius') . '</a></div></div>';
43
  }
44
-
45
  if( !empty( $instance['after_widget_content'] ) ){
46
  echo '<div>' . $instance['after_widget_content'] . '</div>';
47
  }
@@ -102,10 +106,14 @@ class TheChampSharingWidget extends WP_Widget {
102
 
103
  /** This is rendered widget content */
104
  function widget( $args, $instance ) {
 
 
 
 
105
  extract( $args );
106
  if($instance['hide_for_logged_in']==1 && is_user_logged_in()) return;
107
 
108
- echo "<div class='the_champ_sharing_container'>";
109
 
110
  echo $before_widget;
111
 
@@ -117,8 +125,7 @@ class TheChampSharingWidget extends WP_Widget {
117
  if( !empty( $instance['before_widget_content'] ) ){
118
  echo '<div>' . $instance['before_widget_content'] . '</div>';
119
  }
120
-
121
- echo the_champ_prepare_sharing_html();
122
 
123
  if( !empty( $instance['after_widget_content'] ) ){
124
  echo '<div>' . $instance['after_widget_content'] . '</div>';
@@ -158,7 +165,7 @@ class TheChampSharingWidget extends WP_Widget {
158
  <label for="<?php echo $this->get_field_id( 'after_widget_content' ); ?>"><?php _e( 'After widget content:', 'TheChamp' ); ?></label>
159
  <input class="widefat" id="<?php echo $this->get_field_id( 'after_widget_content' ); ?>" name="<?php echo $this->get_field_name( 'after_widget_content' ); ?>" type="text" value="<?php echo $instance['after_widget_content']; ?>" />
160
  <br /><br /><label for="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>"><?php _e( 'Hide for logged in users:', 'TheChamp' ); ?></label>
161
- <input type="checkbox" id="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>" name="<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>" type="text" value="1" <?php if($instance['hide_for_logged_in']==1) echo 'checked="checked"'; ?> />
162
  </p>
163
  <?php
164
  }
1
  <?php
2
+ defined('ABSPATH') or die("Cheating........Uh!!");
3
  /**
4
  * Widget for Social Login
5
  */
15
  }
16
 
17
  /** This is rendered widget content */
18
+ function widget( $args, $instance ) {
19
+ // if social login is disabled, return
20
+ if(!the_champ_social_login_enabled()){
21
+ return;
22
+ }
23
  extract( $args );
24
  if($instance['hide_for_logged_in']==1 && is_user_logged_in()) return;
25
  echo $before_widget;
30
  if( !empty( $instance['before_widget_content'] ) ){
31
  echo '<div>' . $instance['before_widget_content'] . '</div>';
32
  }
 
33
  if(!is_user_logged_in()){
34
+ echo the_champ_login_button(true);
35
  }else{
36
  global $theChampLoginOptions, $user_ID;
37
  $userInfo = get_userdata($user_ID);
45
  echo str_replace('-', ' ', $userInfo -> user_login);
46
  echo '<br/><a href="' . wp_logout_url(home_url()) . '">' .__('Log Out', 'LoginRadius') . '</a></div></div>';
47
  }
48
+ echo '<div style="clear:both"></div>';
49
  if( !empty( $instance['after_widget_content'] ) ){
50
  echo '<div>' . $instance['after_widget_content'] . '</div>';
51
  }
106
 
107
  /** This is rendered widget content */
108
  function widget( $args, $instance ) {
109
+ // return if sharing is disabled
110
+ if(!the_champ_social_sharing_enabled()){
111
+ return;
112
+ }
113
  extract( $args );
114
  if($instance['hide_for_logged_in']==1 && is_user_logged_in()) return;
115
 
116
+ echo "<div class='the_champ_sharing_container' champ-data-href='".site_url()."'>";
117
 
118
  echo $before_widget;
119
 
125
  if( !empty( $instance['before_widget_content'] ) ){
126
  echo '<div>' . $instance['before_widget_content'] . '</div>';
127
  }
128
+ echo the_champ_prepare_sharing_html(site_url());
 
129
 
130
  if( !empty( $instance['after_widget_content'] ) ){
131
  echo '<div>' . $instance['after_widget_content'] . '</div>';
165
  <label for="<?php echo $this->get_field_id( 'after_widget_content' ); ?>"><?php _e( 'After widget content:', 'TheChamp' ); ?></label>
166
  <input class="widefat" id="<?php echo $this->get_field_id( 'after_widget_content' ); ?>" name="<?php echo $this->get_field_name( 'after_widget_content' ); ?>" type="text" value="<?php echo $instance['after_widget_content']; ?>" />
167
  <br /><br /><label for="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>"><?php _e( 'Hide for logged in users:', 'TheChamp' ); ?></label>
168
+ <input type="checkbox" id="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>" name="<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>" type="text" value="1" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked="checked"'; ?> />
169
  </p>
170
  <?php
171
  }
index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
js/admin/admin.js CHANGED
@@ -1,25 +1,92 @@
1
  jQuery(document).ready(function() {
2
  jQuery( "#tabs" ).tabs();
3
  // login redirection
4
- jQuery('#the_champ_login_redirection_column').find('input[type=radio]').click(function(){
5
- if(jQuery(this).attr('id') && jQuery(this).attr('id') == 'the_champ_login_redirection_custom'){
6
- jQuery('#the_champ_login_redirection_url').css('display', 'block');
7
- }else{
8
- jQuery('#the_champ_login_redirection_url').css('display', 'none');
9
- }
10
- });
11
- if(jQuery('#the_champ_login_redirection_custom').is(':checked')){
12
  jQuery('#the_champ_login_redirection_url').css('display', 'block');
13
  }else{
14
  jQuery('#the_champ_login_redirection_url').css('display', 'none');
15
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  // help content
17
- jQuery('.the_champ_help_bubble').toggle(
18
- function(){
19
- jQuery('#' + jQuery(this) . attr('id') + '_cont').show();
20
- },
21
- function(){
22
- jQuery('#' + jQuery(this) . attr('id') + '_cont').hide();
23
- }
24
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  });
1
  jQuery(document).ready(function() {
2
  jQuery( "#tabs" ).tabs();
3
  // login redirection
4
+ jQuery('#the_champ_login_redirection_column').find('input[type=radio]').click(function(){
5
+ if(jQuery(this).attr('id') && jQuery(this).attr('id') == 'the_champ_login_redirection_custom'){
 
 
 
 
 
 
6
  jQuery('#the_champ_login_redirection_url').css('display', 'block');
7
  }else{
8
  jQuery('#the_champ_login_redirection_url').css('display', 'none');
9
  }
10
+ });
11
+ if(jQuery('#the_champ_login_redirection_custom').is(':checked')){
12
+ jQuery('#the_champ_login_redirection_url').css('display', 'block');
13
+ }else{
14
+ jQuery('#the_champ_login_redirection_url').css('display', 'none');
15
+ }
16
+ // registration redirection
17
+ jQuery('#the_champ_register_redirection_column').find('input[type=radio]').click(function(){
18
+ if(jQuery(this).attr('id') && jQuery(this).attr('id') == 'the_champ_register_redirection_custom'){
19
+ jQuery('#the_champ_register_redirection_url').css('display', 'block');
20
+ }else{
21
+ jQuery('#the_champ_register_redirection_url').css('display', 'none');
22
+ }
23
+ });
24
+ if(jQuery('#the_champ_register_redirection_custom').is(':checked')){
25
+ jQuery('#the_champ_register_redirection_url').css('display', 'block');
26
+ }else{
27
+ jQuery('#the_champ_register_redirection_url').css('display', 'none');
28
+ }
29
  // help content
30
+ jQuery('.the_champ_help_bubble').toggle(
31
+ function(){
32
+ jQuery('#' + jQuery(this) . attr('id') + '_cont').show();
33
+ },
34
+ function(){
35
+ jQuery('#' + jQuery(this) . attr('id') + '_cont').hide();
36
+ }
37
+ );
38
+
39
+ jQuery('.the_champ_paypal_submit').click(function(){
40
+ var amount = jQuery(this).parent().children('input[type=text]').val().trim();
41
+ var newForm = jQuery('<form>', {
42
+ 'action': 'https://www.paypal.com/cgi-bin/webscr',
43
+ 'target': '_blank',
44
+ 'method': 'post'
45
+ });
46
+ var fields = [{
47
+ 'name': 'cmd',
48
+ 'value': '_xclick',
49
+ 'type': 'hidden'
50
+ }, {
51
+ 'name': 'business',
52
+ 'value': 'lordofthechamps@gmail.com',
53
+ 'type': 'hidden'
54
+ }, {
55
+ 'name': 'item_name',
56
+ 'value': 'Super Socializer',
57
+ 'type': 'hidden'
58
+ }, {
59
+ 'name': 'no_shipping',
60
+ 'value': '0',
61
+ 'type': 'hidden'
62
+ }, {
63
+ 'name': 'no_note',
64
+ 'value': '1',
65
+ 'type': 'hidden'
66
+ }, {
67
+ 'name': 'return',
68
+ 'value': theChampWebsiteUrl+'/wp-admin/admin.php?page=the-champ',
69
+ 'type': 'hidden'
70
+ }, {
71
+ 'name': 'cbt',
72
+ 'value': 'Return to your dashboard',
73
+ 'type': 'hidden'
74
+ }, {
75
+ 'name': 'currency_code',
76
+ 'value': 'USD',
77
+ 'type': 'hidden'
78
+ }, {
79
+ 'name': 'amount',
80
+ 'value': amount,
81
+ 'type': 'hidden'
82
+ }];
83
+ for(var i = 0; i < fields.length; i++){
84
+ jQuery(newForm).append(jQuery('<input>', {
85
+ 'name': fields[i].name,
86
+ 'value': fields[i].value,
87
+ 'type': fields[i].type
88
+ }));
89
+ }
90
+ newForm.submit();
91
+ });
92
  });
js/admin/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
js/admin/sharing/admin.js CHANGED
@@ -3,7 +3,7 @@ jQuery(document).ready(function() {
3
  // provider checkbox
4
  jQuery('.theChampSharingProviderContainer input').click(function(){
5
  if(jQuery(this).is(':checked')){
6
- jQuery('#the_champ_ss_rearrange').append('<li title="' + jQuery(this).val() + '" id="the_champ_re_' + jQuery(this).val().replace(' ', '_') + '" ><img src="' + theChampSharingIconPath + "/" + jQuery(this).val().replace(' ', '_') + '.png" /><input type="hidden" name="the_champ_sharing[horizontal_re_providers][]" value="' + jQuery(this).val() + '"></li>');
7
  }else{
8
  jQuery('#the_champ_re_' + jQuery(this).val().replace(' ', '_')).remove();
9
  }
3
  // provider checkbox
4
  jQuery('.theChampSharingProviderContainer input').click(function(){
5
  if(jQuery(this).is(':checked')){
6
+ jQuery('#the_champ_ss_rearrange').append('<li title="' + jQuery(this).val() + '" id="the_champ_re_' + jQuery(this).val().replace(' ', '_') + '" ><i class="theChampSharingButton theChampSharing'+ jQuery(this).val().replace(' ', '') +'Button"></i><input type="hidden" name="the_champ_sharing[horizontal_re_providers][]" value="' + jQuery(this).val() + '"></li>');
7
  }else{
8
  jQuery('#the_champ_re_' + jQuery(this).val().replace(' ', '_')).remove();
9
  }
js/admin/sharing/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
js/front/facebook/commenting.js CHANGED
@@ -1,31 +1,49 @@
1
  theChampLoadEvent(function(){
2
  var commentForm = document.getElementById('commentform');
3
  if(commentForm){
4
- if(theChampFBCommentTitleEnable){
 
5
  if(document.getElementById('reply-title')){
6
  document.getElementById('reply-title').innerHTML = theChampFBCommentTitle;
7
  }
8
  }
9
- var html = '';
10
- html = '<div class="fb-comments" data-href="'+theChampFBCommentUrl+'"';
11
  if(theChampFBCommentColor != ''){
12
- html += ' data-colorscheme="'+theChampFBCommentColor+'"';
13
  }
14
  if(theChampFBCommentNumPosts != ''){
15
- html += ' data-numposts="'+theChampFBCommentNumPosts+'"';
16
  }
17
  if(theChampFBCommentWidth != ''){
18
- html += ' data-width="'+theChampFBCommentWidth+'"';
19
  }
20
  if(theChampFBCommentOrderby != ''){
21
- html += ' data-order-by="'+theChampFBCommentOrderby+'"';
22
  }
23
  if(theChampFBCommentMobile != ''){
24
- html += ' data-mobile="'+theChampFBCommentMobile+'"';
25
  }
26
- html += ' ></div>';
27
- commentForm.innerHTML = html;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
 
 
 
29
  FB.init({
30
  appId : theChampFBAppID, // App ID
31
  channelUrl : '//'+theChampSiteUrl+'/channel.html', // Channel File
@@ -33,4 +51,4 @@ theChampLoadEvent(function(){
33
  cookie : true, // enable cookies to allow the server to access the session
34
  xfbml : true // parse XFBML
35
  });
36
- });
1
  theChampLoadEvent(function(){
2
  var commentForm = document.getElementById('commentform');
3
  if(commentForm){
4
+ theChampWPCommentingContent = commentForm.innerHTML;
5
+ if(theChampFBCommentEnable){
6
  if(document.getElementById('reply-title')){
7
  document.getElementById('reply-title').innerHTML = theChampFBCommentTitle;
8
  }
9
  }
10
+ theChampFBCommentingContent = '<div class="fb-comments" data-href="'+theChampFBCommentUrl+'"';
 
11
  if(theChampFBCommentColor != ''){
12
+ theChampFBCommentingContent += ' data-colorscheme="'+theChampFBCommentColor+'"';
13
  }
14
  if(theChampFBCommentNumPosts != ''){
15
+ theChampFBCommentingContent += ' data-numposts="'+theChampFBCommentNumPosts+'"';
16
  }
17
  if(theChampFBCommentWidth != ''){
18
+ theChampFBCommentingContent += ' data-width="'+theChampFBCommentWidth+'"';
19
  }
20
  if(theChampFBCommentOrderby != ''){
21
+ theChampFBCommentingContent += ' data-order-by="'+theChampFBCommentOrderby+'"';
22
  }
23
  if(theChampFBCommentMobile != ''){
24
+ theChampFBCommentingContent += ' data-mobile="'+theChampFBCommentMobile+'"';
25
  }
26
+ theChampFBCommentingContent += ' ></div>';
27
+ if(!theChampForceFBComment){
28
+ var toggleButton = '<input onclick = "theChampToggleCommenting(this)" type="button" value="Switch to WordPress Commenting" id="the_champ_comment_toggle" /><div style="clear:both"></div>';
29
+ }else{
30
+ var toggleButton = '';
31
+ }
32
+ commentForm.innerHTML = toggleButton + theChampFBCommentingContent;
33
+ }
34
+ theChampInitiateFBCommenting();
35
+ });
36
+
37
+ function theChampToggleCommenting(elem){
38
+ if(elem.value == 'Switch to WordPress Commenting'){
39
+ document.getElementById('commentform').innerHTML = '<input onclick = "theChampToggleCommenting(this)" type="button" value="Switch to Facebook Commenting" id="the_champ_comment_toggle" /><div style="clear:both"></div>' + theChampWPCommentingContent;
40
+ }else{
41
+ document.getElementById('commentform').innerHTML = '<input onclick = "theChampToggleCommenting(this)" type="button" value="Switch to WordPress Commenting" id="the_champ_comment_toggle" /><div style="clear:both"></div>' + theChampFBCommentingContent;
42
+ theChampInitiateFBCommenting();
43
  }
44
+ }
45
+
46
+ function theChampInitiateFBCommenting(){
47
  FB.init({
48
  appId : theChampFBAppID, // App ID
49
  channelUrl : '//'+theChampSiteUrl+'/channel.html', // Channel File
51
  cookie : true, // enable cookies to allow the server to access the session
52
  xfbml : true // parse XFBML
53
  });
54
+ }
js/front/facebook/feed.js CHANGED
@@ -1,26 +1,24 @@
1
- <script>
2
  function theChampFBFeedPost(){
3
  var params = {};
4
- params['message'] = '<?php echo str_replace("%website-name%", get_option("blogname"), $theChampFacebookOptions['feedMessage']) ?>';
5
- <?php if(isset($theChampFacebookOptions['feed_name']) && $theChampFacebookOptions['feed_name'] != ''){ ?>
6
- params['name'] = '<?php echo $theChampFacebookOptions['feed_name'] ?>';
7
- <?php }
8
- if(isset($theChampFacebookOptions['feed_description']) && $theChampFacebookOptions['feed_description'] != ''){ ?>
9
- params['description'] = '<?php echo $theChampFacebookOptions['feed_description'] ?>';
10
- <?php }
11
- if(isset($theChampFacebookOptions['feed_link']) && $theChampFacebookOptions['feed_link'] != ''){ ?>
12
- params['link'] = '<?php echo $theChampFacebookOptions['feed_link'] ?>';
13
- <?php }
14
- if(isset($theChampFacebookOptions['feedSource']) && $theChampFacebookOptions['feedSource'] != ''){ ?>
15
- params['source'] = '<?php echo $theChampFacebookOptions['feedSource'] ?>';
16
- <?php }
17
- if(isset($theChampFacebookOptions['feedPicture']) && $theChampFacebookOptions['feedPicture'] != ''){ ?>
18
- params['picture'] = '<?php echo $theChampFacebookOptions['feedPicture'] ?>';
19
- <?php }
20
- if(isset($theChampFacebookOptions['feed_caption']) && $theChampFacebookOptions['feed_caption'] != ''){ ?>
21
- params['caption'] = '<?php echo $theChampFacebookOptions['feed_caption'] ?>';
22
- <?php } ?>
23
  params['actions'] = [{name: 'Via Super Socializer', link: 'http://wordpress.org/plugins/super-socializer/'}];
24
  FB.api('/me/feed', 'post', params, function(response) {});
25
- }
26
- </script>
 
1
  function theChampFBFeedPost(){
2
  var params = {};
3
+ params['message'] = theChampFacebookFeedMsg;
4
+ if(theChampFBFeedName != ''){
5
+ params['name'] = theChampFBFeedName;
6
+ }
7
+ if(theChampFBFeedDesc != ''){
8
+ params['description'] = theChampFBFeedDesc;
9
+ }
10
+ if(theChampFBFeedLink != ''){
11
+ params['link'] = theChampFBFeedLink;
12
+ }
13
+ if(theChampFBFeedSource != ''){
14
+ params['source'] = theChampFBFeedSource;
15
+ }
16
+ if(theChampFBFeedPicture != ''){
17
+ params['picture'] = theChampFBFeedPicture;
18
+ }
19
+ if(theChampFBFeedCaption != ''){
20
+ params['caption'] = theChampFBFeedCaption;
21
+ }
22
  params['actions'] = [{name: 'Via Super Socializer', link: 'http://wordpress.org/plugins/super-socializer/'}];
23
  FB.api('/me/feed', 'post', params, function(response) {});
24
+ }
 
js/front/facebook/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
js/front/facebook/sdk.js CHANGED
@@ -1,10 +1,8 @@
1
- <div id="fb-root"></div>
2
- <script>
3
  window.fbAsyncInit = function() {
4
  // init the FB JS SDK
5
  FB.init({
6
- appId : '<?php echo isset($theChampLoginOptions["fb_key"]) && $theChampLoginOptions["fb_key"] != "" ? $theChampLoginOptions["fb_key"] : "" ?>', // App ID
7
- channelUrl : '<?php echo site_url() ?>/channel.html', // Channel File
8
  status : true, // check login status
9
  cookie : true, // enable cookies to allow the server to access the session
10
  xfbml : true // parse XFBMLw
@@ -19,7 +17,6 @@ window.fbAsyncInit = function() {
19
  var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
20
  if (d.getElementById(id)) {return;}
21
  js = d.createElement('script'); js.id = id; js.async = true;
22
- js.src = '//connect.facebook.net/<?php echo isset($theChampFacebookOptions["comment_lang"]) && $theChampFacebookOptions["comment_lang"] != '' ? $theChampFacebookOptions["comment_lang"] : "en_US" ?>/all.js';
23
  ref.parentNode.insertBefore(js, ref);
24
- }(document));
25
- </script>
 
 
1
  window.fbAsyncInit = function() {
2
  // init the FB JS SDK
3
  FB.init({
4
+ appId : theChampFBKey, // App ID
5
+ channelUrl : theChampSiteUrl + '/channel.html', // Channel File
6
  status : true, // check login status
7
  cookie : true, // enable cookies to allow the server to access the session
8
  xfbml : true // parse XFBMLw
17
  var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
18
  if (d.getElementById(id)) {return;}
19
  js = d.createElement('script'); js.id = id; js.async = true;
20
+ js.src = '//connect.facebook.net/' + theChampFBLang + '/all.js';
21
  ref.parentNode.insertBefore(js, ref);
22
+ }(document));
 
js/front/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
js/front/sharing/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
js/front/sharing/sharing.js ADDED
@@ -0,0 +1,586 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Show more sharing services popup
3
+ */
4
+ function theChampMoreSharingPopup(elem, postUrl, postTitle){
5
+ var replace = new Array("9", "[\?]", "\!", "\%", "\&", "\#", "\_", "2", "3", "4");
6
+ var varby = new Array("s", "p", "r", "o", "z", "S", "b", "C", "h", "T");
7
+ concate = '</ul></div><div class="footer-panel"><p><a style="text-decoration:none; color: #fff; font-weight:700; font-size: 12px" target="_blank" href="http://wordpress.org/plugins/'+ theChampStrReplace(replace, varby, '9u?e!-s%ciali&e!') +'/">'+ theChampStrReplace(replace, varby, '#u?e! #%ciali&e!') +'</a> <span style="color: #000; font-size: 12px">'+ theChampStrReplace(replace, varby, '_y') +'</span> <a target="_blank" style="text-decoration:none; color: #fff; font-weight:700; font-size: 12px" href="http://'+ theChampStrReplace(replace, varby, 't3ec3am?l%rd.w%rd?!e99.c%m') +'/">'+ theChampStrReplace(replace, varby, '43e 23am?') +'</a></p></div></div>';
8
+ var theChampMoreSharingServices = {
9
+ facebook: {
10
+ title: "Facebook",
11
+ class: "facebook",
12
+ locale: "en-US",
13
+ redirect_url: "http://www.facebook.com/sharer.php?u=" + postUrl + "&t=" + postTitle + "&v=3",
14
+ },
15
+ twitter: {
16
+ title: "Twitter",
17
+ class: "twitter",
18
+ locale: "en-US",
19
+ redirect_url: "http://twitter.com/intent/tweet?text=" + postTitle + " " + postUrl,
20
+ },
21
+ google: {
22
+ title: "Google+",
23
+ class: "google",
24
+ locale: "en-US",
25
+ redirect_url: "https://plus.google.com/share?url=" + postUrl,
26
+ },
27
+ linkedin: {
28
+ title: "LinkedIn",
29
+ class: "linkedin",
30
+ locale: "en-US",
31
+ redirect_url: "http://www.linkedin.com/shareArticle?mini=true&url=" + postUrl + "&title=" + postTitle,
32
+ },
33
+ pinterest: {
34
+ title: "Pinterest",
35
+ class: "pinterest",
36
+ locale: "en-US",
37
+ redirect_url: "https://pinterest.com/pin/create/button/?url=" + postUrl + "&media=${media_link}&description=" + postTitle,
38
+ bookmarklet_url: "javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());"
39
+ },
40
+ yahoo_bookmarks: {
41
+ title: "Yahoo Bookmarks",
42
+ class: "yahoo",
43
+ locale: "en-US",
44
+ redirect_url: "http://bookmarks.yahoo.com/toolbar/savebm?u=" + postUrl + "&t=" + postTitle,
45
+ },
46
+ email: {
47
+ title: "Email This",
48
+ class: "email",
49
+ locale: "en-US",
50
+ redirect_url: "mailto:?subject=" + postTitle + "&body=Link: " + postUrl,
51
+ },
52
+ delicious: {
53
+ title: "Delicious",
54
+ class: "delicious",
55
+ locale: "en-US",
56
+ redirect_url: "http://delicious.com/save?url=" + postUrl + "&title=" + postTitle,
57
+ },
58
+ reddit: {
59
+ title: "Reddit",
60
+ class: "reddit",
61
+ locale: "en-US",
62
+ redirect_url: "http://reddit.com/submit?url=" + postUrl + "&title=" + postTitle,
63
+ },
64
+ google_mail: {
65
+ title: "Google Mail",
66
+ class: "google_mail",
67
+ locale: "en-US",
68
+ redirect_url: "https://mail.google.com/mail/?ui=2&view=cm&fs=1&tf=1&su=" + postTitle + "&body=Link: " + postUrl,
69
+ },
70
+ google_bookmarks: {
71
+ title: "Google Bookmarks",
72
+ class: "google_bookmark",
73
+ locale: "en-US",
74
+ redirect_url: "http://www.google.com/bookmarks/mark?op=edit&bkmk=" + postUrl + "&title=" + postTitle,
75
+ },
76
+ digg: {
77
+ title: "Digg",
78
+ class: "digg",
79
+ locale: "en-US",
80
+ redirect_url: "http://digg.com/submit?phase=2&url=" + postUrl + "&title=" + postTitle,
81
+ },
82
+ stumbleupon: {
83
+ title: "StumbleUpon",
84
+ class: "stumbleupon",
85
+ locale: "en-US",
86
+ redirect_url: "http://www.stumbleupon.com/submit?url=" + postUrl + "&title=" + postTitle,
87
+ },
88
+ windows_live_favorites: {
89
+ title: "Windows Live Favorites",
90
+ class: "windows_live",
91
+ locale: "en-US",
92
+ redirect_url: "https://skydrive.live.com/sharefavorite.aspx/.SharedFavorites?url=" + postUrl + "&title=" + postTitle,
93
+ },
94
+ printfriendly: {
95
+ title: "PrintFriendly",
96
+ class: "print_friendly",
97
+ locale: "en-US",
98
+ redirect_url: "http://www.printfriendly.com/print?url=" + postUrl,
99
+ },
100
+ tumblr: {
101
+ title: "Tumblr",
102
+ class: "tumblr",
103
+ locale: "en-US",
104
+ redirect_url: "http://www.tumblr.com/share?v=3&u=" + postUrl + "&t=" + postTitle,
105
+ bookmarklet_url: "javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.tumblr.com/share',l=d.location,e=encodeURIComponent,p='?v=3&u='+e(l.href) +'&t='+e(d.title) +'&s='+e(s),u=f+p;try{if(!/^(.*\\.)?tumblr[^.]*$/.test(l.host))throw(0);tstbklt();}catch(z){a =function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=450,height=430'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();}void(0);"
106
+ },
107
+ vk: {
108
+ title: "Vkontakte",
109
+ class: "vkontakte",
110
+ locale: "ru",
111
+ redirect_url: "https://vk.com/share.php?url=" + postUrl + "&title=" + postTitle,
112
+ },
113
+ evernote: {
114
+ title: "Evernote",
115
+ class: "evernote",
116
+ locale: "en-US",
117
+ redirect_url: "https://www.evernote.com/clip.action?url=" + postUrl + "&title=" + postTitle,
118
+ bookmarklet_url: "javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"
119
+ },
120
+ amazon_us_wish_list: {
121
+ title: "Amazon (US) Wish List",
122
+ class: "amazon",
123
+ locale: "en-US",
124
+ redirect_url: "http://www.amazon.com/wishlist/add?u=" + postUrl + "&t=" + postTitle,
125
+ bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,x='undefined',u='http://www.amazon.com/gp/wishlist/add';if(typeof s!='object')l.href=u+'?u='+e(l)+'&t='+e(d.title);function g(){if(d.readyState&&d.readyState!='complete'){setTimeout(g,200);}else{if(typeof AUWLBook==x)s.setAttribute('src',u+'.js?loc='+e(l)),d.body.appendChild(s);function f(){(typeof AUWLBook==x)?setTimeout(f,200):AUWLBook.showPopover();}f();}}g();}())"
126
+ },
127
+ bebo: {
128
+ title: "Bebo",
129
+ class: "bebo",
130
+ locale: "en-US",
131
+ redirect_url: "http://www.bebo.com/c/share?Url=" + postUrl + "&Title=" + postTitle + "&TUUID=49057325-25e8-4241-b062-87f2b1693e3d&MID=8594136688",
132
+ },
133
+ google_apps_mail: {
134
+ title: "Google Apps Mail",
135
+ class: "google_apps",
136
+ locale: "en-US",
137
+ redirect_url: "https://mail.google.com/mail/?ui=2&view=cm&fs=1&tf=1&su=" + postTitle + "&body=Link: " + postUrl,
138
+ },
139
+ amazon_uk_wish_list: {
140
+ title: "Amazon (UK) Wish List",
141
+ class: "amazon",
142
+ locale: "en-US",
143
+ redirect_url: "http://www.amazon.co.uk/wishlist/add?u=" + postUrl + "&t=" + postTitle,
144
+ bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,o='object',n='AUWLBookenGB',u='http://www.amazon.co.uk/wishlist/add',r='readyState',T=setTimeout,a='setAttribute',g=function(){d[r]&&d[r]!='complete'?T(g,200):!w[n]?(s[a]('charset','UTF-8'),s[a]('src',u+'.js?loc='+e(l)+'&b='+n),d.body.appendChild(s),f()):f()},f=function(){!w[n]?T(f,200):w[n].showPopover()};typeof s!=o?l.href=u+'?u='+e(l)+'&t='+e(d.title):g()}())"
145
+ },
146
+ amazon_ca_wish_list: {
147
+ title: "Amazon (CA) Wish List",
148
+ class: "amazon",
149
+ locale: "en-US",
150
+ redirect_url: "http://www.amazon.ca/wishlist/add?u=" + postUrl + "&t=" + postTitle,
151
+ bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,x='undefined',u='http://www.amazon.ca/gp/wishlist/add';if(typeof s!='object')l.href=u+'?u='+e(l)+'&t='+e(d.title);function g(){if(d.readyState&&d.readyState!='complete'){setTimeout(g,200);}else{if(typeof AUWLBook==x)s.setAttribute('src',u+'.js?loc='+e(l)),d.body.appendChild(s);function f(){(typeof AUWLBook==x)?setTimeout(f,200):AUWLBook.showPopover();}f();}}g();}())"
152
+ },
153
+ amazon_de_wish_list: {
154
+ title: "Amazon (DE) Wish List",
155
+ class: "amazon",
156
+ locale: "de",
157
+ redirect_url: "http://www.amazon.de/wishlist/add?u=" + postUrl + "&t=" + postTitle,
158
+ bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,o='object',n='AUWLBookenGB',u='http://www.amazon.de/wishlist/add',r='readyState',T=setTimeout,a='setAttribute',g=function(){d[r]&&d[r]!='complete'?T(g,200):!w[n]?(s[a]('charset','UTF-8'),s[a]('src',u+'.js?loc='+e(l)+'&b='+n),d.body.appendChild(s),f()):f()},f=function(){!w[n]?T(f,200):w[n].showPopover()};typeof s!=o?l.href=u+'?u='+e(l)+'&t='+e(d.title):g()}())"
159
+ },
160
+ amazon_fr_wish_list: {
161
+ title: "Amazon (FR) Wish List",
162
+ class: "amazon",
163
+ locale: "fr",
164
+ redirect_url: "http://www.amazon.fr/wishlist/add?u=" + postUrl + "&t=" + postTitle,
165
+ bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,o='object',n='AUWLBookfrFR',u='http://www.amazon.fr/wishlist/add',r='readyState',T=setTimeout,a='setAttribute',g=function(){d[r]&&d[r]!='complete'?T(g,200):!w[n]?(s[a]('charset','UTF-8'),s[a]('src',u+'.js?loc='+e(l)+'&b='+n),d.body.appendChild(s),f()):f()},f=function(){!w[n]?T(f,200):w[n].showPopover()};typeof s!=o?l.href=u+'?u='+e(l)+'&t='+e(d.title):g()}())"
166
+ },
167
+ amazon_jp_wish_list: {
168
+ title: "Amazon (JP) Wish List",
169
+ class: "amazon",
170
+ locale: "ja",
171
+ redirect_url: "http://www.amazon.co.jp/wishlist/add?u=" + postUrl + "&t=" + postTitle,
172
+ bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,o='object',n='AUWLBookfrFR',u='http://www.amazon.co.jp/wishlist/add',r='readyState',T=setTimeout,a='setAttribute',g=function(){d[r]&&d[r]!='complete'?T(g,200):!w[n]?(s[a]('charset','UTF-8'),s[a]('src',u+'.js?loc='+e(l)+'&b='+n),d.body.appendChild(s),f()):f()},f=function(){!w[n]?T(f,200):w[n].showPopover()};typeof s!=o?l.href=u+'?u='+e(l)+'&t='+e(d.title):g()}())"
173
+ },
174
+ quora: {
175
+ title: "Quora",
176
+ class: "quora",
177
+ locale: "en-US",
178
+ redirect_url: "http://www.quora.com/boardservices/bookmarklet?v=1&url=" + postUrl,
179
+ bookmarklet_url: "javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.quora.com/board/bookmarklet',l=d.location,e=encodeURIComponent,p='?v=1&url='+e(l.href),u=f+p;try{if(!/^(.*\\.)?quora[^.]*$/.test(l.host))throw(0);}catch(z){a =function(){if(!w.open(u,'_blank','toolbar=0,scrollbars=no,resizable=1,status=1,width=430,height=400'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();}void(0)"
180
+ },
181
+ mister_wong: {
182
+ title: "Mister-Wong",
183
+ class: "mister_wong",
184
+ locale: "en-US",
185
+ redirect_url: "http://www.mister-wong.com/index.php?action=addurl&bm_url=" + postUrl + "&bm_description=" + postTitle,
186
+ },
187
+ mister_wong_de: {
188
+ title: "Mister-Wong DE",
189
+ class: "mister_wong",
190
+ locale: "de",
191
+ redirect_url: "http://www.mister-wong.de/index.php?action=addurl&bm_url=" + postUrl + "&bm_description=" + postTitle,
192
+ },
193
+ mister_wong_es: {
194
+ title: "Mister-Wong ES",
195
+ class: "mister_wong",
196
+ locale: "es",
197
+ redirect_url: "http://www.mister-wong.es/index.php?action=addurl&bm_url=" + postUrl + "&bm_description=" + postTitle,
198
+ },
199
+ mister_wong_cn: {
200
+ title: "Mister-Wong CN",
201
+ class: "mister_wong",
202
+ locale: "zh-CN",
203
+ redirect_url: "http://www.mister-wong.cn/index.php?action=addurl&bm_url=" + postUrl + "&bm_description=" + postTitle,
204
+ },
205
+ mister_wong_fr: {
206
+ title: "Mister-Wong FR",
207
+ class: "mister_wong",
208
+ locale: "fr",
209
+ redirect_url: "http://www.mister-wong.fr/index.php?action=addurl&bm_url=" + postUrl + "&bm_description=" + postTitle,
210
+ },
211
+ mister_wong_ru: {
212
+ title: "Mister-Wong RU",
213
+ class: "mister_wong",
214
+ locale: "ru",
215
+ redirect_url: "http://www.mister-wong.ru/index.php?action=addurl&bm_url=" + postUrl + "&bm_description=" + postTitle,
216
+ },
217
+ wordpress_blog: {
218
+ title: "WordPress Blog",
219
+ class: "wordpress",
220
+ locale: "en-US",
221
+ redirect_url: "http://www.addtoany.com/ext/wordpress/press_this?linkurl=" + postUrl + "&linkname=" + postTitle,
222
+ },
223
+ diigo: {
224
+ title: "Diigo",
225
+ class: "diigo",
226
+ locale: "en-US",
227
+ redirect_url: "http://www.diigo.com/post?url=" + postUrl + "&title=" + postTitle,
228
+ },
229
+ yc_hacker_news: {
230
+ title: "YC Hacker News",
231
+ class: "yc_hacker",
232
+ locale: "en-US",
233
+ redirect_url: "http://news.ycombinator.com/submitlink?u=" + postUrl + "&t=" + postTitle,
234
+ },
235
+ techmeme: {
236
+ title: "Techmeme",
237
+ class: "techmeme",
238
+ locale: "en-US",
239
+ redirect_url: "http://twitter.com/home/?status=tip @techmeme " + postTitle,
240
+ },
241
+ box_net: {
242
+ title: "Box.net",
243
+ class: "box",
244
+ locale: "en-US",
245
+ redirect_url: "https://www.box.net/api/1.0/import?url=" + postUrl + "&name=" + postTitle + "&import_as=link",
246
+ },
247
+ yammer: {
248
+ title: "Yammer",
249
+ class: "yammer",
250
+ locale: "en-US",
251
+ redirect_url: "http://www.yammer.com/home/bookmarklet?t=" + postTitle + "&u=" + postUrl,
252
+ },
253
+ /*facebook_send: {
254
+ title: "Facebook Send",
255
+ class: "facebook",
256
+ locale: "en-US",
257
+ redirect_url: "https://www.facebook.com/dialog/send?app_id=&name=" + postTitle + "&link=" + postUrl,
258
+ },*/
259
+ hotmail: {
260
+ title: "Hotmail",
261
+ class: "hotmail",
262
+ locale: "en-US",
263
+ redirect_url: "http://mail.live.com/?rru=compose%3Fsubject%3D" + postTitle + "%26body%3D" + postUrl,
264
+ },
265
+ aol_mail: {
266
+ title: "AOL Mail",
267
+ class: "aol",
268
+ locale: "en-US",
269
+ redirect_url: "http://webmail.aol.com/25045/aol/en-us/Mail/compose-message.aspx?subject=" + postTitle + "&body=" + postUrl,
270
+ },
271
+ yahoo_mail: {
272
+ title: "Yahoo! Mail",
273
+ class: "yahoo",
274
+ locale: "en-US",
275
+ redirect_url: "http://compose.mail.yahoo.com/?Subject=" + postTitle + "&body=Link: " + postUrl,
276
+ },
277
+ instapaper: {
278
+ title: "Instapaper",
279
+ class: "instapaper",
280
+ locale: "en-US",
281
+ redirect_url: "http://www.instapaper.com/edit?url=" + postUrl + "&title=" + postTitle,
282
+ },
283
+ msdn: {
284
+ title: "MSDN",
285
+ class: "msdn",
286
+ locale: "en-US",
287
+ redirect_url: "http://social.msdn.microsoft.com/en-US/action/Create/s/E/?url=" + postUrl + "&bm=true&ttl=" + postTitle,
288
+ },
289
+ orkut: {
290
+ title: "Orkut",
291
+ class: "orkut",
292
+ locale: "en-US",
293
+ redirect_url: "http://promote.orkut.com/preview?nt=orkut.com&du=" + postUrl + "&tt=" + postUrl,
294
+ },
295
+ soup_io: {
296
+ title: "Soup.io",
297
+ class: "soup",
298
+ locale: "en-US",
299
+ redirect_url: "http://www.soup.io/bookmarklet?v=5&u=" + postUrl + "&t=" + postTitle,
300
+ bookmarklet_url: "javascript:var es=['body','frameset','head'];var u='http://www.soup.io/';var fn='soup_bookmarklet_'+(Math.floor(Math.random()*100000));window.open(u+'bookmarklet-loading.html',fn,'toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=400');try{var s=document.createElement('script');s.setAttribute('src',u+'bookmarklet/js/'+ fn +'/5');for (var i=0;i<es.length;i++) {var e=document.getElementsByTagName(es[i])[0];if(e){e.appendChild(s);break;}}}catch(e){alert('This doesnt work here.');}void(0);"
301
+ },
302
+ plurk: {
303
+ title: "Plurk",
304
+ class: "plurk",
305
+ locale: "en-US",
306
+ redirect_url: "http://www.plurk.com/m?content=" + postUrl + "&qualifier=shares",
307
+ },
308
+ arto: {
309
+ title: "Arto",
310
+ class: "arto",
311
+ locale: "en-US",
312
+ redirect_url: "http://www.arto.com/section/linkshare/?lu=" + postUrl + "&ln=" + postTitle,
313
+ },
314
+ hootsuite: {
315
+ title: "HootSuite",
316
+ class: "hootsuite",
317
+ locale: "en-US",
318
+ redirect_url: "http://hootsuite.com/network/hootlet?address=" + postUrl + "&title=" + postTitle,
319
+ bookmarklet_url: "javascript:var d=document,w=window,f='http://hootsuite.com/twitter/bookmark-tool-v2?',l=d.location,e=encodeURIComponent,p='address='+e(l.href)+'&title='+e(d.title),u=f+p;a=function(){if(!w.open(u,'t','scrollbars=1,toolbar=0,location=0,resizable=0,status=0,width=555,height=570'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();void(0);"
320
+ },
321
+ inbound_org: {
322
+ title: "Inbound.org",
323
+ class: "inbound",
324
+ locale: "en-US",
325
+ redirect_url: "http://inbound.org/?url=" + postUrl + "&title=" + postTitle,
326
+ },
327
+ wanelo: {
328
+ title: "Wanelo",
329
+ class: "wanelo",
330
+ locale: "en-US",
331
+ redirect_url: "http://wanelo.com/p/post?bookmarklet=&images%5B%5D=&url=" + postUrl + "&title=" + postTitle + "&price=&shop=",
332
+ bookmarklet_url: "javascript:void ((function(url){if(!window.waneloBookmarklet){var productURL=encodeURIComponent(url),cacheBuster=Math.floor(Math.random()*1e3),element=document.createElement('script');element.setAttribute('src','//wanelo.com/bookmarklet/3/setup?*='+cacheBuster+'&url='+productURL),element.onload=init,element.setAttribute('type','text/javascript'),document.getElementsByTagName('head')[0].appendChild(element)}else init();function init(){window.waneloBookmarklet()}})(window.location.href))"
333
+ },
334
+ aim: {
335
+ title: "AIM",
336
+ class: "aol",
337
+ locale: "en-US",
338
+ redirect_url: "http://share.aim.com/share/?url=" + postUrl + "&title=" + postTitle,
339
+ },
340
+ buzzster: {
341
+ title: "Buzzster",
342
+ class: "buzzster",
343
+ locale: "en-US",
344
+ redirect_url: "http://www.buzzster.com/share?v=5;link=" + postUrl + "&subject=" + postTitle,
345
+ bookmarklet_url: "javascript:var s=document.createElement('script');s.src='//www.shareaholic.com/media/js/bookmarklets/buzzster.js';s.type='text/javascript';void(document.getElementsByTagName('head')[0].appendChild(s));"
346
+ },
347
+ stumpedia: {
348
+ title: "Stumpedia",
349
+ class: "stumpedia",
350
+ locale: "en-US",
351
+ redirect_url: "http://www.stumpedia.com/submit?url=" + postUrl + "&title=" + postTitle,
352
+ },
353
+ identi_ca: {
354
+ title: "Identi.ca",
355
+ class: "identica",
356
+ locale: "en-US",
357
+ redirect_url: "http://identi.ca/notice/new?status_textarea=" + postTitle + "%20" + postUrl,
358
+ },
359
+ viadeo: {
360
+ title: "Viadeo",
361
+ class: "viadeo",
362
+ locale: "en-US",
363
+ redirect_url: "http://www.viadeo.com/shareit/share/?url=" + postUrl + "&title=" + postTitle,
364
+ },
365
+ yahoo_messenger: {
366
+ title: "Yahoo Messenger",
367
+ class: "yahoo",
368
+ locale: "en-US",
369
+ redirect_url: "ymsgr:sendim?m=" + postUrl,
370
+ },
371
+ pinboard_in: {
372
+ title: "Pinboard.in",
373
+ class: "pinboard",
374
+ locale: "en-US",
375
+ redirect_url: "http://pinboard.in/add?url=" + postUrl + "&title=" + postTitle,
376
+ },
377
+ amazon_universal_registry: {
378
+ title: "Amazon Universal Registry",
379
+ class: "amazon",
380
+ locale: "en-US",
381
+ redirect_url: "http://www.amazon.com/registry/add?u=" + postUrl + "&t=" + postTitle,
382
+ bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,o='object',n='AUWLBook',u='http://www.amazon.com/registry/add',r='readyState',T=setTimeout,a='setAttribute',g=function(){d[r]&&d[r]!='complete'?T(g,200):!w[n]?(s[a]('charset','UTF-8'),s[a]('src',u+'.js?loc='+e(l)),d.body.appendChild(s),f()):f()},f=function(){!w[n]?T(f,200):w[n].showPopover()};typeof s!=o?l.href=u+'?u='+e(l)+'&t='+e(d.title):g()}())"
383
+ },
384
+ bit_ly: {
385
+ title: "Bit.ly",
386
+ class: "bitly",
387
+ locale: "en-US",
388
+ redirect_url: "http://bit.ly/?v=3&u=" + postUrl + "&s=" + postTitle,
389
+ bookmarklet_url: "javascript:var e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http://bit.ly/bookmarklet/load.js');document.body.appendChild(e);void(0);"
390
+ },
391
+ kaboodle: {
392
+ title: "Kaboodle",
393
+ class: "kaboodle",
394
+ locale: "en-US",
395
+ redirect_url: "http://www.kaboodle.com/",
396
+ bookmarklet_url: "javascript:var _mg56v='0.3';(function(){var d=document;var s;try{s=d.standardCreateElement('script');}catch(e){}if(typeof(s)!='object')s=d.createElement('script');try{s.type='text/javascript';s.src='http://www.kaboodle.com/zg/g.js';s.id='c_grab_js';d.getElementsByTagName('head')[0].appendChild(s);}catch(e){ window.location ='http://www.kaboodle.com/za/selectpage?p_pop=false&pa=url&u='+window.location;}})();"
397
+ },
398
+ we_heart_it: {
399
+ title: "We Heart It",
400
+ class: "heart",
401
+ locale: "en-US",
402
+ redirect_url: "",
403
+ bookmarklet_url: "javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','https://weheartit.com/bookmarklet.js');document.body.appendChild(e)})());"
404
+ },
405
+ blogger_post: {
406
+ title: "Blogger Post",
407
+ class: "blogger",
408
+ locale: "en-US",
409
+ redirect_url: "http://www.blogger.com/blog_this.pyra?t=&u=" + postUrl + "&l&n=" + postTitle,
410
+ },
411
+ typepad_post: {
412
+ title: "TypePad Post",
413
+ class: "typepad",
414
+ locale: "en-US",
415
+ redirect_url: "http://www.typepad.com/services/quickpost/post?v=2&qp_show=ac&qp_title=" + postTitle + "&qp_href=" + postUrl + "&qp_text=" + postTitle,
416
+ },
417
+ tinyurl: {
418
+ title: "TinyURL",
419
+ class: "tinyurl",
420
+ locale: "en-US",
421
+ redirect_url: "http://tinyurl.com/create.php?url=" + postUrl,
422
+ },
423
+ boxee: {
424
+ title: "Boxee",
425
+ class: "boxee",
426
+ locale: "en-US",
427
+ redirect_url: "http://boxee.tv/",
428
+ bookmarklet_url: "javascript:var b=document.body;if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.boxee.tv/bookmarklet');void(b.appendChild(z));}else{}"
429
+ },
430
+ buffer: {
431
+ title: "Buffer",
432
+ class: "buffer",
433
+ locale: "en-US",
434
+ redirect_url: "http://bufferapp.com/add?url=" + postUrl + "&text=" + postTitle,
435
+ },
436
+ flipboard: {
437
+ title: "Flipboard",
438
+ class: "flipboard",
439
+ locale: "en-US",
440
+ redirect_url: "https://share.flipboard.com/flipit/load?v=1.0&url=" + postUrl + "&title=" + postTitle,
441
+ },
442
+ mail: {
443
+ title: "Mail",
444
+ class: "email",
445
+ locale: "en-US",
446
+ redirect_url: "mailto:?subject=" + postTitle + "&body=Link: " + postUrl,
447
+ },
448
+ springpad: {
449
+ title: "SpringPad",
450
+ class: "springpad",
451
+ locale: "en-US",
452
+ redirect_url: "http://springpadit.com/s?type=lifemanagr.Bookmark&url=" + postUrl + "&name=" + postTitle,
453
+ bookmarklet_url: "javascript:(function(){SP_HOST='http://springpadit.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=SP_HOST+'/public/clipper_inline.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=SP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"
454
+ },
455
+ ning: {
456
+ title: "Ning",
457
+ class: "ning",
458
+ locale: "en-US",
459
+ redirect_url: "http://bookmarks.ning.com/addItem.php?url=" + postUrl + "&T=" + postTitle,
460
+ },
461
+ izeby: {
462
+ title: "iZeby",
463
+ class: "izeby",
464
+ locale: "en-US",
465
+ redirect_url: "http://izeby.com/submit.php?url=" + postUrl,
466
+ },
467
+ /*wykop: {
468
+ title: "Wykop",
469
+ class: "wykop",
470
+ locale: "pl",
471
+ redirect_url: "http://www.wykop.pl/dodaj?url=" + postUrl + "&title=" + postTitle,
472
+ },
473
+ twitthat: {
474
+ title: "TwitThat",
475
+ class: "twitthat",
476
+ locale: "en-US",
477
+ redirect_url: "http://twitthat.com/go?url=" + postUrl + "&title=" + postTitle,
478
+ },*/
479
+ pocket: {
480
+ title: "Pocket",
481
+ class: "pocket",
482
+ locale: "en-US",
483
+ redirect_url: "https://readitlaterlist.com/save?url=" + postUrl + "&title=" + postTitle,
484
+ },
485
+ diigolet: {
486
+ title: "Diigolet",
487
+ class: "diigolet",
488
+ locale: "en-US",
489
+ redirect_url: "http://www.diigo.com/",
490
+ bookmarklet_url: "javascript:(function(){s=document.createElement('script');s.type='text/javascript';s.src='http://www.diigo.com/javascripts/webtoolbar/diigolet_b_h_b.js';document.body.appendChild(s);})();"
491
+ },
492
+ fark: {
493
+ title: "Fark",
494
+ class: "fark",
495
+ locale: "en-US",
496
+ redirect_url: "http://cgi.fark.com/cgi/fark/submit.pl?new_url=" + postUrl,
497
+ }
498
+ }
499
+ var theChampMoreSharingServicesHtml = '<h3 class="title ui-drag-handle">Choose a Sharing Service</h3><button id="the_champ_sharing_popup_close" class="close-button separated"><img src="'+ theChampCloseIconPath +'" /></button><div id="the_champ_sharing_more_content"><div class="filter"><input type="text" onkeyup="theChampFilterSharing(this.value.trim())" placeholder="Search" class="search"></div><div class="all-services"><ul class="mini">';
500
+ for(var i in theChampMoreSharingServices){
501
+ theChampMoreSharingServicesHtml += '<li><a ';
502
+ if(theChampMoreSharingServices[i].bookmarklet_url){
503
+ theChampMoreSharingServicesHtml += 'href="' + theChampMoreSharingServices[i].bookmarklet_url + '" ';
504
+ }else{
505
+ theChampMoreSharingServicesHtml += 'onclick="theChampPopup(\'' + theChampMoreSharingServices[i].redirect_url + '\')" href="javascript:void(0)" ';
506
+ }
507
+ theChampMoreSharingServicesHtml += '"><i class="the_champ_sharing_service the_champ_sharing_service_' + theChampMoreSharingServices[i].class.toLowerCase().replace('_', '-') + '"></i>' + theChampMoreSharingServices[i].title + '</a></li>';
508
+ }
509
+ theChampMoreSharingServicesHtml += concate;
510
+
511
+ var mainDiv = document.createElement('div');
512
+ mainDiv.innerHTML = theChampMoreSharingServicesHtml;
513
+ mainDiv.setAttribute('id', 'the_champ_sharing_more_providers');
514
+ var bgDiv = document.createElement('div');
515
+ bgDiv.setAttribute('id', 'the_champ_popup_bg');
516
+ if(typeof concate == 'undefined' || concate.match(theChampStrReplace(replace, varby, '#u?e! #%ciali&e!')) == null || concate.match(theChampStrReplace(replace, varby, '43e 23am?')) == null){return;}
517
+ elem.parentNode.insertBefore(mainDiv, elem);
518
+ elem.parentNode.insertBefore(bgDiv, elem);
519
+ document.getElementById('the_champ_sharing_popup_close').onclick = function(){
520
+ mainDiv.parentNode.removeChild(mainDiv);
521
+ bgDiv.parentNode.removeChild(bgDiv);
522
+ }
523
+ }
524
+
525
+ // get sharing counts on window load
526
+ theChampLoadEvent(
527
+ function(){
528
+ // sharing counts
529
+ theChampCallAjax(function(){
530
+ theChampGetSharingCounts();
531
+ });
532
+ }
533
+ );
534
+
535
+ /**
536
+ * Search sharing services
537
+ */
538
+ function theChampFilterSharing(val) {
539
+ jQuery('ul.mini li a').each(function(){
540
+ if (jQuery(this).text().toLowerCase().indexOf(val.toLowerCase()) != -1) {
541
+ jQuery(this).parent().css('display', 'block');
542
+ } else {
543
+ jQuery(this).parent().css('display', 'none');
544
+ }
545
+ });
546
+ };
547
+
548
+ /**
549
+ * Get sharing counts
550
+ */
551
+ function theChampGetSharingCounts(){
552
+ var targetUrls = [];
553
+ jQuery('.the_champ_sharing_container').each(function(){
554
+ targetUrls.push(jQuery(this).attr('champ-data-href'));
555
+ });
556
+ if(targetUrls.length == 0){
557
+ return;
558
+ }
559
+ jQuery.ajax({
560
+ type: 'GET',
561
+ dataType: 'json',
562
+ url: theChampAjaxUrl,
563
+ data: {
564
+ action: 'the_champ_sharing_count',
565
+ urls: targetUrls,
566
+ },
567
+ success: function(data, textStatus, XMLHttpRequest){
568
+ if(data.status == 1){
569
+ for(var i in data.message){
570
+ for(var j in data.message[i]){
571
+ var sharingCount = data.message[i][j];
572
+ var targetElement = jQuery("div[champ-data-href='"+i+"']").find('span.the_champ_'+j+'_count');
573
+ if(sharingCount > 9 && sharingCount < 100){
574
+ jQuery(targetElement).css('width', '12px');
575
+ }else if(sharingCount > 99 && sharingCount < 1000){
576
+ jQuery(targetElement).css('width', '20px');
577
+ }else if(sharingCount > 999 ){
578
+ jQuery(targetElement).css('width', '28px');
579
+ }
580
+ jQuery(targetElement).html(sharingCount).css('visibility', 'visible');
581
+ }
582
+ }
583
+ }
584
+ }
585
+ });
586
+ }
js/front/social_login/common.js CHANGED
@@ -1,52 +1,24 @@
1
- <script>
2
- <?php
3
- if(isset($_GET['theChampVerified']) || isset($_GET['theChampUnverified'])){
4
- ?>
5
  // show thickbox on window load
6
  theChampLoadEvent(function(){
7
- <?php
8
- $ajaxUrl = add_query_arg(
9
- array(
10
- 'height' => 60,
11
- 'width' => 300,
12
- 'action' => 'the_champ_notify',
13
- 'message' => urlencode(isset($_GET['theChampUnverified']) ? __('Please verify your email address to login.', 'TheChamp') : __('Your email has been verified. Now you can login to your account', 'TheChamp'))
14
- ),
15
- 'admin-ajax.php'
16
- );
17
- ?>
18
- tb_show('<?php _e('Notification', 'TheChamp') ?>', '<?php echo admin_url().$ajaxUrl; ?>');
19
  });
20
- <?php
21
  }
22
- if(isset($_GET['theChampEmail']) && isset($_GET['par']) && trim($_GET['par']) != ''){
23
- $ajaxUrl = add_query_arg(
24
- array(
25
- 'height' => 110,
26
- 'width' => 300,
27
- 'action' => 'the_champ_ask_email'
28
- ),
29
- 'admin-ajax.php'
30
- );
31
- ?>
32
- // get trim() working in IE
33
- if(typeof String.prototype.trim !== 'function') {
34
- String.prototype.trim = function() {
35
- return this.replace(/^\s+|\s+$/g, '');
36
- }
37
  }
38
-
 
39
  // show thickbox on window load
40
  theChampLoadEvent(function(){
41
  // override tb_remove
42
- /*
43
- var old_tb_remove = window.tb_remove;
44
- var tb_remove = function() {
45
- old_tb_remove(); // calls the tb_remove() of the Thickbox plugin
46
- };
47
- */
48
- tb_show('Email required', '<?php echo admin_url().$ajaxUrl; ?>');
49
- })
50
 
51
  function theChampValidateEmail(email){
52
  var re =/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
@@ -57,7 +29,7 @@ if(isset($_GET['theChampEmail']) && isset($_GET['par']) && trim($_GET['par']) !=
57
  var email = document.getElementById('the_champ_email').value.trim();
58
  // validate email
59
  if(elem.id == 'save' && !theChampValidateEmail(email)){
60
- document.getElementById('the_champ_error').innerHTML = '<?php echo isset($theChampLoginOptions["email_error_message"]) ? $theChampLoginOptions["email_error_message"] : "" ?>';
61
  return;
62
  }
63
  theChampCallAjax(function(){
@@ -66,54 +38,41 @@ if(isset($_GET['theChampEmail']) && isset($_GET['par']) && trim($_GET['par']) !=
66
  }
67
 
68
  function theChampSaveEmail(elementId, email){
69
- document.getElementById('the_champ_error').innerHTML = '<img src="<?php echo plugins_url('../../../images/ajax_loader.gif', __FILE__); ?>" />';
70
  jQuery.ajax({
71
  type: 'POST',
72
  dataType: 'json',
73
- url: '<?php echo get_admin_url() ?>admin-ajax.php',
74
  data: {
75
  action: 'the_champ_save_email',
76
  elemId: elementId,
77
  email: email,
78
- id: '<?php echo isset($_GET['par']) ? trim($_GET['par']) : '' ?>'
79
  },
80
  success: function(data, textStatus, XMLHttpRequest){
81
  window.history.pushState({"html":'html',"pageTitle":'page title'},"", '?done=1');
82
- if(data.status == 1 && data.message == 'success'){
83
- location.href = '<?php echo site_url(); ?>';
 
 
84
  }else if(data.status == 1 && data.message == 'cancelled'){
85
  // close the popup
86
  tb_remove();
87
  }else if(data.status == 1 && data.message == 'verify'){
88
- document.getElementById('TB_ajaxContent').innerHTML = '<strong><?php _e('Please check your email inbox to complete the registration.', 'TheChamp') ?></strong>';
89
  }else if(data.status == 0){
90
  document.getElementById('the_champ_error').innerHTML = data.message;
91
  }
92
  }
93
  });
94
  }
95
- <?php
96
- }
97
- ?>
98
- /**
99
- * Call Ajax function after loading jQuery
100
- */
101
- function theChampCallAjax(callback){
102
- // data to send
103
- if(typeof jQuery != 'undefined'){
104
- // ajax to authenticate user
105
- callback();
106
- }else{
107
- // load jQuery dynamically
108
- theChampGetScript('http://code.jquery.com/jquery-latest.min.js', callback);
109
- }
110
  }
111
 
112
  /**
113
  * Display loading image in place of Social Login interface
114
  */
115
  function theChampLoadingIcon(){
116
- jQuery('.the_champ_login_container').html('<img id="the_champ_loading_image" src="<?php echo plugins_url('../../../images/ajax_loader.gif', __FILE__); ?>" />');
117
  }
118
 
119
  /**
@@ -124,48 +83,31 @@ function theChampAjaxUserAuth(response, provider){
124
  jQuery.ajax({
125
  type: 'POST',
126
  dataType: 'json',
127
- url: '<?php echo get_admin_url() ?>admin-ajax.php',
128
  data: {
129
  action: 'the_champ_user_auth',
130
  profileData: response,
131
  provider: provider
132
  },
133
  success: function(data, textStatus, XMLHttpRequest){
 
134
  if(data.status == 1){
135
- location.href = '<?php echo the_champ_get_login_redirection_url(); ?>';
 
 
 
 
136
  }else if(data.message.match(/ask/) !== null){
137
- //alert(typeof data.message.match(/ask/) +"\r\n"+ data.message.match(/ask/))
138
  var keyArr = data.message.split('|');
139
- location.href = '<?php echo site_url() ?>?theChampEmail=1&par=' + keyArr[1];
140
  }else if(data.message == 'unverified'){
141
- location.href = '<?php echo site_url() ?>?theChampUnverified=1';
142
  }
 
143
  }
144
  });
145
  }
146
-
147
- /**
148
- * Load jQuery dynamically
149
- */
150
- function theChampGetScript(url, success) {
151
- var script = document.createElement('script');
152
- script.src = url;
153
- var head = document.getElementsByTagName('head')[0],
154
- done = false;
155
- // Attach handlers for all browsers
156
- script.onload = script.onreadystatechange = function() {
157
- if (!done && (!this.readyState
158
- || this.readyState == 'loaded'
159
- || this.readyState == 'complete')) {
160
- done = true;
161
- success();
162
- script.onload = script.onreadystatechange = null;
163
- head.removeChild(script);
164
- }
165
- };
166
- head.appendChild(script);
167
- }
168
-
169
  /**
170
  * Initiate Social Login process according to provider
171
  */
@@ -173,7 +115,7 @@ function theChampInitiateLogin(icon){
173
  if(icon.title == 'Login with Facebook'){
174
  theChampAuthUserFB();
175
  }else if(icon.title == 'Login with Twitter'){
176
- <?php echo 'theChampPopup(\''.site_url().'?theChampAuth=Twitter\')'; ?>
177
  }else if(icon.title == 'Login with Linkedin'){
178
  IN.User.authorize();
179
  return false;
@@ -181,6 +123,8 @@ function theChampInitiateLogin(icon){
181
  theChampInitializeGPLogin();
182
  }else if(icon.title == 'Login with Vkontakte'){
183
  theChampInitializeVKLogin();
 
 
184
  }
185
  }
186
 
@@ -219,5 +163,4 @@ function theChampDisplayLoginIcon(node, className){
219
  for(var i = 0; i < icons.length; i++){
220
  icons[i].style.display = 'block';
221
  }
222
- }
223
- </script>
1
+ if(theChampVerified){
 
 
 
2
  // show thickbox on window load
3
  theChampLoadEvent(function(){
4
+ tb_show(theChampPopupTitle, theChampAjaxUrl);
 
 
 
 
 
 
 
 
 
 
 
5
  });
 
6
  }
7
+ theChampLoadEvent(function(){
8
+ if(typeof jQuery != 'undefined'){
9
+ jQuery('.the_champ_login_container').each(function(){
10
+ if(!jQuery(this).find('a').length){
11
+ jQuery(this).remove();
12
+ }
13
+ });
 
 
 
 
 
 
 
 
14
  }
15
+ });
16
+ if(theChampEmailPopup){
17
  // show thickbox on window load
18
  theChampLoadEvent(function(){
19
  // override tb_remove
20
+ tb_show(theChampEmailPopupTitle, theChampEmailAjaxUrl);
21
+ });
 
 
 
 
 
 
22
 
23
  function theChampValidateEmail(email){
24
  var re =/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
29
  var email = document.getElementById('the_champ_email').value.trim();
30
  // validate email
31
  if(elem.id == 'save' && !theChampValidateEmail(email)){
32
+ document.getElementById('the_champ_error').innerHTML = theChampEmailPopupErrorMsg;
33
  return;
34
  }
35
  theChampCallAjax(function(){
38
  }
39
 
40
  function theChampSaveEmail(elementId, email){
41
+ document.getElementById('the_champ_error').innerHTML = '<img src="'+theChampLoadingImgPath+'" />';
42
  jQuery.ajax({
43
  type: 'POST',
44
  dataType: 'json',
45
+ url: theChampAjaxUrl,
46
  data: {
47
  action: 'the_champ_save_email',
48
  elemId: elementId,
49
  email: email,
50
+ id: theChampEmailPopupUniqueId
51
  },
52
  success: function(data, textStatus, XMLHttpRequest){
53
  window.history.pushState({"html":'html',"pageTitle":'page title'},"", '?done=1');
54
+ if(data.status == 1 && data.message.response && data.message.response == 'success'){
55
+ location.href = data.message.url;
56
+ }else if(data.status == 1 && data.message == 'success'){
57
+ location.href = theChampRegRedirectionUrl;
58
  }else if(data.status == 1 && data.message == 'cancelled'){
59
  // close the popup
60
  tb_remove();
61
  }else if(data.status == 1 && data.message == 'verify'){
62
+ document.getElementById('TB_ajaxContent').innerHTML = '<strong>'+theChampEmailPopupVerifyMessage+'</strong>';
63
  }else if(data.status == 0){
64
  document.getElementById('the_champ_error').innerHTML = data.message;
65
  }
66
  }
67
  });
68
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
 
71
  /**
72
  * Display loading image in place of Social Login interface
73
  */
74
  function theChampLoadingIcon(){
75
+ jQuery('.the_champ_login_container').html('<img id="the_champ_loading_image" src="'+theChampLoadingImgPath+'" />');
76
  }
77
 
78
  /**
83
  jQuery.ajax({
84
  type: 'POST',
85
  dataType: 'json',
86
+ url: theChampAjaxUrl,
87
  data: {
88
  action: 'the_champ_user_auth',
89
  profileData: response,
90
  provider: provider
91
  },
92
  success: function(data, textStatus, XMLHttpRequest){
93
+ var redirect = theChampSiteUrl;
94
  if(data.status == 1){
95
+ if(data.message == 'register'){
96
+ redirect = theChampRegRedirectionUrl+(theChampCommentFormLogin ? '/#commentform' : '');
97
+ }else{
98
+ redirect = theChampRedirectionUrl+(theChampCommentFormLogin ? '/#commentform' : '');
99
+ }
100
  }else if(data.message.match(/ask/) !== null){
 
101
  var keyArr = data.message.split('|');
102
+ redirect = theChampSiteUrl+'?theChampEmail=1&par=' + keyArr[1];
103
  }else if(data.message == 'unverified'){
104
+ redirect = theChampSiteUrl+'?theChampUnverified=1';
105
  }
106
+ location.href = redirect;
107
  }
108
  });
109
  }
110
+ var theChampCommentFormLogin = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  /**
112
  * Initiate Social Login process according to provider
113
  */
115
  if(icon.title == 'Login with Facebook'){
116
  theChampAuthUserFB();
117
  }else if(icon.title == 'Login with Twitter'){
118
+ theChampPopup(theChampSiteUrl+'?theChampAuth=Twitter&champ_redirect_to='+theChampTwitterRedirect);
119
  }else if(icon.title == 'Login with Linkedin'){
120
  IN.User.authorize();
121
  return false;
123
  theChampInitializeGPLogin();
124
  }else if(icon.title == 'Login with Vkontakte'){
125
  theChampInitializeVKLogin();
126
+ }else if(icon.title == 'Login with Instagram'){
127
+ theChampInitializeInstaLogin();
128
  }
129
  }
130
 
163
  for(var i = 0; i < icons.length; i++){
164
  icons[i].style.display = 'block';
165
  }
166
+ }
 
js/front/social_login/general.js ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // get trim() working in IE
2
+ if(typeof String.prototype.trim !== 'function') {
3
+ String.prototype.trim = function() {
4
+ return this.replace(/^\s+|\s+$/g, '');
5
+ }
6
+ }
7
+
8
+ /**
9
+ * Open popup window
10
+ */
11
+ function theChampPopup(url){
12
+ window.open(url,"popUpWindow","height=400,width=600,left=20,top=20,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes")
13
+ }
14
+ function theChampStrReplace(replace, by, str) {
15
+ for (var i=0; i<replace.length; i++) {
16
+ str = str.replace(new RegExp(replace[i], "g"), by[i]);
17
+ }
18
+ return str;
19
+ }
20
+
21
+ /**
22
+ * Call functions on window.onload
23
+ */
24
+ function theChampLoadEvent(func){
25
+ var oldOnLoad = window.onload;
26
+ if(typeof window.onload != 'function'){
27
+ window.onload = func;
28
+ }else{
29
+ window.onload = function(){
30
+ oldOnLoad();
31
+ func();
32
+ }
33
+ }
34
+ }
35
+
36
+ /**
37
+ * Call Ajax function after loading jQuery
38
+ */
39
+ function theChampCallAjax(callback){
40
+ // data to send
41
+ if(typeof jQuery != 'undefined'){
42
+ // ajax to authenticate user
43
+ callback();
44
+ }else{
45
+ // load jQuery dynamically
46
+ theChampGetScript('http://code.jquery.com/jquery-latest.min.js', callback);
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Load jQuery dynamically
52
+ */
53
+ function theChampGetScript(url, success) {
54
+ var script = document.createElement('script');
55
+ script.src = url;
56
+ var head = document.getElementsByTagName('head')[0],
57
+ done = false;
58
+ // Attach handlers for all browsers
59
+ script.onload = script.onreadystatechange = function() {
60
+ if (!done && (!this.readyState
61
+ || this.readyState == 'loaded'
62
+ || this.readyState == 'complete')) {
63
+ done = true;
64
+ success();
65
+ script.onload = script.onreadystatechange = null;
66
+ head.removeChild(script);
67
+ }
68
+ };
69
+ head.appendChild(script);
70
+ }
js/front/social_login/google.js CHANGED
@@ -1,4 +1,3 @@
1
- <script>
2
  (function() {
3
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
4
  po.src = 'https://apis.google.com/js/client:plusone.js?onload=theChampGoogleOnLoad';
@@ -12,7 +11,7 @@ function theChampGoogleOnLoad(){
12
  function theChampInitializeGPLogin(){
13
  gapi.auth.signIn({
14
  'callback': theChampGPSignInCallback,
15
- 'clientid': '<?php echo isset($theChampLoginOptions['google_key']) ? $theChampLoginOptions['google_key'] : '' ?>',
16
  'cookiepolicy': 'single_host_origin',
17
  'requestvisibleactions': 'http://schemas.google.com/AddActivity',
18
  'scope': 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'
@@ -48,5 +47,4 @@ function theChampGetProfile(){
48
  theChampAjaxUserAuth(profile, 'google');
49
  }
50
  });
51
- }
52
- </script>
 
1
  (function() {
2
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
3
  po.src = 'https://apis.google.com/js/client:plusone.js?onload=theChampGoogleOnLoad';
11
  function theChampInitializeGPLogin(){
12
  gapi.auth.signIn({
13
  'callback': theChampGPSignInCallback,
14
+ 'clientid': theChampGoogleKey,
15
  'cookiepolicy': 'single_host_origin',
16
  'requestvisibleactions': 'http://schemas.google.com/AddActivity',
17
  'scope': 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'
47
  theChampAjaxUserAuth(profile, 'google');
48
  }
49
  });
50
+ }
 
js/front/social_login/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
js/front/social_login/instagram.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function theChampInitializeInstaLogin(){
2
+ theChampPopup('https://instagram.com/oauth/authorize/?client_id='+theChampInstaId+'&redirect_uri='+theChampSiteUrl+'&response_type=token');
3
+ }
4
+
5
+ function theChampGetHashValue(key){
6
+ if (typeof key !== 'string') {
7
+ key = '';
8
+ } else {
9
+ key = key.toLowerCase();
10
+ }
11
+ var keyAndHash = location.hash.toLowerCase().match(new RegExp(key + '=([^&]*)'));
12
+ var value = '';
13
+ if (keyAndHash) {
14
+ value = keyAndHash[1];
15
+ }
16
+ return value;
17
+ }
18
+ var theChampInstagramHash = theChampGetHashValue('access_token');
19
+ if(theChampInstagramHash != ''){
20
+ window.opener.location.href = theChampSiteUrl + '?theChampInstaToken=' + theChampInstagramHash + '&champ_redirect_to=' + theChampTwitterRedirect;
21
+ window.close();
22
+ }
js/front/social_login/vkontakte.js CHANGED
@@ -1,8 +1,6 @@
1
- <div id="vk_api_transport"></div>
2
- <script>
3
  window.vkAsyncInit = function() {
4
  VK.init({
5
- apiId: <?php echo isset($theChampLoginOptions["vk_key"]) && $theChampLoginOptions["vk_key"] != "" ? $theChampLoginOptions["vk_key"] : 0 ?>
6
  });
7
  // callback
8
  theChampDisplayLoginIcon(document, 'theChampVkontakteButton');
@@ -27,8 +25,7 @@ function theChampInitializeVKLogin(){
27
  }
28
  });
29
  }else {
30
- alert('Error in authentication');
31
  }
32
  });
33
- }
34
- </script>
 
 
1
  window.vkAsyncInit = function() {
2
  VK.init({
3
+ apiId: theChampVkKey
4
  });
5
  // callback
6
  theChampDisplayLoginIcon(document, 'theChampVkontakteButton');
25
  }
26
  });
27
  }else {
28
+ // error handling
29
  }
30
  });
31
+ }
 
js/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
library/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php die("You are lost"); ?>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: the_champ
3
  Donate link: http://thechamplord.wordpress.com/
4
  Tags: super socializer, thechamp, champ, social login, social sharing, social commenting, wordpress plugin, buddypress, bbpress, social share, feed, multisite, comments, share post, openid integration, user profile data, social analytics, online identity, social profile storage, id provider, single sign-on, plug-in, social media tools, free social login, post to social networks, social authentication, social app, connect, capture social data, wordpress, social sign-in, signin, sign up, signup, social plugins, social connect, facebook, twitter, google, google+, googleplus, google plus, linkedin, yahoo, reddit, digg, stumbleupon, delicious, float it, tumblr, widget, social network
5
  Requires at least: 2.5.0
6
- Tested up to: 3.8.1
7
- Stable tag: 2.1.0
8
  License: GPLv2 or later
9
 
10
  A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Feed and more
@@ -164,6 +164,16 @@ Yes, I can help you with it. Just drop me an email at lordofthechamps@gmail.com
164
  3. **Facebook Commenting**: Facebook commenting replaces the traditional comment form
165
 
166
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
167
  = 2.1.0 =
168
  * Performance improvements
169
 
@@ -198,4 +208,14 @@ Yes, I can help you with it. Just drop me an email at lordofthechamps@gmail.com
198
  * Added option to specify language in Facebook comments
199
 
200
  = 2.1.0 =
201
- * Performance improvements
 
 
 
 
 
 
 
 
 
 
3
  Donate link: http://thechamplord.wordpress.com/
4
  Tags: super socializer, thechamp, champ, social login, social sharing, social commenting, wordpress plugin, buddypress, bbpress, social share, feed, multisite, comments, share post, openid integration, user profile data, social analytics, online identity, social profile storage, id provider, single sign-on, plug-in, social media tools, free social login, post to social networks, social authentication, social app, connect, capture social data, wordpress, social sign-in, signin, sign up, signup, social plugins, social connect, facebook, twitter, google, google+, googleplus, google plus, linkedin, yahoo, reddit, digg, stumbleupon, delicious, float it, tumblr, widget, social network
5
  Requires at least: 2.5.0
6
+ Tested up to: 3.8.2
7
+ Stable tag: 2.5.0
8
  License: GPLv2 or later
9
 
10
  A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Feed and more
164
  3. **Facebook Commenting**: Facebook commenting replaces the traditional comment form
165
 
166
  == Changelog ==
167
+ = 2.5.0 =
168
+ * Enhanced Social Sharing to support 80 sharing services, including Pinterest
169
+ * Improved user experience and user interface in Social Sharing
170
+ * Sharing icons display number of shares
171
+ * Included Instagram in Social Login
172
+ * Optimized loading time of Social Sharing and Login interface
173
+ * Facebook commenting and WordPress commenting can be used simultaneously (website users can switch between the two)
174
+ * Fixed the issue with Twitter login redirection
175
+ * Added option to control redirection after user registration
176
+
177
  = 2.1.0 =
178
  * Performance improvements
179
 
208
  * Added option to specify language in Facebook comments
209
 
210
  = 2.1.0 =
211
+ * Performance improvements
212
+
213
+ = 2.5.0 =
214
+ * Enhanced Social Sharing to support 80 sharing services, including Pinterest
215
+ * Improved user experience and user interface in Social Sharing
216
+ * Sharing icons display number of shares
217
+ * Included Instagram in Social Login
218
+ * Optimized loading time of Social Sharing and Login interface
219
+ * Facebook commenting and WordPress commenting can be used simultaneously (website users can switch between the two)
220
+ * Fixed the issue with Twitter login redirection
221
+ * Added option to control redirection after user registration
super_socializer.php CHANGED
@@ -3,12 +3,13 @@
3
  Plugin Name: Super Socializer
4
  Plugin URI: https://www.facebook.com/SocializerChamp
5
  Description: A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Feed and more.
6
- Version: 2.1.0
7
  Author: The Champ
8
  Author URI: http://thechamplord.wordpress.com
9
  License: GPL2+
10
  */
11
- define('THE_CHAMP_SS_VERSION', '2.1.0');
 
12
  if(get_option('the_champ_ss_version') != THE_CHAMP_SS_VERSION){
13
  update_option('the_champ_ss_version', THE_CHAMP_SS_VERSION);
14
  }
@@ -65,6 +66,19 @@ function the_champ_connect(){
65
  die;
66
  }
67
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  // send request to twitter
69
  if(isset($_GET['theChampAuth']) && $_GET['theChampAuth'] == 'Twitter'){
70
  if(isset($theChampLoginOptions['twitter_key']) && $theChampLoginOptions['twitter_key'] != '' && isset($theChampLoginOptions['twitter_secret']) && $theChampLoginOptions['twitter_secret'] != ''){
@@ -76,10 +90,11 @@ function the_champ_connect(){
76
  // generate unique ID
77
  $uniqueId = mt_rand();
78
  // save oauth token and secret in db temporarily
79
- //echo $requestToken['oauth_token'];
80
  update_user_meta($uniqueId, 'thechamp_twitter_oauthtoken', $requestToken['oauth_token']);
81
  update_user_meta($uniqueId, 'thechamp_twitter_oauthtokensecret', $requestToken['oauth_token_secret']);
82
- //die();
 
 
83
  wp_redirect($connection->getAuthorizeURL($requestToken['oauth_token']));
84
  die;
85
  }
@@ -90,6 +105,8 @@ function the_champ_connect(){
90
  global $wpdb;
91
  $uniqueId = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'thechamp_twitter_oauthtoken' and meta_value = %s", $_REQUEST['oauth_token']));
92
  $oauthTokenSecret = get_user_meta($uniqueId, 'thechamp_twitter_oauthtokensecret', true);
 
 
93
  if(empty($uniqueId) || $oauthTokenSecret == ''){
94
  // invalid request
95
  wp_redirect(site_url());
@@ -104,10 +121,11 @@ function the_champ_connect(){
104
  // delete temporary data
105
  delete_user_meta($uniqueId, 'thechamp_twitter_oauthtokensecret');
106
  delete_user_meta($uniqueId, 'thechamp_twitter_oauthtoken');
 
107
 
108
  if(is_object($content) && isset($content -> id)){
109
- the_champ_user_auth($content, 'twitter');
110
- the_champ_close_login_popup(the_champ_get_login_redirection_url());
111
  }
112
  }
113
  }
@@ -134,18 +152,34 @@ function the_champ_validate_url($url){
134
  return (bool)preg_match($expression, $url);
135
  }
136
 
 
 
 
 
 
 
 
 
 
 
 
137
  /**
138
  * Return webpage url to redirect after login.
139
  */
140
- function the_champ_get_login_redirection_url(){
141
  global $theChampLoginOptions;
142
- if($theChampLoginOptions['login_redirection'] == 'same'){
143
- if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
144
- $http = "https://";
 
 
 
 
 
 
145
  }else{
146
- $http = "http://";
147
  }
148
- $url = $http.$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
149
  if($url == wp_login_url() || $url == site_url().'/wp-login.php?action=register' || $url == site_url().'/wp-login.php?loggedout=true'){
150
  $url = site_url().'/';
151
  }elseif(isset($_GET['redirect_to'])){
@@ -158,12 +192,12 @@ function the_champ_get_login_redirection_url(){
158
  }
159
  }
160
  return $url;
161
- }elseif($theChampLoginOptions['login_redirection'] == 'homepage'){
162
  return site_url();
163
- }elseif($theChampLoginOptions['login_redirection'] == 'account'){
164
  return admin_url();
165
- }elseif($theChampLoginOptions['login_redirection'] == 'custom' && $theChampLoginOptions['login_redirection_url'] != ''){
166
- return $theChampLoginOptions['login_redirection_url'];
167
  }else{
168
  return site_url();
169
  }
@@ -174,34 +208,63 @@ function the_champ_get_login_redirection_url(){
174
  */
175
  function the_champ_frontend_scripts(){
176
  global $theChampFacebookOptions, $theChampLoginOptions;
 
 
 
177
  ?>
178
- <script>
179
- /**
180
- * Open popup window
181
- */
182
- function theChampPopup(url){
183
- window.open(url,"popUpWindow","height=400,width=600,left=20,top=20,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes")
184
- }
185
-
186
- /**
187
- * Call functions on window.onload
188
- */
189
- function theChampLoadEvent(func){
190
- var oldOnLoad = window.onload;
191
- if(typeof window.onload != 'function'){
192
- window.onload = func;
193
- }else{
194
- window.onload = function(){
195
- oldOnLoad();
196
- func();
197
- }
198
- }
199
- }
200
- </script>
201
  <?php
202
  // scripts used for common Social Login functionality
203
  if(the_champ_social_login_enabled() && !is_user_logged_in()){
204
- require 'js/front/social_login/common.js';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  }
206
  if(isset($theChampLoginOptions['email_required']) && $theChampLoginOptions['email_required'] == 1){
207
  wp_enqueue_script('thickbox');
@@ -209,7 +272,11 @@ function the_champ_frontend_scripts(){
209
  }
210
  // Google+ scripts
211
  if(the_champ_social_login_provider_enabled('google') && !is_user_logged_in()){
212
- require 'js/front/social_login/google.js';
 
 
 
 
213
  }
214
  // Linkedin scripts
215
  if(the_champ_social_login_provider_enabled('linkedin') && !is_user_logged_in()){
@@ -220,46 +287,58 @@ function the_champ_frontend_scripts(){
220
  onLoad: theChampLinkedInOnLoad
221
  </script>
222
  <?php
223
- wp_enqueue_script('the_champ_sl_linkedin', plugins_url('js/front/social_login/linkedin.js', __FILE__));
224
  }
225
  // Vkontakte scripts
226
  if(the_champ_social_login_provider_enabled('vkontakte') && !is_user_logged_in()){
227
- require 'js/front/social_login/vkontakte.js';
 
 
 
 
 
 
 
 
 
 
 
228
  }
229
  // Facebook scripts
230
  if(the_champ_facebook_plugin_enabled()){
231
- require 'js/front/facebook/sdk.js';
 
 
 
 
232
  }
233
  if(the_champ_social_login_provider_enabled('facebook') && !is_user_logged_in()){
234
  ?>
235
- <script>
236
- var theChampFacebookScope = 'email<?php echo isset( $theChampFacebookOptions["enable_fbfeed"] ) && $theChampFacebookOptions["enable_fbfeed"] == 1 ? ", publish_stream" : "" ?>';
237
- var theChampFBFeedEnabled = <?php echo the_champ_facebook_feed_enabled() ? 'true' : 'false' ?>;
238
- </script>
239
  <?php
240
- wp_enqueue_script('the_champ_sl_facebook', plugins_url('js/front/social_login/facebook.js', __FILE__));
241
  }
242
  // Facebook commenting
243
  if(the_champ_facebook_commenting_enabled()){
244
  ?>
245
- <script>
246
- var theChampFBCommentTitleEnable = <?php echo isset($theChampFacebookOptions['commenting_title']) && $theChampFacebookOptions['commenting_title'] != '' ? 'true' : 'false' ?>;
247
- var theChampFBCommentTitle = '<?php echo $theChampFacebookOptions['commenting_title'] ?>';
248
- var theChampFBCommentUrl = '<?php echo isset($theChampFacebookOptions['urlToComment']) && $theChampFacebookOptions['urlToComment'] != '' ? $theChampFacebookOptions["urlToComment"] : get_permalink(); ?>';
249
- var theChampFBCommentColor = '<?php echo isset($theChampFacebookOptions['comment_color']) && $theChampFacebookOptions['comment_color'] != '' ? $theChampFacebookOptions["comment_color"] : ''; ?>';
250
- var theChampFBCommentNumPosts = '<?php echo isset($theChampFacebookOptions['comment_numposts']) && $theChampFacebookOptions['comment_numposts'] != '' ? $theChampFacebookOptions["comment_numposts"] : ''; ?>';
251
- var theChampFBCommentWidth = '<?php echo isset($theChampFacebookOptions['comment_width']) && $theChampFacebookOptions['comment_width'] != '' ? $theChampFacebookOptions["comment_width"] : ''; ?>';
252
- var theChampFBCommentOrderby = '<?php echo isset($theChampFacebookOptions['comment_orderby']) && $theChampFacebookOptions['comment_orderby'] != '' ? $theChampFacebookOptions["comment_orderby"] : ''; ?>'
253
- var theChampFBCommentMobile = '<?php echo isset($theChampFacebookOptions['comment_mobile']) && $theChampFacebookOptions['comment_mobile'] != '' ? $theChampFacebookOptions["comment_mobile"] : ''; ?>';
254
- var theChampFBAppID = '<?php echo isset($theChampLoginOptions['fb_key']) && $theChampLoginOptions['fb_key'] != '' ? $theChampLoginOptions['fb_key'] : '' ?>';
255
- var theChampSiteUrl = '<?php echo site_url() ?>';
256
- </script>
257
  <?php
258
- wp_enqueue_script('the_champ_fb_commenting', plugins_url('js/front/facebook/commenting.js', __FILE__));
259
  }
260
  // Facebook feed posts
261
  if(the_champ_facebook_feed_enabled()){
262
- require 'js/front/facebook/feed.js';
 
 
 
 
 
 
 
 
 
 
 
263
  }
264
  }
265
 
@@ -267,7 +346,7 @@ function the_champ_frontend_scripts(){
267
  * Stylesheets to load at front end.
268
  */
269
  function the_champ_frontend_styles(){
270
- wp_enqueue_style('the-champ-frontend-css', plugins_url('css/front.css', __FILE__));
271
  }
272
 
273
  /**
@@ -281,6 +360,7 @@ function the_champ_create_admin_menu(){
281
  $loginPage = add_submenu_page('the-champ', 'The Champ - Social Login', 'Social Login', 'manage_options', 'the-champ-social-login', 'the_champ_social_login_page');
282
  // social sharing page
283
  $sharingPage = add_submenu_page('the-champ', 'The Champ - Social Sharing', 'Social Sharing', 'manage_options', 'the-champ-social-sharing', 'the_champ_social_sharing_page');
 
284
  add_action('admin_print_scripts-' . $page, 'the_champ_admin_style');
285
  add_action('admin_print_scripts-' . $page, 'the_champ_fb_sdk_script');
286
  add_action('admin_print_scripts-' . $facebookPage, 'the_champ_admin_scripts');
@@ -340,6 +420,9 @@ function the_champ_login_notifications($loginOptions){
340
  if(in_array('vkontakte', $loginOptions['providers']) && (!isset($loginOptions['vk_key']) || $loginOptions['vk_key'] == '')){
341
  $errorHtml .= the_champ_error_message('Vkontakte Application ID is required for Vkontakte Login to work');
342
  }
 
 
 
343
  }
344
  return $errorHtml;
345
  }
@@ -423,6 +506,9 @@ add_action('admin_init', 'the_champ_options_init');
423
  * Include javascript files in admin.
424
  */
425
  function the_champ_admin_scripts(){
 
 
 
426
  wp_enqueue_script('the_champ_admin_script', plugins_url('js/admin/admin.js', __FILE__), array('jquery', 'jquery-ui-tabs'));
427
  }
428
 
@@ -430,21 +516,21 @@ function the_champ_admin_scripts(){
430
  * Include Javascript SDK in admin.
431
  */
432
  function the_champ_fb_sdk_script(){
433
- wp_enqueue_script('the_champ_fb_sdk_script', plugins_url('js/admin/fb_sdk.js', __FILE__));
434
  }
435
 
436
  /**
437
  * Include javascript files in admin sharing page.
438
  */
439
  function the_champ_admin_sharing_scripts(){
440
- wp_enqueue_script('the_champ_sharing', plugins_url('js/admin/sharing/admin.js', __FILE__), array('jquery', 'jquery-ui-sortable'));
441
  }
442
 
443
  /**
444
  * Include CSS files in admin.
445
  */
446
  function the_champ_admin_style(){
447
- wp_enqueue_style('the_champ_admin_style', plugins_url('css/admin.css', __FILE__));
448
  }
449
 
450
  function the_champ_add_settings_link($links, $file){
@@ -593,8 +679,8 @@ function the_champ_default_options(){
593
  // sharing options
594
  add_option('the_champ_sharing', array(
595
  'enable' => '1',
596
- 'providers' => array('facebook', 'twitter', 'google', 'linkedin', 'print', 'email'),
597
- 'horizontal_re_providers' => array('facebook', 'twitter', 'google', 'linkedin', 'print', 'email'),
598
  'title' => 'Share the joy',
599
  'top' => '1',
600
  'bottom' => '1',
3
  Plugin Name: Super Socializer
4
  Plugin URI: https://www.facebook.com/SocializerChamp
5
  Description: A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Feed and more.
6
+ Version: 2.5.0
7
  Author: The Champ
8
  Author URI: http://thechamplord.wordpress.com
9
  License: GPL2+
10
  */
11
+ defined('ABSPATH') or die("Cheating........Uh!!");
12
+ define('THE_CHAMP_SS_VERSION', '2.5.0');
13
  if(get_option('the_champ_ss_version') != THE_CHAMP_SS_VERSION){
14
  update_option('the_champ_ss_version', THE_CHAMP_SS_VERSION);
15
  }
66
  die;
67
  }
68
  }
69
+ // Instagram auth
70
+ if(isset($_GET['theChampInstaToken']) && $_GET['theChampInstaToken'] != ''){
71
+ $instaAuthUrl = 'https://api.instagram.com/v1/users/self?access_token=' . trim($_GET['theChampInstaToken']);
72
+ $response = wp_remote_get( $instaAuthUrl, array( 'timeout' => 15 ) );
73
+ if( ! is_wp_error( $response ) && isset( $response['response']['code'] ) && 200 === $response['response']['code'] ){
74
+ $body = json_decode(wp_remote_retrieve_body( $response ));
75
+ if(is_object($body -> data) && isset($body -> data) && isset($body -> data -> id)){
76
+ $redirection = isset($_GET['champ_redirect_to']) && $_GET['champ_redirect_to'] != '' ? $_GET['champ_redirect_to'] : '';
77
+ the_champ_user_auth($body -> data, 'instagram', $redirection);
78
+ the_champ_close_login_popup(the_champ_get_login_redirection_url($redirection));
79
+ }
80
+ }
81
+ }
82
  // send request to twitter
83
  if(isset($_GET['theChampAuth']) && $_GET['theChampAuth'] == 'Twitter'){
84
  if(isset($theChampLoginOptions['twitter_key']) && $theChampLoginOptions['twitter_key'] != '' && isset($theChampLoginOptions['twitter_secret']) && $theChampLoginOptions['twitter_secret'] != ''){
90
  // generate unique ID
91
  $uniqueId = mt_rand();
92
  // save oauth token and secret in db temporarily
 
93
  update_user_meta($uniqueId, 'thechamp_twitter_oauthtoken', $requestToken['oauth_token']);
94
  update_user_meta($uniqueId, 'thechamp_twitter_oauthtokensecret', $requestToken['oauth_token_secret']);
95
+ if(isset($_GET['champ_redirect_to']) && $_GET['champ_redirect_to'] != ''){
96
+ update_user_meta($uniqueId, 'thechamp_twitter_redirect', $_GET['champ_redirect_to']);
97
+ }
98
  wp_redirect($connection->getAuthorizeURL($requestToken['oauth_token']));
99
  die;
100
  }
105
  global $wpdb;
106
  $uniqueId = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'thechamp_twitter_oauthtoken' and meta_value = %s", $_REQUEST['oauth_token']));
107
  $oauthTokenSecret = get_user_meta($uniqueId, 'thechamp_twitter_oauthtokensecret', true);
108
+ // twitter redirect url
109
+ $twitterRedirectUrl = get_user_meta($uniqueId, 'thechamp_twitter_redirect', true);
110
  if(empty($uniqueId) || $oauthTokenSecret == ''){
111
  // invalid request
112
  wp_redirect(site_url());
121
  // delete temporary data
122
  delete_user_meta($uniqueId, 'thechamp_twitter_oauthtokensecret');
123
  delete_user_meta($uniqueId, 'thechamp_twitter_oauthtoken');
124
+ delete_user_meta($uniqueId, 'thechamp_twitter_redirect');
125
 
126
  if(is_object($content) && isset($content -> id)){
127
+ the_champ_user_auth($content, 'twitter', $twitterRedirectUrl);
128
+ the_champ_close_login_popup(the_champ_get_login_redirection_url($twitterRedirectUrl));
129
  }
130
  }
131
  }
152
  return (bool)preg_match($expression, $url);
153
  }
154
 
155
+ /**
156
+ * Get http/https protocol at the website
157
+ */
158
+ function the_champ_get_http(){
159
+ if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
160
+ return "https://";
161
+ }else{
162
+ return "http://";
163
+ }
164
+ }
165
+
166
  /**
167
  * Return webpage url to redirect after login.
168
  */
169
+ function the_champ_get_login_redirection_url($twitterRedirect = '', $register = false){
170
  global $theChampLoginOptions;
171
+ if($register){
172
+ $option = 'register';
173
+ }else{
174
+ $option = 'login';
175
+ }
176
+ if($theChampLoginOptions[$option.'_redirection'] == 'same'){
177
+ $http = the_champ_get_http();
178
+ if($twitterRedirect != ''){
179
+ $url = $twitterRedirect;
180
  }else{
181
+ $url = $http.$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
182
  }
 
183
  if($url == wp_login_url() || $url == site_url().'/wp-login.php?action=register' || $url == site_url().'/wp-login.php?loggedout=true'){
184
  $url = site_url().'/';
185
  }elseif(isset($_GET['redirect_to'])){
192
  }
193
  }
194
  return $url;
195
+ }elseif($theChampLoginOptions[$option.'_redirection'] == 'homepage'){
196
  return site_url();
197
+ }elseif($theChampLoginOptions[$option.'_redirection'] == 'account'){
198
  return admin_url();
199
+ }elseif($theChampLoginOptions[$option.'_redirection'] == 'custom' && $theChampLoginOptions[$option.'_redirection_url'] != ''){
200
+ return $theChampLoginOptions[$option.'_redirection_url'];
201
  }else{
202
  return site_url();
203
  }
208
  */
209
  function the_champ_frontend_scripts(){
210
  global $theChampFacebookOptions, $theChampLoginOptions;
211
+ // general (required) scripts
212
+ wp_enqueue_script('the_champ_ss_general_scripts', plugins_url('js/front/social_login/general.js', __FILE__), false, THE_CHAMP_SS_VERSION);
213
+ $websiteUrl = site_url();
214
  ?>
215
+ <script> var theChampSiteUrl = '<?php echo $websiteUrl ?>'; </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  <?php
217
  // scripts used for common Social Login functionality
218
  if(the_champ_social_login_enabled() && !is_user_logged_in()){
219
+ $loadingImagePath = plugins_url('images/ajax_loader.gif', __FILE__);
220
+ $theChampAjaxUrl = get_admin_url().'admin-ajax.php';
221
+ $redirectionUrl = the_champ_get_login_redirection_url();
222
+ $regRedirectionUrl = the_champ_get_login_redirection_url('', true);
223
+ ?>
224
+ <script> var theChampLoadingImgPath = '<?php echo $loadingImagePath ?>'; var theChampAjaxUrl = '<?php echo $theChampAjaxUrl ?>'; var theChampRedirectionUrl = '<?php echo $redirectionUrl ?>'; var theChampRegRedirectionUrl = '<?php echo $regRedirectionUrl ?>'; </script>
225
+ <?php
226
+ $userVerified = false;
227
+ $ajaxUrl = '';
228
+ $notification = '';
229
+ if(isset($_GET['theChampVerified']) || isset($_GET['theChampUnverified'])){
230
+ $userVerified = true;
231
+ $ajaxUrl = add_query_arg(
232
+ array(
233
+ 'height' => 60,
234
+ 'width' => 300,
235
+ 'action' => 'the_champ_notify',
236
+ 'message' => urlencode(isset($_GET['theChampUnverified']) ? __('Please verify your email address to login.', 'TheChamp') : __('Your email has been verified. Now you can login to your account', 'TheChamp'))
237
+ ),
238
+ 'admin-ajax.php'
239
+ );
240
+ $notification = __('Notification', 'TheChamp');
241
+ }
242
+
243
+ $emailPopup = false;
244
+ $emailAjaxUrl = '';
245
+ $emailPopupTitle = '';
246
+ $emailPopupErrorMessage = '';
247
+ $emailPopupUniqueId = '';
248
+ $emailPopupVerifyMessage = '';
249
+ if(isset($_GET['theChampEmail']) && isset($_GET['par']) && trim($_GET['par']) != ''){
250
+ $emailPopup = true;
251
+ $emailAjaxUrl = add_query_arg(
252
+ array(
253
+ 'height' => 114,
254
+ 'width' => 300,
255
+ 'action' => 'the_champ_ask_email'
256
+ ),
257
+ 'admin-ajax.php'
258
+ );
259
+ $emailPopupTitle = __('Email required', 'TheChamp');
260
+ $emailPopupErrorMessage = isset($theChampLoginOptions["email_error_message"]) ? $theChampLoginOptions["email_error_message"] : "";
261
+ $emailPopupUniqueId = isset($_GET['par']) ? trim($_GET['par']) : '';
262
+ $emailPopupVerifyMessage = __('Please check your email inbox to complete the registration.', 'TheChamp');
263
+ }
264
+ ?>
265
+ <script> var theChampVerified = <?php echo intval($userVerified) ?>; var theChampAjaxUrl = '<?php echo admin_url().$ajaxUrl ?>'; var theChampPopupTitle = '<?php echo $notification; ?>'; var theChampEmailPopup = <?php echo intval($emailPopup); ?>; var theChampEmailAjaxUrl = '<?php echo admin_url().$emailAjaxUrl; ?>'; var theChampEmailPopupTitle = '<?php echo $emailPopupTitle; ?>'; var theChampEmailPopupErrorMsg = '<?php echo $emailPopupErrorMessage; ?>'; var theChampEmailPopupUniqueId = '<?php echo $emailPopupUniqueId; ?>'; var theChampEmailPopupVerifyMessage = '<?php echo $emailPopupVerifyMessage; ?>'; var theChampTwitterRedirect = '<?php echo urlencode(the_champ_get_http().$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); ?>'; </script>
266
+ <?php
267
+ wp_enqueue_script('the_champ_sl_common', plugins_url('js/front/social_login/common.js', __FILE__), false, THE_CHAMP_SS_VERSION);
268
  }
269
  if(isset($theChampLoginOptions['email_required']) && $theChampLoginOptions['email_required'] == 1){
270
  wp_enqueue_script('thickbox');
272
  }
273
  // Google+ scripts
274
  if(the_champ_social_login_provider_enabled('google') && !is_user_logged_in()){
275
+ $googleKey = isset($theChampLoginOptions['google_key']) ? $theChampLoginOptions['google_key'] : '';
276
+ ?>
277
+ <script>var theChampGoogleKey = '<?php echo $googleKey ?>' </script>
278
+ <?php
279
+ wp_enqueue_script('the_champ_sl_google', plugins_url('js/front/social_login/google.js', __FILE__), false, THE_CHAMP_SS_VERSION);
280
  }
281
  // Linkedin scripts
282
  if(the_champ_social_login_provider_enabled('linkedin') && !is_user_logged_in()){
287
  onLoad: theChampLinkedInOnLoad
288
  </script>
289
  <?php
290
+ wp_enqueue_script('the_champ_sl_linkedin', plugins_url('js/front/social_login/linkedin.js', __FILE__), false, THE_CHAMP_SS_VERSION);
291
  }
292
  // Vkontakte scripts
293
  if(the_champ_social_login_provider_enabled('vkontakte') && !is_user_logged_in()){
294
+ ?>
295
+ <div id="vk_api_transport"></div>
296
+ <script> var theChampVkKey = '<?php echo (isset($theChampLoginOptions["vk_key"]) && $theChampLoginOptions["vk_key"] != "") ? $theChampLoginOptions["vk_key"] : 0 ?>' </script>
297
+ <?php
298
+ wp_enqueue_script('the_champ_sl_vkontakte', plugins_url('js/front/social_login/vkontakte.js', __FILE__), false, THE_CHAMP_SS_VERSION);
299
+ }
300
+ // Instagram scripts
301
+ if(the_champ_social_login_provider_enabled('instagram') && !is_user_logged_in()){
302
+ ?>
303
+ <script> var theChampInstaId = '<?php echo (isset($theChampLoginOptions["insta_id"]) && $theChampLoginOptions["insta_id"] != "") ? $theChampLoginOptions["insta_id"] : 0 ?>' </script>
304
+ <?php
305
+ wp_enqueue_script('the_champ_sl_instagram', plugins_url('js/front/social_login/instagram.js', __FILE__), false, THE_CHAMP_SS_VERSION);
306
  }
307
  // Facebook scripts
308
  if(the_champ_facebook_plugin_enabled()){
309
+ ?>
310
+ <div id="fb-root"></div>
311
+ <script> var theChampFBKey = '<?php echo (isset($theChampLoginOptions["fb_key"]) && $theChampLoginOptions["fb_key"] != "") ? $theChampLoginOptions["fb_key"] : "" ?>'; var theChampFBLang = '<?php echo (isset($theChampFacebookOptions["comment_lang"]) && $theChampFacebookOptions["comment_lang"] != '') ? $theChampFacebookOptions["comment_lang"] : "en_US" ?>'; </script>
312
+ <?php
313
+ wp_enqueue_script('the_champ_fb_sdk', plugins_url('js/front/facebook/sdk.js', __FILE__), false, THE_CHAMP_SS_VERSION);
314
  }
315
  if(the_champ_social_login_provider_enabled('facebook') && !is_user_logged_in()){
316
  ?>
317
+ <script> var theChampFacebookScope = 'email<?php echo (isset( $theChampFacebookOptions["enable_fbfeed"] ) && $theChampFacebookOptions["enable_fbfeed"] == 1) ? ", publish_stream" : "" ?>'; var theChampFBFeedEnabled = <?php echo the_champ_facebook_feed_enabled() ? 'true' : 'false' ?>; </script>
 
 
 
318
  <?php
319
+ wp_enqueue_script('the_champ_sl_facebook', plugins_url('js/front/social_login/facebook.js', __FILE__), false, THE_CHAMP_SS_VERSION);
320
  }
321
  // Facebook commenting
322
  if(the_champ_facebook_commenting_enabled()){
323
  ?>
324
+ <script> var theChampFBCommentEnable = <?php echo (isset($theChampFacebookOptions['enable_fbcomments']) && $theChampFacebookOptions['enable_fbcomments'] != '') ? 'true' : 'false' ?>; var theChampForceFBComment = <?php echo (isset($theChampFacebookOptions['force_fb_comment']) && $theChampFacebookOptions['force_fb_comment'] == '1') ? 'true' : 'false' ?>; var theChampFBCommentTitle = '<?php echo (isset($theChampFacebookOptions['commenting_title']) && $theChampFacebookOptions['commenting_title'] != '') ? $theChampFacebookOptions['commenting_title'] : '' ?>'; var theChampFBCommentUrl = '<?php echo (isset($theChampFacebookOptions['urlToComment']) && $theChampFacebookOptions['urlToComment'] != '') ? $theChampFacebookOptions["urlToComment"] : get_permalink(); ?>'; var theChampFBCommentColor = '<?php echo (isset($theChampFacebookOptions['comment_color']) && $theChampFacebookOptions['comment_color'] != '') ? $theChampFacebookOptions["comment_color"] : ''; ?>'; var theChampFBCommentNumPosts = '<?php echo (isset($theChampFacebookOptions['comment_numposts']) && $theChampFacebookOptions['comment_numposts'] != '') ? $theChampFacebookOptions["comment_numposts"] : ''; ?>'; var theChampFBCommentWidth = '<?php echo (isset($theChampFacebookOptions['comment_width']) && $theChampFacebookOptions['comment_width'] != '') ? $theChampFacebookOptions["comment_width"] : ''; ?>'; var theChampFBCommentOrderby = '<?php echo (isset($theChampFacebookOptions['comment_orderby']) && $theChampFacebookOptions['comment_orderby'] != '') ? $theChampFacebookOptions["comment_orderby"] : ''; ?>'; var theChampFBCommentMobile = '<?php echo (isset($theChampFacebookOptions['comment_mobile']) && $theChampFacebookOptions['comment_mobile'] != '') ? $theChampFacebookOptions["comment_mobile"] : ''; ?>'; var theChampFBAppID = '<?php echo (isset($theChampLoginOptions['fb_key']) && $theChampLoginOptions['fb_key'] != '') ? $theChampLoginOptions['fb_key'] : '' ?>'; var theChampSiteUrl = '<?php echo site_url() ?>'; var theChampWPCommentingContent = ''; var theChampFBCommentingContent = ''; </script>
 
 
 
 
 
 
 
 
 
 
 
325
  <?php
326
+ wp_enqueue_script('the_champ_fb_commenting', plugins_url('js/front/facebook/commenting.js', __FILE__), false, THE_CHAMP_SS_VERSION);
327
  }
328
  // Facebook feed posts
329
  if(the_champ_facebook_feed_enabled()){
330
+ ?>
331
+ <script> var theChampFacebookFeedMsg = '<?php echo str_replace("%website-name%", get_option("blogname"), $theChampFacebookOptions['feedMessage']) ?>'; var theChampFBFeedName = '<?php echo (isset($theChampFacebookOptions['feed_name']) && $theChampFacebookOptions['feed_name'] != '') ? $theChampFacebookOptions['feed_name'] : '' ?>'; var theChampFBFeedDesc = '<?php echo (isset($theChampFacebookOptions['feed_description']) && $theChampFacebookOptions['feed_description'] != '') ? trim(preg_replace("/\r?\n/", '\n', $theChampFacebookOptions['feed_description'])) : '' ?>'; var theChampFBFeedLink = '<?php echo (isset($theChampFacebookOptions['feed_link']) && $theChampFacebookOptions['feed_link'] != '') ? $theChampFacebookOptions['feed_link'] : '' ?>'; var theChampFBFeedSource = '<?php echo (isset($theChampFacebookOptions['feedSource']) && $theChampFacebookOptions['feedSource'] != '') ? $theChampFacebookOptions['feedSource'] : '' ?>'; var theChampFBFeedPicture = '<?php echo (isset($theChampFacebookOptions['feedPicture']) && $theChampFacebookOptions['feedPicture'] != '') ? $theChampFacebookOptions['feedPicture'] : '' ?>'; var theChampFBFeedCaption = '<?php echo (isset($theChampFacebookOptions['feed_caption']) && $theChampFacebookOptions['feed_caption'] != '') ? $theChampFacebookOptions['feed_caption'] : '' ?>'; </script>
332
+ <?php
333
+ wp_enqueue_script('the_champ_fb_feed', plugins_url('js/front/facebook/feed.js', __FILE__), false, THE_CHAMP_SS_VERSION);
334
+ }
335
+ // sharing script
336
+ if(the_champ_social_sharing_enabled()){
337
+ global $theChampSharingOptions, $post;
338
+ ?>
339
+ <script> var theChampAjaxUrl = '<?php echo get_admin_url() ?>admin-ajax.php'; var theChampCloseIconPath = '<?php echo plugins_url('images/close.png', __FILE__) ?>'; var theChampPluginIconPath = '<?php echo plugins_url('images/logo.png', __FILE__) ?>'; </script>
340
+ <?php
341
+ wp_enqueue_script('the_champ_share_counts', plugins_url('js/front/sharing/sharing.js', __FILE__), false, THE_CHAMP_SS_VERSION);
342
  }
343
  }
344
 
346
  * Stylesheets to load at front end.
347
  */
348
  function the_champ_frontend_styles(){
349
+ wp_enqueue_style('the-champ-frontend-css', plugins_url('css/front.css', __FILE__), false, THE_CHAMP_SS_VERSION);
350
  }
351
 
352
  /**
360
  $loginPage = add_submenu_page('the-champ', 'The Champ - Social Login', 'Social Login', 'manage_options', 'the-champ-social-login', 'the_champ_social_login_page');
361
  // social sharing page
362
  $sharingPage = add_submenu_page('the-champ', 'The Champ - Social Sharing', 'Social Sharing', 'manage_options', 'the-champ-social-sharing', 'the_champ_social_sharing_page');
363
+ add_action('admin_print_scripts-' . $page, 'the_champ_admin_scripts');
364
  add_action('admin_print_scripts-' . $page, 'the_champ_admin_style');
365
  add_action('admin_print_scripts-' . $page, 'the_champ_fb_sdk_script');
366
  add_action('admin_print_scripts-' . $facebookPage, 'the_champ_admin_scripts');
420
  if(in_array('vkontakte', $loginOptions['providers']) && (!isset($loginOptions['vk_key']) || $loginOptions['vk_key'] == '')){
421
  $errorHtml .= the_champ_error_message('Vkontakte Application ID is required for Vkontakte Login to work');
422
  }
423
+ if(in_array('instagram', $loginOptions['providers']) && (!isset($loginOptions['insta_id']) || $loginOptions['insta_id'] == '')){
424
+ $errorHtml .= the_champ_error_message('Instagram Client ID is required for Instagram Login to work');
425
+ }
426
  }
427
  return $errorHtml;
428
  }
506
  * Include javascript files in admin.
507
  */
508
  function the_champ_admin_scripts(){
509
+ ?>
510
+ <script>var theChampWebsiteUrl = '<?php echo site_url() ?>'; </script>
511
+ <?php
512
  wp_enqueue_script('the_champ_admin_script', plugins_url('js/admin/admin.js', __FILE__), array('jquery', 'jquery-ui-tabs'));
513
  }
514
 
516
  * Include Javascript SDK in admin.
517
  */
518
  function the_champ_fb_sdk_script(){
519
+ wp_enqueue_script('the_champ_fb_sdk_script', plugins_url('js/admin/fb_sdk.js', __FILE__), false, THE_CHAMP_SS_VERSION);
520
  }
521
 
522
  /**
523
  * Include javascript files in admin sharing page.
524
  */
525
  function the_champ_admin_sharing_scripts(){
526
+ wp_enqueue_script('the_champ_sharing', plugins_url('js/admin/sharing/admin.js', __FILE__), array('jquery', 'jquery-ui-sortable'), THE_CHAMP_SS_VERSION);
527
  }
528
 
529
  /**
530
  * Include CSS files in admin.
531
  */
532
  function the_champ_admin_style(){
533
+ wp_enqueue_style('the_champ_admin_style', plugins_url('css/admin.css', __FILE__), false, THE_CHAMP_SS_VERSION);
534
  }
535
 
536
  function the_champ_add_settings_link($links, $file){
679
  // sharing options
680
  add_option('the_champ_sharing', array(
681
  'enable' => '1',
682
+ 'providers' => array('facebook', 'twitter', 'google', 'linkedin', 'pinterest', 'reddit', 'delicious', 'stumbleupon'),
683
+ 'horizontal_re_providers' => array('facebook', 'twitter', 'google', 'linkedin', 'pinterest', 'reddit', 'delicious', 'stumbleupon'),
684
  'title' => 'Share the joy',
685
  'top' => '1',
686
  'bottom' => '1',