Sociable - Version 4.1.8

Version Description

  • FIXED: Some Fixes
Download this release

Release Info

Developer sociable
Plugin Icon wp plugin Sociable
Version 4.1.8
Comparing to
See all releases

Code changes from version 4.1.7 to 4.1.8

Files changed (3) hide show
  1. includes/skyscraper_output.php +1974 -414
  2. readme.txt +11 -5
  3. sociable.php +2818 -580
includes/skyscraper_output.php CHANGED
@@ -2,885 +2,2559 @@
2
 
3
 
4
 
 
 
 
 
5
  /*
6
 
7
 
8
 
 
 
 
 
9
  * The Output And Shortcode Functions For sociable
10
 
11
 
12
 
 
 
 
 
13
  */
14
 
15
 
16
 
17
 
18
 
 
 
 
 
 
 
19
  /*
20
 
21
 
22
 
 
 
 
 
23
  * Returns The Skyscraper Output For The Global $post Object Do Not
24
 
25
 
26
 
 
 
 
 
27
  */
28
 
29
 
30
 
 
 
 
 
31
  function diff_date($date1, $date2){
32
 
 
 
33
 
34
 
 
 
35
 
36
 
 
 
37
  $date1 = mktime(substr($date1,8,2), substr($date1,10,2), substr($date1,12,2), substr($date1,4,2), substr($date1,6,2), substr($date1,0,4));
38
 
 
 
39
  $date2 = mktime(substr($date2,8,2), substr($date2,10,2), substr($date2,12,2), substr($date2,4,2), substr($date2,6,2), substr($date2,0,4));
40
 
 
 
41
 
42
 
 
 
43
  $diff_time = ceil((($date2 - $date1)/60));
44
 
45
 
46
 
 
 
 
 
47
  return $diff_time;
48
 
 
 
49
  }
50
 
51
 
52
 
 
 
 
 
53
 
54
 
 
 
55
 
56
 
57
 
58
 
 
 
 
 
59
  function skyscraper_html( $where = "" ){
60
 
61
 
62
 
 
 
 
 
63
  global $skyscraper_options, $wp_query;
64
 
65
 
66
 
 
 
 
 
67
  if (!is_admin() || 1==1){
68
 
 
 
69
 
70
 
71
 
72
 
 
 
 
 
73
 
74
 
 
 
75
  // echo "<script type='text/javascript'>";
76
 
 
 
77
  // echo "var skyscraper_dir = '".SOCIABLE_HTTP_PATH."' ;";
78
 
 
 
79
  // echo "</script>";
80
 
 
 
81
  echo " var skyscraper_dir = document.createElement('input');
82
 
 
 
83
  skyscraper_dir.id = 'skyscraper_dir';
84
 
 
 
85
  skyscraper_dir.type = 'hidden';
86
 
 
 
87
  skyscraper_dir.value = '".SOCIABLE_HTTP_PATH."';
88
 
 
 
89
  document.body.appendChild(skyscraper_dir); ";
90
 
91
 
92
 
 
 
 
 
93
 
94
 
 
 
95
  $widget_width = str_replace("px", "", $skyscraper_options["widget_width"]);
96
 
 
 
97
 
98
 
 
 
99
  $widget_position = "null";
100
 
 
 
101
  if (isset($skyscraper_options["widget_position"])){
102
 
 
 
103
  $widget_position = 1;
104
 
 
 
105
  }
106
 
 
 
107
 
108
 
 
 
109
  $labels_color = $skyscraper_options["labels_color"];
110
 
 
 
111
  $text_size = str_replace("px", "", $skyscraper_options["text_size"]);
112
 
 
 
113
  $background_color = $skyscraper_options["background_color"];
114
 
 
 
115
 
116
 
 
 
117
  $addWhere = "";
118
 
 
 
119
 
120
 
 
 
121
  if ($where == ""){
122
 
 
 
123
  $addWhere = "var div = document.createElement('div');
124
 
 
 
125
  div.id = 'skyscraper';
126
 
 
 
127
  document.body.appendChild(div);";
128
 
 
 
129
  }
130
 
 
 
131
 
132
 
 
 
133
  $url_site= $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
134
 
 
 
135
 
136
 
 
 
137
  $script = "
138
 
 
 
139
 
140
 
 
 
141
  if (!document.getElementById('fb-root')){
142
 
 
 
143
  var div = document.createElement('div');
144
 
 
 
145
  div.id = 'fb-root';
146
 
 
 
147
  document.body.appendChild(div);
148
 
 
 
149
  }
150
 
 
 
151
 
152
 
 
 
153
  (function(d, s, id) {
154
 
 
 
155
  var js, fjs = d.getElementsByTagName(s)[0];
156
 
 
 
157
  if (d.getElementById(id)) return;
158
 
 
 
159
  js = d.createElement(s); js.id = id;
160
 
 
 
161
  js.src = \"http://connect.facebook.net/en_US/all.js#xfbml=1\";
162
 
 
 
163
  fjs.parentNode.insertBefore(js, fjs);
164
 
 
 
165
  }(document, 'script', 'facebook-jssdk'));
166
 
 
 
167
 
168
 
169
 
170
 
 
 
 
 
171
  (function() {
172
 
 
 
173
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
174
 
 
 
175
  po.src = 'https://apis.google.com/js/plusone.js';
176
 
 
 
177
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
178
 
 
 
179
  })();
180
 
181
 
182
 
 
 
 
 
183
 
184
 
 
 
185
 
186
 
 
 
187
  (function() {
188
 
 
 
189
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
190
 
 
 
191
  po.src = 'http://platform.twitter.com/widgets.js';
192
 
 
 
193
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
194
 
 
 
195
  })();
196
 
 
 
197
 
198
 
 
 
199
  ".$addWhere."
200
 
 
 
201
 
202
 
 
 
203
  jQuery(document).ready(function(){
204
 
 
 
205
 
206
 
 
 
207
  oPlugin.toolbarStart('skyscraper', ".$widget_position.",230,".$widget_width.",'".$background_color."','".$labels_color."',false,'#6A6A6A',".$text_size.",'#587cc8');
208
 
 
 
209
 
210
 
 
 
211
  ".get_share_node()."
212
 
 
 
213
 
214
 
 
 
215
  ".get_counters_node()."
216
 
 
 
217
 
218
 
 
 
219
  ".get_latest_node()."
220
 
 
 
221
 
222
 
 
 
223
  ".get_mentions_node()."
224
 
 
 
225
 
226
 
 
 
227
  ".get_follow_us_node()."
228
 
 
 
229
 
230
 
 
 
231
  ".get_rss_node()."
232
 
233
-
234
 
235
- oPlugin.CreateGoToTop('New_Id_12','Go Top','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gototop.png\" style=\"width:30px;\" />');
236
 
237
 
238
 
239
-
240
 
241
- oPlugin.CreateGoToHome('New_Id_13','Go Home','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gotohome.png\" style=\"width:30px;\" />');
242
 
243
-
244
 
245
- });
246
 
247
-
248
 
249
-
250
 
251
-
252
 
253
- ";
254
 
255
-
256
 
257
 
258
 
259
- echo $script;
260
 
261
-
262
 
263
- }
264
 
265
- }
266
 
267
 
268
 
269
- function get_rss_node(){
270
 
271
 
272
 
273
- $rss_node = "";
274
 
275
- $latest_posts = "";
276
 
277
- global $skyscraper_options;
278
 
279
 
280
 
281
- $version = phpversion();
282
 
283
 
284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  if ( substr($version,0,1) == 5 && isset($skyscraper_options["rss_feed"]) && $skyscraper_options["rss_feed"]!="http://"){
286
 
 
 
287
 
288
 
 
 
289
  include("rss_php.php");
290
 
 
 
291
 
292
 
 
 
293
  $rss = new rss_php;
294
 
 
 
295
  $rss->load($skyscraper_options["rss_feed"]);
296
 
 
 
297
  $items = $rss->getItems();
298
 
 
 
299
 
300
 
 
 
301
  if (!empty($skyscraper_options["rss_feed"])){
302
 
 
 
303
 
304
 
 
 
305
  if (count($items) > 0){
306
 
 
 
307
 
308
 
 
 
309
  $cant = 0;
310
 
 
 
311
  foreach($items as $item){
312
 
 
 
313
 
314
 
 
 
315
  if ($cant <= $skyscraper_options["num_rss"]){
316
 
 
 
317
 
318
 
 
 
319
  $title="";
320
 
 
 
321
  if (isset($item["title"])){
322
 
 
 
323
  $title = addslashes($item["title"]);
324
 
 
 
325
  }
326
 
 
 
327
  $description="";
328
 
 
 
329
  if (isset($item["description"])){
330
 
 
 
331
  $description = addslashes($item["description"]);
332
 
 
 
333
  }
334
 
 
 
335
  $guid="";
336
 
 
 
337
  if (isset($item["link"])){
338
 
 
 
339
  $guid = addslashes($item["link"]);
340
 
 
 
341
  }
342
 
 
 
343
  $pubDate="";
344
 
 
 
345
  if (isset($item["pubDate"])){
346
 
 
 
347
  $pubDate = ago(strtotime($item["pubDate"]));
348
 
 
 
349
  }
350
 
 
 
351
 
352
 
 
 
353
  $latest_posts .= "['".$title."','','".$description."','".$guid."','".$pubDate."'],";
354
 
 
 
355
  }
356
 
 
 
357
  else{
358
 
 
 
359
  break;
360
 
 
 
361
  }
362
 
 
 
363
  $cant++;
364
 
 
 
365
  }
366
 
 
 
367
  $latest_posts = trim($latest_posts, ",");
368
 
 
 
369
  }
370
 
 
 
371
  }
372
 
 
 
373
  }
374
 
 
 
375
 
376
 
 
 
377
  if ($latest_posts != ""){
378
 
 
 
379
 
380
 
 
 
381
  $rss_node = "var LatestBlogPostContent = [
382
 
 
 
383
  ".$latest_posts."
384
 
 
 
385
  ];
386
 
 
 
387
  oPlugin.CreateNode('New_Id_5','Posts','',LatestBlogPostContent,'Notice',220,460);";
388
 
 
 
389
  }
390
 
 
 
391
  return $rss_node;
392
 
 
 
393
  }
394
 
395
 
396
 
 
 
 
 
397
  function get_latest_node(){
398
 
399
 
400
 
 
 
 
 
401
  $latest_node = "";
402
 
 
 
403
  global $skyscraper_options;
404
 
 
 
405
 
406
 
 
 
407
  if ( isset($skyscraper_options["twitter_username"])){
408
 
 
 
409
 
410
 
 
 
411
  $latest_tweets = get_option_tweets("skyscraper_latest");
412
 
 
 
413
  if ($skyscraper_options["twitter_username"] != ""){
414
 
 
 
415
 
416
 
 
 
417
  if ($latest_tweets != ""){
418
 
 
 
419
 
420
 
 
 
421
  $latest_node = "var LastestTwittsContent = [
422
 
 
 
423
  ".$latest_tweets."
424
 
 
 
425
  ];
426
 
 
 
427
 
428
 
429
- oPlugin.CreateNode('New_Id_3','Latest','',LastestTwittsContent,'Notice',220,460);";
430
 
431
- }
432
 
433
- }
434
 
435
- }
436
 
437
- return $latest_node;
438
 
439
- }
440
 
441
 
442
 
443
- function get_mentions_node(){
444
 
445
 
446
 
447
- $mentions_node = "";
448
 
449
-
450
 
451
- global $skyscraper_options;
452
 
453
-
454
 
455
- if ( isset($skyscraper_options["twitter_username"])){
456
 
457
-
458
 
459
- $mentions_tweets = get_option_tweets("skyscraper_mentions");
460
 
461
- if ($skyscraper_options["twitter_username"] != ""){
462
 
463
-
464
 
465
- if ($mentions_tweets != "" ){
466
 
467
-
468
 
469
- $mentions_node = "var TweetsMentionsContent = [
470
 
471
- ".$mentions_tweets."
472
 
473
- ];
474
 
475
- oPlugin.CreateNode('New_Id_4','Mentions','',TweetsMentionsContent,'Notice',220,460);";
476
 
477
- }
478
 
479
- }
480
 
481
- }
482
 
483
- return $mentions_node;
484
 
485
- }
486
 
 
487
 
488
 
489
- function get_counters_node(){
490
 
491
 
492
 
 
 
493
  global $skyscraper_options;
494
 
495
- global $title_shared;
496
 
497
- global $url_shares;
498
 
499
 
500
 
501
- $counters_node = "";
502
-
503
 
504
 
505
- /*
506
 
507
-
508
 
509
- <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><span><a href="http://twitter.com/share" style="color:#ffffff" class="twitter-share-button" data-url="" data-text="" data-count="vertical" data-via="gBrowser" data-lang="en">Tweet</a></span>
510
 
511
 
512
 
513
- */
514
 
515
- if ((!empty($skyscraper_options["counters"]["check"]))){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
 
517
 
518
 
 
 
519
  $counters_node = " var url = '". addslashes(trim($url_shares))."';
520
 
 
 
521
  var title = '".addslashes(trim($title_shared)) ."';
522
 
 
 
523
 
524
 
 
 
525
  var counter = '<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" ><tr><td style=\"height:72px;width:50px;\" align=\"center\">';
526
 
 
 
527
  counter += '<div class=\"fb-like\" data-send=\"false\" data-layout=\"box_count\" data-width=\"50\" data-href=\"'+url+'\" data-show-faces=\"false\"></div>';
528
 
 
 
529
  counter += '</td></tr>';
530
 
 
 
531
  counter += '<tr><td align=\"center\">';
532
 
 
 
533
  counter +=' <div class=\"g-plusone\" data-size=\"tall\" data-href=\"'+url+'\"></div>';
534
 
 
 
535
  counter += '</td></tr>';
536
 
 
 
537
  counter += '<tr><td align=\"center\" style=\"height:72px\">';
538
 
 
 
539
  counter += '<a href=\"https://twitter.com/share\" data-with=\"50\" data-text=\"'+ title +' (via @sociablesite)\" data-url=\"'+ url + '\" class=\"twitter-share-button\" data-count=\"vertical\">Tweet</a>';
540
 
 
 
541
  counter += '</td></tr>';
542
 
 
 
543
  counter += '</table>';
544
 
 
 
545
 
546
 
 
 
547
  oPlugin.CreateSimpleNode('New_Id_2','Counters<br/>', counter ,".$skyscraper_options["counters"]["folded"].");
548
 
 
 
549
  ";
550
 
 
 
551
  }
552
 
 
 
553
 
554
 
 
 
555
  return $counters_node;
556
 
557
 
558
 
 
 
 
 
559
  }
560
 
561
 
562
 
 
 
 
 
563
  function get_share_node(){
564
 
 
 
565
 
566
 
 
 
567
  global $skyscraper_options;
568
 
 
 
569
 
570
 
 
 
571
  $share_node = "";
572
 
 
 
573
 
574
 
 
 
575
  if (!empty($skyscraper_options["share"]["check"])){
576
 
577
 
578
 
 
 
 
 
579
  $share_buttons = share_links();
580
 
 
 
581
  $share_node = "oPlugin.CreateSimpleNode('New_Id_1','Share', '".$share_buttons."',".$skyscraper_options["share"]["folded"].");";
582
 
583
- }
584
 
585
-
586
 
587
- return $share_node;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
588
 
 
589
 
590
 
591
- }
592
 
593
 
594
 
595
- function get_follow_us_node(){
596
 
597
 
 
598
 
599
- $follow_us_node = "";
600
 
601
- global $skyscraper_options;
602
 
603
-
604
 
605
- if (isset($skyscraper_options["follow_us"])){
606
 
607
-
608
 
609
- $follow_info = empty_accounts();
610
 
611
-
612
 
613
- if ( $follow_info["active"] > 0 && ($follow_info["empty"] < $follow_info["active"])){
614
 
615
-
616
 
617
- $follow_us_node = "oPlugin.CreateNode('New_Id_6','Follow', '', '".follow_links()."','Plano',40,140)";
618
 
619
- }
620
 
621
- }
622
 
623
- return $follow_us_node;
624
 
625
- }
626
 
627
 
628
 
629
- function empty_accounts(){
630
 
631
 
632
 
633
- $empty = 0;
634
 
635
- $active = 0;
636
 
637
- global $skyscraper_options;
638
 
639
-
640
 
641
- foreach($skyscraper_options["follow_us"] as $follow_us){
642
 
643
-
644
 
645
- if (empty($follow_us["account"])){
646
 
647
- $empty++;
648
 
649
- }
650
 
651
-
652
 
653
- if (isset($follow_us["active"])){
654
 
655
- $active++;
656
 
657
- }
658
 
659
- }
660
 
661
-
662
 
663
- return array("empty" =>$empty, "active"=>$active);
664
 
665
- }
666
 
667
 
668
 
669
- function follow_links(){
670
 
671
 
672
 
673
- global $skyscraper_options;
674
 
675
-
676
 
677
- $follow_buttons = "";
678
 
679
-
680
 
681
- foreach($skyscraper_options["follow_us"] as $follow_us){
682
 
683
-
684
 
685
- $follow_us["account"]= trim($follow_us["account"]);
686
 
687
-
688
 
689
- if (!empty($follow_us["active"]) && !empty($follow_us["account"]) ){
690
 
691
-
692
 
693
- $follow_us["account"] = str_replace("http://", "", $follow_us["account"]);
694
 
695
- $follow_us["account"] = "http://".$follow_us["account"];
696
 
697
-
698
 
699
- $follow_buttons .= "<a target=\'_blank\' rel=\'nofollow\' href=\'".$follow_us["account"]."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".$follow_us["logo"]."\' /></a>";
700
 
701
  }
702
 
703
- }
704
 
705
-
706
 
707
- return $follow_buttons;
708
 
709
- }
710
 
711
 
712
 
713
- function share_links(){
714
 
715
-
716
 
717
- $url = addslashes(get_bloginfo('wpurl'));
718
 
719
- $blogname = addslashes(get_bloginfo('name'));
720
 
721
 
722
- global $title_shared;
723
 
724
- global $url_shares;
725
 
726
-
727
-
728
 
729
- $page = trim(addslashes($url_shares));
730
 
731
- $permalink = trim(addslashes($url_shares));
732
 
733
 
734
 
735
- $title = trim(addslashes($title_shared));
736
 
737
 
738
 
739
-
740
 
741
- $share_links = array();
742
 
743
- $share_links = array(
744
 
745
-
746
 
747
- "twitter" => array('favicon' => 't.png',
748
 
749
- 'url' => 'http://twitter.com/intent/tweet?text='.$title.'%20-%20'.$permalink.'%20(via%20@sociablesite)',
750
 
751
- 'title' => "Share on Twitter"),
752
 
753
-
754
 
755
- "facebook" => array('favicon' => 'f.png',
756
 
757
- 'url' => 'http://www.facebook.com/share.php?u='.$permalink.'&amp;t='.$title.'',
758
 
759
- 'title' => "Share on Facebook"),
760
 
761
-
762
 
763
- "google" => array('favicon' => 'g.png',
764
 
765
- 'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su='.$title.'&body='.$permalink.'&ui=2&tf=1&shva=1',
766
 
767
- 'title' => "Share on Gmail"),
768
 
769
-
770
 
771
- "favorites" => array('favicon' => 'fv.png',
772
 
773
- 'url' => 'javascript:AddToFavorites();',
774
 
775
- 'title' => "Add to favorites - doesn\'t work in Chrome"),
776
 
777
-
778
 
779
- "stumble" => array('favicon' => 's.png',
780
 
781
- 'url' => 'http://www.stumbleupon.com/submit?url='.$permalink.'&title='.$title.'',
782
 
783
- 'title' => "Share on StumpleUpon"),
784
 
785
-
786
 
787
- "delicious" => array('favicon' => 'o.png',
788
 
789
- 'url' => 'http://delicious.com/post?url='.$permalink.'&amp;title='.$title.'&amp;notes=EXCERPT',
790
 
791
- "title" => "Share on delicious"),
792
 
793
-
794
 
795
- "reader" => array('favicon' => 'n.png',
796
 
797
- 'url' => 'http://www.google.com/reader/link?url='.$permalink.'&amp;title='.$title.'&amp;srcURL='.$permalink.'&amp;srcTitle='.$blogname.'',
798
 
799
- "title" => "Share on Google Reader"),
800
 
801
-
802
 
803
- "linkedin" => array('favicon' => 'i.png',
804
 
805
- 'url' => 'http://www.linkedin.com/shareArticle?mini=true&amp;url='.$permalink.'&amp;title='.$title.'&amp;source='.$blogname.'&amp;summary=EXCERPT',
806
 
807
- "title" => "Share on LinkedIn")
808
 
809
-
810
 
811
- );
812
 
813
-
814
 
815
- $share_buttons = "";
816
 
817
-
818
 
819
- foreach($share_links as $link){
820
 
821
-
822
 
823
- $share_buttons .= "<a target=\'_blank\' rel=\'nofollow\' href=\'".addslashes($link["url"])."\' title=\'".addslashes($link["title"])."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".addslashes($link["favicon"])."\' /></a>";
824
 
825
- }
826
 
827
-
828
 
829
- return $share_buttons;
830
 
831
- }
832
 
833
 
834
 
 
835
 
836
 
837
 
 
838
 
839
- /*
840
 
841
 
 
842
 
843
- * Template Tag To Echo The Sociable 2 HTML
844
 
845
 
 
846
 
847
- */
848
 
849
 
 
850
 
851
- function do_skyscraper(){
852
 
853
 
 
854
 
855
- echo skyscraper_html();
856
 
857
 
 
858
 
859
- }
860
 
861
 
 
862
 
863
 
864
 
 
865
 
866
 
867
- /*
868
 
 
869
 
870
 
871
- * Sociable 2 Shortcode
872
 
 
873
 
874
 
875
- */
876
 
 
877
 
878
 
879
- function skyscraper_shortcode(){
880
 
 
881
 
882
 
883
- return skyscraper_html();
 
884
 
885
 
886
 
@@ -888,674 +2562,560 @@ function skyscraper_shortcode(){
888
 
889
 
890
 
891
- function auto_skyscraper($content){
892
 
893
-
894
 
895
- global $skyscraper_options;
896
 
897
-
898
 
899
- if( ! isset( $skyscraper_options['active'] ) ){
900
 
901
-
902
 
903
- $content = "";
904
 
905
- return $content;
906
 
907
- }
908
 
909
-
910
 
911
-
912
 
913
- if( ! isset( $skyscraper_options['locations'] ) || ! is_array( $skyscraper_options['locations'] ) || empty( $skyscraper_options['locations'] ) ){
914
 
915
-
916
 
917
- $content = "";
918
 
 
919
 
920
 
921
- } else {
922
 
923
-
924
 
925
- $locations = $skyscraper_options['locations'];
926
 
927
 
928
 
929
- }
930
 
931
 
932
 
933
- /*
934
 
935
 
936
 
937
- * Determine if we are supposed to be displaying the output here.
938
 
 
939
 
940
 
941
- */
 
942
 
943
 
944
 
945
- $display = false;
946
 
947
 
948
 
949
-
950
 
 
951
 
952
 
953
- /*
954
 
 
955
 
956
 
957
- * is_single is a unique case it still returning true
958
 
 
959
 
960
 
961
- */
962
 
963
-
964
 
965
 
966
 
967
- //If We Can Verify That We are in the correct loaction, simply add something to the $display array, and test for a true result to continue.
968
 
 
969
 
970
 
971
- foreach( $locations as $location => $val ){
972
 
973
-
974
 
975
 
976
 
977
- //First We Handle is_single() so it returning true on Single Post Type Pages is not an issue, this is not the intended functionality of this plugin
978
 
 
979
 
980
 
981
- if( $location == 'is_single' ){
982
 
 
983
 
984
 
985
- //If we are not in a post, lets ignore this one for now
986
 
 
987
 
988
 
989
- if( is_single() && get_post_type() == 'post' ){
990
 
991
 
992
 
993
- $display = true;
994
 
995
 
 
996
 
997
- break;
998
 
999
 
 
1000
 
1001
- } else {
1002
 
1003
 
1004
 
1005
- continue; // So not to trigger is_single later in this loop, but still be allowed to handle others
1006
 
1007
 
1008
 
1009
- }
1010
 
1011
 
1012
 
1013
-
1014
 
 
1015
 
1016
 
1017
- } elseif( strpos( $location , 'is_single_posttype_' ) === 0 ){ //Now We Need To Check For The Variable Names, Taxonomy Archives, Post Type Archives and Single Custom Post Types.
1018
 
 
1019
 
1020
 
1021
-
1022
 
 
1023
 
1024
 
1025
- //Single Custom Post Type
1026
 
 
1027
 
1028
 
1029
- $post_type = str_replace( 'is_single_posttype_' , '' , $location );
1030
 
 
1031
 
1032
 
1033
- if( is_single() && get_post_type() == $post_type ){
1034
 
 
1035
 
1036
 
1037
- $display = true;
1038
 
 
1039
 
1040
 
1041
- break;
1042
 
 
1043
 
1044
 
1045
- }
1046
 
 
1047
 
1048
 
1049
-
1050
 
 
1051
 
1052
 
1053
- } elseif( strpos( $location , 'is_posttype_archive_' ) === 0 ){
1054
 
 
1055
 
1056
 
1057
-
1058
 
 
1059
 
1060
 
1061
- //Custom Post Type Archive
1062
 
 
1063
 
1064
 
1065
- $post_type = str_replace( 'is_posttype_archive_' , '' , $location );
1066
 
 
1067
 
1068
 
1069
- if( is_post_type_archive( $post_type ) ){
1070
 
 
1071
 
1072
 
1073
- $display = true;
1074
 
 
1075
 
1076
 
1077
- break;
1078
 
 
1079
 
1080
 
1081
- }
1082
 
 
1083
 
1084
 
1085
-
1086
 
 
1087
 
1088
 
1089
- } elseif( strpos( $location , 'is_taxonomy_archive_' ) === 0 ) {
1090
 
 
1091
 
1092
 
1093
-
1094
 
 
1095
 
1096
 
1097
- //Taxonomy Archive
1098
 
 
1099
 
1100
 
1101
- $taxonomy = str_replace( 'is_taxonomy_archive_' , '' , $location );
1102
 
 
1103
 
1104
 
1105
- if( is_tax( $taxonomy ) ){
1106
 
 
1107
 
1108
 
1109
- $display = true;
1110
 
 
1111
 
1112
 
1113
- break;
1114
 
 
1115
 
1116
 
1117
- }
1118
 
 
1119
 
1120
 
1121
-
1122
 
 
1123
 
1124
 
1125
- } elseif( function_exists( $location ) ) {
1126
 
 
1127
 
1128
 
1129
-
1130
 
 
1131
 
1132
 
1133
- //Standard conditional tag, these will return BOOL
1134
 
 
1135
 
1136
 
1137
- if( call_user_func( $location ) === true ){
1138
 
1139
 
1140
 
1141
- $display = true;
1142
 
1143
 
 
1144
 
1145
- break;
1146
 
1147
 
 
1148
 
1149
- }
1150
 
1151
 
 
1152
 
1153
-
1154
 
1155
 
 
1156
 
1157
- } else {
1158
 
1159
 
 
1160
 
1161
- continue;
1162
 
1163
 
 
1164
 
1165
- }
1166
 
1167
 
 
1168
 
1169
-
1170
 
1171
 
 
1172
 
1173
-
1174
 
1175
 
 
1176
 
1177
- }
1178
 
1179
 
 
1180
 
1181
-
1182
 
1183
 
 
1184
 
1185
- //If We have passed all the checks and are looking in the right place lets do this thang
1186
 
1187
 
 
1188
 
1189
- if( isset( $skyscraper_options['automatic_mode'] ) && $display === true ){
1190
 
1191
 
 
1192
 
1193
- if (isset($skyscraper_options["topandbottom"])){
1194
 
1195
 
 
1196
 
1197
- $content = skyscraper_html();
1198
 
1199
 
 
1200
 
1201
- }else{
1202
 
1203
 
 
1204
 
1205
- $content = skyscraper_html();
1206
 
1207
 
 
1208
 
1209
- }
1210
 
1211
 
 
1212
 
1213
- }
1214
 
1215
- else{
1216
 
1217
- $content = skyscraper_html();
1218
 
1219
- }
1220
 
1221
-
1222
 
1223
-
1224
 
1225
 
1226
 
1227
-
1228
 
1229
 
1230
 
1231
- return $content;
1232
 
1233
- }
1234
 
1235
 
1236
 
 
1237
 
1238
 
1239
- function get_tweets_username($username_complete){
1240
 
1241
 
1242
 
1243
- if (function_exists('curl_init')) {
1244
 
1245
-
1246
 
1247
- // last tweets
1248
 
1249
- $username = str_replace("@", "", $username_complete);
1250
 
1251
- $url = "https://api.twitter.com/1/statuses/user_timeline/".$username.".json";
1252
 
1253
- $latest = curl_call($url);
1254
 
1255
- $latest_row = parser_twitter_results($latest,0);
1256
 
1257
- update_option( "skyscraper_latest", $latest_row );
1258
 
1259
 
1260
 
1261
- // last mentions
1262
 
1263
- $url = "http://search.twitter.com/search.json?q=@".$username."&rpp=5&include_entities=true&result_type=mixed";
1264
 
1265
- $mentions = curl_call($url);
1266
 
1267
-
1268
 
1269
- if (count($mentions["results"]) > 1){
1270
 
1271
-
1272
 
1273
- $mentions_row = parser_twitter_results($mentions["results"],1);
1274
 
1275
- update_option( "skyscraper_mentions", $mentions_row );
1276
 
1277
- }
1278
 
1279
- }
1280
 
1281
- }
1282
 
 
1283
 
1284
 
1285
- function ago($time){
1286
 
 
1287
 
1288
 
1289
- $periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
1290
 
1291
- $lengths = array("60","60","24","7","4.35","12","10");
1292
 
1293
 
1294
 
1295
- $now = time();
1296
 
1297
 
1298
 
1299
- $difference = $now - $time;
1300
 
1301
- $tense = "ago";
1302
 
1303
 
 
1304
 
1305
- for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
1306
 
1307
- $difference /= $lengths[$j];
1308
 
1309
- }
1310
 
1311
 
1312
 
1313
- $difference = round($difference);
1314
 
1315
 
1316
 
1317
- if($difference != 1) {
1318
 
1319
- $periods[$j].= "s";
1320
 
1321
- }
1322
 
 
1323
 
1324
 
1325
- return $difference." ".$periods[$j]."ago";
1326
 
1327
- }
1328
 
1329
 
1330
 
 
1331
 
1332
 
1333
- function parser_twitter_results($results = array(), $mention){
1334
 
1335
 
1336
 
1337
- $options_latest = array();
1338
-
1339
- $options_latest = array("date" => date("YmdHis"));
1340
 
1341
- global $skyscraper_options;
1342
 
1343
- $i = 0;
1344
 
1345
-
1346
 
1347
- if (is_array($results)){
1348
 
1349
-
1350
 
1351
- foreach($results as $tweet){
1352
 
1353
-
1354
 
1355
- $options_latest[$i] = array();
1356
 
1357
- $options_latest[$i]["text"] = $tweet["text"];
1358
 
1359
- $options_latest[$i]["created_at"] = ago(strtotime($tweet["created_at"]));
1360
 
1361
-
1362
 
1363
- if ($mention){
1364
 
1365
- $options_latest[$i]["name"] = $tweet["from_user_name"];
1366
 
1367
- }
1368
 
1369
- else{
1370
 
1371
- $options_latest[$i]["name"] = $tweet["user"]["name"];
1372
 
1373
- }
1374
 
1375
-
1376
 
1377
- $i++;
1378
 
1379
- if ($i == $skyscraper_options["num_tweets"]){
1380
 
1381
- break;
1382
 
1383
- }
1384
 
1385
- }
1386
 
1387
- }
1388
 
1389
-
1390
 
1391
- return $options_latest;
1392
 
1393
- }
1394
 
 
1395
 
1396
 
1397
- function curl_call($url){
1398
 
1399
-
1400
 
1401
- $ch = curl_init();
1402
 
1403
- curl_setopt($ch, CURLOPT_URL, $url);
1404
 
1405
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
1406
 
1407
- curl_setopt($ch, CURLOPT_TIMEOUT, 3);
1408
 
1409
- curl_setopt($ch, CURLINFO_HEADER_OUT, true);
1410
 
1411
- $output = curl_exec($ch);
1412
 
1413
- $info = curl_getinfo($ch);
1414
 
1415
- curl_close($ch);
1416
 
1417
 
1418
 
1419
- if ($info["http_code"] == "200"){
1420
 
1421
-
1422
 
1423
- $return = json_decode($output,1);
1424
 
1425
- }
1426
 
1427
- else{
1428
 
1429
- $return = false;
1430
 
1431
- }
1432
 
1433
-
1434
 
1435
- return $return;
1436
 
1437
- }
1438
 
1439
 
 
1440
 
1441
- function get_option_tweets($option){
1442
 
1443
-
1444
 
1445
- global $skyscraper_options;
1446
 
1447
- $skyscraper_latest = get_option($option);
1448
 
1449
-
1450
 
1451
- if (empty($skyscraper_latest)){
1452
 
1453
-
1454
 
1455
- get_tweets_username($skyscraper_options["twitter_username"]);
1456
 
1457
- $skyscraper_latest = get_option($option);
1458
 
1459
- }
1460
 
1461
- else{
1462
 
1463
-
1464
 
1465
- // 5 minutes
1466
 
1467
- if (diff_date($skyscraper_latest["date"], date("YmdHis")) > 5){
1468
 
1469
-
1470
 
1471
- get_tweets_username($skyscraper_options["twitter_username"]);
1472
 
1473
- $skyscraper_latest = get_option($option);
1474
 
1475
- }
1476
 
1477
- }
1478
 
1479
-
1480
 
1481
-
1482
 
1483
- return generate_tweets_box_content($skyscraper_latest);
1484
 
1485
- }
1486
 
1487
 
1488
 
1489
- function generate_tweets_box_content($tweets){
1490
 
1491
 
1492
 
1493
- $content = "";
1494
 
1495
- if (isset($tweets["date"])){
1496
 
1497
- unset($tweets["date"]);
1498
 
1499
- }
1500
 
1501
-
1502
 
1503
-
1504
 
1505
- foreach($tweets as $tweet){
1506
 
1507
-
1508
 
1509
- $tweet["name"] = addslashes($tweet["name"]);
1510
 
1511
- $tweet["text"] = addslashes($tweet["text"]);
1512
 
1513
-
1514
 
1515
- $content .= "['".$tweet["name"]."','".$tweet["name"]."','".$tweet["text"]."','','".$tweet["created_at"]."'],";
1516
 
1517
- }
1518
 
1519
- $content = trim(trim(trim($content), ","));
1520
 
1521
-
1522
 
1523
- return $content;
1524
 
1525
- }
1526
 
 
1527
 
1528
 
1529
- if (!empty($_GET["sky"])){
1530
 
1531
 
1532
 
1533
- add_action('wp_ajax_my_action', 'my_action_callback');
1534
 
1535
 
 
1536
 
1537
- function my_action_callback() {
1538
 
1539
- global $wpdb; global $skyscraper_options; // this is how you get access to the database
1540
 
1541
 
1542
 
1543
- $whatever = intval( $_POST['whatever'] );
1544
 
1545
 
 
1546
 
1547
- $whatever += 10;
1548
 
1549
 
1550
 
1551
- echo $whatever;
1552
 
1553
 
1554
 
1555
  die(); // this is required to return a proper result
1556
 
 
 
1557
  }
1558
 
 
 
1559
  }
1560
 
 
 
1561
  ?>
2
 
3
 
4
 
5
+
6
+
7
+
8
+
9
  /*
10
 
11
 
12
 
13
+
14
+
15
+
16
+
17
  * The Output And Shortcode Functions For sociable
18
 
19
 
20
 
21
+
22
+
23
+
24
+
25
  */
26
 
27
 
28
 
29
 
30
 
31
+
32
+
33
+
34
+
35
+
36
+
37
  /*
38
 
39
 
40
 
41
+
42
+
43
+
44
+
45
  * Returns The Skyscraper Output For The Global $post Object Do Not
46
 
47
 
48
 
49
+
50
+
51
+
52
+
53
  */
54
 
55
 
56
 
57
+
58
+
59
+
60
+
61
  function diff_date($date1, $date2){
62
 
63
+
64
+
65
 
66
 
67
+
68
+
69
 
70
 
71
+
72
+
73
  $date1 = mktime(substr($date1,8,2), substr($date1,10,2), substr($date1,12,2), substr($date1,4,2), substr($date1,6,2), substr($date1,0,4));
74
 
75
+
76
+
77
  $date2 = mktime(substr($date2,8,2), substr($date2,10,2), substr($date2,12,2), substr($date2,4,2), substr($date2,6,2), substr($date2,0,4));
78
 
79
+
80
+
81
 
82
 
83
+
84
+
85
  $diff_time = ceil((($date2 - $date1)/60));
86
 
87
 
88
 
89
+
90
+
91
+
92
+
93
  return $diff_time;
94
 
95
+
96
+
97
  }
98
 
99
 
100
 
101
+
102
+
103
+
104
+
105
 
106
 
107
+
108
+
109
 
110
 
111
 
112
 
113
+
114
+
115
+
116
+
117
  function skyscraper_html( $where = "" ){
118
 
119
 
120
 
121
+
122
+
123
+
124
+
125
  global $skyscraper_options, $wp_query;
126
 
127
 
128
 
129
+
130
+
131
+
132
+
133
  if (!is_admin() || 1==1){
134
 
135
+
136
+
137
 
138
 
139
 
140
 
141
+
142
+
143
+
144
+
145
 
146
 
147
+
148
+
149
  // echo "<script type='text/javascript'>";
150
 
151
+
152
+
153
  // echo "var skyscraper_dir = '".SOCIABLE_HTTP_PATH."' ;";
154
 
155
+
156
+
157
  // echo "</script>";
158
 
159
+
160
+
161
  echo " var skyscraper_dir = document.createElement('input');
162
 
163
+
164
+
165
  skyscraper_dir.id = 'skyscraper_dir';
166
 
167
+
168
+
169
  skyscraper_dir.type = 'hidden';
170
 
171
+
172
+
173
  skyscraper_dir.value = '".SOCIABLE_HTTP_PATH."';
174
 
175
+
176
+
177
  document.body.appendChild(skyscraper_dir); ";
178
 
179
 
180
 
181
+
182
+
183
+
184
+
185
 
186
 
187
+
188
+
189
  $widget_width = str_replace("px", "", $skyscraper_options["widget_width"]);
190
 
191
+
192
+
193
 
194
 
195
+
196
+
197
  $widget_position = "null";
198
 
199
+
200
+
201
  if (isset($skyscraper_options["widget_position"])){
202
 
203
+
204
+
205
  $widget_position = 1;
206
 
207
+
208
+
209
  }
210
 
211
+
212
+
213
 
214
 
215
+
216
+
217
  $labels_color = $skyscraper_options["labels_color"];
218
 
219
+
220
+
221
  $text_size = str_replace("px", "", $skyscraper_options["text_size"]);
222
 
223
+
224
+
225
  $background_color = $skyscraper_options["background_color"];
226
 
227
+
228
+
229
 
230
 
231
+
232
+
233
  $addWhere = "";
234
 
235
+
236
+
237
 
238
 
239
+
240
+
241
  if ($where == ""){
242
 
243
+
244
+
245
  $addWhere = "var div = document.createElement('div');
246
 
247
+
248
+
249
  div.id = 'skyscraper';
250
 
251
+
252
+
253
  document.body.appendChild(div);";
254
 
255
+
256
+
257
  }
258
 
259
+
260
+
261
 
262
 
263
+
264
+
265
  $url_site= $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
266
 
267
+
268
+
269
 
270
 
271
+
272
+
273
  $script = "
274
 
275
+
276
+
277
 
278
 
279
+
280
+
281
  if (!document.getElementById('fb-root')){
282
 
283
+
284
+
285
  var div = document.createElement('div');
286
 
287
+
288
+
289
  div.id = 'fb-root';
290
 
291
+
292
+
293
  document.body.appendChild(div);
294
 
295
+
296
+
297
  }
298
 
299
+
300
+
301
 
302
 
303
+
304
+
305
  (function(d, s, id) {
306
 
307
+
308
+
309
  var js, fjs = d.getElementsByTagName(s)[0];
310
 
311
+
312
+
313
  if (d.getElementById(id)) return;
314
 
315
+
316
+
317
  js = d.createElement(s); js.id = id;
318
 
319
+
320
+
321
  js.src = \"http://connect.facebook.net/en_US/all.js#xfbml=1\";
322
 
323
+
324
+
325
  fjs.parentNode.insertBefore(js, fjs);
326
 
327
+
328
+
329
  }(document, 'script', 'facebook-jssdk'));
330
 
331
+
332
+
333
 
334
 
335
 
336
 
337
+
338
+
339
+
340
+
341
  (function() {
342
 
343
+
344
+
345
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
346
 
347
+
348
+
349
  po.src = 'https://apis.google.com/js/plusone.js';
350
 
351
+
352
+
353
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
354
 
355
+
356
+
357
  })();
358
 
359
 
360
 
361
+
362
+
363
+
364
+
365
 
366
 
367
+
368
+
369
 
370
 
371
+
372
+
373
  (function() {
374
 
375
+
376
+
377
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
378
 
379
+
380
+
381
  po.src = 'http://platform.twitter.com/widgets.js';
382
 
383
+
384
+
385
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
386
 
387
+
388
+
389
  })();
390
 
391
+
392
+
393
 
394
 
395
+
396
+
397
  ".$addWhere."
398
 
399
+
400
+
401
 
402
 
403
+
404
+
405
  jQuery(document).ready(function(){
406
 
407
+
408
+
409
 
410
 
411
+
412
+
413
  oPlugin.toolbarStart('skyscraper', ".$widget_position.",230,".$widget_width.",'".$background_color."','".$labels_color."',false,'#6A6A6A',".$text_size.",'#587cc8');
414
 
415
+
416
+
417
 
418
 
419
+
420
+
421
  ".get_share_node()."
422
 
423
+
424
+
425
 
426
 
427
+
428
+
429
  ".get_counters_node()."
430
 
431
+
432
+
433
 
434
 
435
+
436
+
437
  ".get_latest_node()."
438
 
439
+
440
+
441
 
442
 
443
+
444
+
445
  ".get_mentions_node()."
446
 
447
+
448
+
449
 
450
 
451
+
452
+
453
  ".get_follow_us_node()."
454
 
455
+
456
+
457
 
458
 
459
+
460
+
461
  ".get_rss_node()."
462
 
 
463
 
 
464
 
465
 
466
 
 
467
 
 
468
 
469
+ oPlugin.CreateGoToTop('New_Id_12','Top','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gototop.png\" style=\"width:30px;\" />');
470
 
 
471
 
 
472
 
473
+
474
 
 
475
 
 
476
 
477
+
478
 
479
 
480
 
481
+ oPlugin.CreateGoToHome('New_Id_13','Go Home','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gotohome.png\" style=\"width:30px;\" />');
482
 
 
483
 
 
484
 
485
+
486
 
487
 
488
 
489
+ });
490
 
491
 
492
 
493
+
494
 
 
495
 
 
496
 
497
 
498
 
499
+
500
 
501
 
502
 
503
+
504
+
505
+ ";
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+ echo $script;
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+ }
526
+
527
+
528
+
529
+ }
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+ function get_rss_node(){
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+ $rss_node = "";
546
+
547
+
548
+
549
+ $latest_posts = "";
550
+
551
+
552
+
553
+ global $skyscraper_options;
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+ $version = phpversion();
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
  if ( substr($version,0,1) == 5 && isset($skyscraper_options["rss_feed"]) && $skyscraper_options["rss_feed"]!="http://"){
570
 
571
+
572
+
573
 
574
 
575
+
576
+
577
  include("rss_php.php");
578
 
579
+
580
+
581
 
582
 
583
+
584
+
585
  $rss = new rss_php;
586
 
587
+
588
+
589
  $rss->load($skyscraper_options["rss_feed"]);
590
 
591
+
592
+
593
  $items = $rss->getItems();
594
 
595
+
596
+
597
 
598
 
599
+
600
+
601
  if (!empty($skyscraper_options["rss_feed"])){
602
 
603
+
604
+
605
 
606
 
607
+
608
+
609
  if (count($items) > 0){
610
 
611
+
612
+
613
 
614
 
615
+
616
+
617
  $cant = 0;
618
 
619
+
620
+
621
  foreach($items as $item){
622
 
623
+
624
+
625
 
626
 
627
+
628
+
629
  if ($cant <= $skyscraper_options["num_rss"]){
630
 
631
+
632
+
633
 
634
 
635
+
636
+
637
  $title="";
638
 
639
+
640
+
641
  if (isset($item["title"])){
642
 
643
+
644
+
645
  $title = addslashes($item["title"]);
646
 
647
+
648
+
649
  }
650
 
651
+
652
+
653
  $description="";
654
 
655
+
656
+
657
  if (isset($item["description"])){
658
 
659
+
660
+
661
  $description = addslashes($item["description"]);
662
 
663
+
664
+
665
  }
666
 
667
+
668
+
669
  $guid="";
670
 
671
+
672
+
673
  if (isset($item["link"])){
674
 
675
+
676
+
677
  $guid = addslashes($item["link"]);
678
 
679
+
680
+
681
  }
682
 
683
+
684
+
685
  $pubDate="";
686
 
687
+
688
+
689
  if (isset($item["pubDate"])){
690
 
691
+
692
+
693
  $pubDate = ago(strtotime($item["pubDate"]));
694
 
695
+
696
+
697
  }
698
 
699
+
700
+
701
 
702
 
703
+
704
+
705
  $latest_posts .= "['".$title."','','".$description."','".$guid."','".$pubDate."'],";
706
 
707
+
708
+
709
  }
710
 
711
+
712
+
713
  else{
714
 
715
+
716
+
717
  break;
718
 
719
+
720
+
721
  }
722
 
723
+
724
+
725
  $cant++;
726
 
727
+
728
+
729
  }
730
 
731
+
732
+
733
  $latest_posts = trim($latest_posts, ",");
734
 
735
+
736
+
737
  }
738
 
739
+
740
+
741
  }
742
 
743
+
744
+
745
  }
746
 
747
+
748
+
749
 
750
 
751
+
752
+
753
  if ($latest_posts != ""){
754
 
755
+
756
+
757
 
758
 
759
+
760
+
761
  $rss_node = "var LatestBlogPostContent = [
762
 
763
+
764
+
765
  ".$latest_posts."
766
 
767
+
768
+
769
  ];
770
 
771
+
772
+
773
  oPlugin.CreateNode('New_Id_5','Posts','',LatestBlogPostContent,'Notice',220,460);";
774
 
775
+
776
+
777
  }
778
 
779
+
780
+
781
  return $rss_node;
782
 
783
+
784
+
785
  }
786
 
787
 
788
 
789
+
790
+
791
+
792
+
793
  function get_latest_node(){
794
 
795
 
796
 
797
+
798
+
799
+
800
+
801
  $latest_node = "";
802
 
803
+
804
+
805
  global $skyscraper_options;
806
 
807
+
808
+
809
 
810
 
811
+
812
+
813
  if ( isset($skyscraper_options["twitter_username"])){
814
 
815
+
816
+
817
 
818
 
819
+
820
+
821
  $latest_tweets = get_option_tweets("skyscraper_latest");
822
 
823
+
824
+
825
  if ($skyscraper_options["twitter_username"] != ""){
826
 
827
+
828
+
829
 
830
 
831
+
832
+
833
  if ($latest_tweets != ""){
834
 
835
+
836
+
837
 
838
 
839
+
840
+
841
  $latest_node = "var LastestTwittsContent = [
842
 
843
+
844
+
845
  ".$latest_tweets."
846
 
847
+
848
+
849
  ];
850
 
851
+
852
+
853
 
854
 
 
855
 
 
856
 
857
+ oPlugin.CreateNode('New_Id_3','Latest','',LastestTwittsContent,'Notice',220,460);";
858
 
 
859
 
 
860
 
861
+ }
862
 
863
 
864
 
865
+ }
866
 
867
 
868
 
869
+ }
870
 
 
871
 
 
872
 
873
+ return $latest_node;
874
 
 
875
 
 
876
 
877
+ }
878
 
 
879
 
 
880
 
 
881
 
 
882
 
 
883
 
 
884
 
885
+ function get_mentions_node(){
886
 
 
887
 
 
888
 
 
889
 
 
890
 
 
891
 
 
892
 
893
+ $mentions_node = "";
894
 
895
 
 
896
 
897
 
898
 
899
+
900
+
901
  global $skyscraper_options;
902
 
 
903
 
 
904
 
905
 
906
 
 
 
907
 
908
 
909
+ if ( isset($skyscraper_options["twitter_username"])){
910
 
 
911
 
 
912
 
913
 
914
 
 
915
 
916
+
917
+ $mentions_tweets = get_option_tweets("skyscraper_mentions");
918
+
919
+
920
+
921
+ if ($skyscraper_options["twitter_username"] != ""){
922
+
923
+
924
+
925
+
926
+
927
+
928
+
929
+ if ($mentions_tweets != "" ){
930
+
931
+
932
+
933
+
934
+
935
+
936
+
937
+ $mentions_node = "var TweetsMentionsContent = [
938
+
939
+
940
+
941
+ ".$mentions_tweets."
942
+
943
+
944
+
945
+ ];
946
+
947
+
948
+
949
+ oPlugin.CreateNode('New_Id_4','Mentions','',TweetsMentionsContent,'Notice',220,460);";
950
+
951
+
952
+
953
+ }
954
+
955
+
956
+
957
+ }
958
+
959
+
960
+
961
+ }
962
+
963
+
964
+
965
+ return $mentions_node;
966
+
967
+
968
+
969
+ }
970
+
971
+
972
+
973
+
974
+
975
+
976
+
977
+ function get_counters_node(){
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+ global $skyscraper_options;
986
+
987
+
988
+
989
+ global $title_shared;
990
+
991
+
992
+
993
+ global $url_shares;
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
1001
+ $counters_node = "";
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+ /*
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+ <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><span><a href="http://twitter.com/share" style="color:#ffffff" class="twitter-share-button" data-url="" data-text="" data-count="vertical" data-via="gBrowser" data-lang="en">Tweet</a></span>
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+ */
1026
+
1027
+
1028
+
1029
+ if ((!empty($skyscraper_options["counters"]["check"]))){
1030
+
1031
+
1032
 
1033
 
1034
 
1035
+
1036
+
1037
  $counters_node = " var url = '". addslashes(trim($url_shares))."';
1038
 
1039
+
1040
+
1041
  var title = '".addslashes(trim($title_shared)) ."';
1042
 
1043
+
1044
+
1045
 
1046
 
1047
+
1048
+
1049
  var counter = '<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" ><tr><td style=\"height:72px;width:50px;\" align=\"center\">';
1050
 
1051
+
1052
+
1053
  counter += '<div class=\"fb-like\" data-send=\"false\" data-layout=\"box_count\" data-width=\"50\" data-href=\"'+url+'\" data-show-faces=\"false\"></div>';
1054
 
1055
+
1056
+
1057
  counter += '</td></tr>';
1058
 
1059
+
1060
+
1061
  counter += '<tr><td align=\"center\">';
1062
 
1063
+
1064
+
1065
  counter +=' <div class=\"g-plusone\" data-size=\"tall\" data-href=\"'+url+'\"></div>';
1066
 
1067
+
1068
+
1069
  counter += '</td></tr>';
1070
 
1071
+
1072
+
1073
  counter += '<tr><td align=\"center\" style=\"height:72px\">';
1074
 
1075
+
1076
+
1077
  counter += '<a href=\"https://twitter.com/share\" data-with=\"50\" data-text=\"'+ title +' (via @sociablesite)\" data-url=\"'+ url + '\" class=\"twitter-share-button\" data-count=\"vertical\">Tweet</a>';
1078
 
1079
+
1080
+
1081
  counter += '</td></tr>';
1082
 
1083
+
1084
+
1085
  counter += '</table>';
1086
 
1087
+
1088
+
1089
 
1090
 
1091
+
1092
+
1093
  oPlugin.CreateSimpleNode('New_Id_2','Counters<br/>', counter ,".$skyscraper_options["counters"]["folded"].");
1094
 
1095
+
1096
+
1097
  ";
1098
 
1099
+
1100
+
1101
  }
1102
 
1103
+
1104
+
1105
 
1106
 
1107
+
1108
+
1109
  return $counters_node;
1110
 
1111
 
1112
 
1113
+
1114
+
1115
+
1116
+
1117
  }
1118
 
1119
 
1120
 
1121
+
1122
+
1123
+
1124
+
1125
  function get_share_node(){
1126
 
1127
+
1128
+
1129
 
1130
 
1131
+
1132
+
1133
  global $skyscraper_options;
1134
 
1135
+
1136
+
1137
 
1138
 
1139
+
1140
+
1141
  $share_node = "";
1142
 
1143
+
1144
+
1145
 
1146
 
1147
+
1148
+
1149
  if (!empty($skyscraper_options["share"]["check"])){
1150
 
1151
 
1152
 
1153
+
1154
+
1155
+
1156
+
1157
  $share_buttons = share_links();
1158
 
1159
+
1160
+
1161
  $share_node = "oPlugin.CreateSimpleNode('New_Id_1','Share', '".$share_buttons."',".$skyscraper_options["share"]["folded"].");";
1162
 
 
1163
 
 
1164
 
1165
+ }
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+ return $share_node;
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+ }
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+
1189
+ function get_follow_us_node(){
1190
+
1191
+
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+ $follow_us_node = "";
1198
+
1199
+
1200
+
1201
+ global $skyscraper_options;
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+ if (isset($skyscraper_options["follow_us"])){
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+ $follow_info = empty_accounts();
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+ if ( $follow_info["active"] > 0 && ($follow_info["empty"] < $follow_info["active"])){
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+ $follow_us_node = "oPlugin.CreateNode('New_Id_6','Follow', '', '".sc_follow_links()."','Plano',40,140)";
1234
+
1235
+
1236
+
1237
+ }
1238
+
1239
+
1240
+
1241
+ }
1242
+
1243
+
1244
+
1245
+ return $follow_us_node;
1246
+
1247
+
1248
+
1249
+ }
1250
+
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+
1257
+ function empty_accounts(){
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+
1264
+
1265
+ $empty = 0;
1266
+
1267
+
1268
+
1269
+ $active = 0;
1270
+
1271
+
1272
+
1273
+ global $skyscraper_options;
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+ foreach($skyscraper_options["follow_us"] as $follow_us){
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+
1288
+
1289
+ if (empty($follow_us["account"])){
1290
+
1291
+
1292
+
1293
+ $empty++;
1294
+
1295
+
1296
+
1297
+ }
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+ if (isset($follow_us["active"])){
1306
+
1307
+
1308
+
1309
+ $active++;
1310
+
1311
+
1312
+
1313
+ }
1314
+
1315
+
1316
+
1317
+ }
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+ return array("empty" =>$empty, "active"=>$active);
1326
+
1327
+
1328
+
1329
+ }
1330
+
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+ function sc_follow_links(){
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+ global $skyscraper_options;
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+ $follow_buttons = "";
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+ foreach($skyscraper_options["follow_us"] as $follow_us){
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+ $follow_us["account"]= trim($follow_us["account"]);
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+ if (!empty($follow_us["active"]) && !empty($follow_us["account"]) ){
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+ $follow_us["account"] = str_replace("http://", "", $follow_us["account"]);
1386
+
1387
+
1388
+
1389
+ $follow_us["account"] = "http://".$follow_us["account"];
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+ $follow_buttons .= "<a target=\'_blank\' rel=\'nofollow\' href=\'".$follow_us["account"]."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".$follow_us["logo"]."\' /></a>";
1398
+
1399
+
1400
+
1401
+ }
1402
+
1403
+
1404
+
1405
+ }
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+ return $follow_buttons;
1414
+
1415
+
1416
+
1417
+ }
1418
+
1419
+
1420
+
1421
+
1422
+
1423
+
1424
+
1425
+ function share_links(){
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+ $url = addslashes(get_bloginfo('wpurl'));
1434
+
1435
+
1436
+
1437
+ $blogname = addslashes(get_bloginfo('name'));
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+ global $title_shared;
1444
+
1445
+
1446
+
1447
+ global $url_shares;
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+ $page = trim(addslashes($url_shares));
1458
+
1459
+
1460
+
1461
+ $permalink = trim(addslashes($url_shares));
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+ $title = trim(addslashes($title_shared));
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+
1481
+ $share_links = array();
1482
+
1483
+
1484
+
1485
+ $share_links = array(
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+
1493
+ "twitter" => array('favicon' => 't.png',
1494
+
1495
+
1496
+
1497
+ 'url' => 'http://twitter.com/intent/tweet?text='.$title.'%20-%20'.$permalink.'%20(via%20@sociablesite) %23sociable',
1498
+
1499
+
1500
+
1501
+ 'title' => "Share on Twitter"),
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+
1508
+
1509
+ "facebook" => array('favicon' => 'f.png',
1510
+
1511
+
1512
+
1513
+ 'url' => 'http://www.facebook.com/share.php?u='.$permalink.'&amp;t='.$title.'',
1514
+
1515
+
1516
+
1517
+ 'title' => "Share on Facebook"),
1518
+
1519
+
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+ "google" => array('favicon' => 'g.png',
1526
+
1527
+
1528
+
1529
+ 'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su='.$title.'&body='.$permalink.'&ui=2&tf=1&shva=1',
1530
+
1531
+
1532
+
1533
+ 'title' => "Share on Gmail"),
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+ "favorites" => array('favicon' => 'fv.png',
1542
+
1543
+
1544
+
1545
+ 'url' => 'javascript:AddToFavorites();',
1546
+
1547
+
1548
+
1549
+ 'title' => "Add to favorites - doesn\'t work in Chrome"),
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+ "stumble" => array('favicon' => 's.png',
1558
+
1559
+
1560
+
1561
+ 'url' => 'http://www.stumbleupon.com/submit?url='.$permalink.'&title='.$title.'',
1562
+
1563
+
1564
+
1565
+ 'title' => "Share on StumpleUpon"),
1566
+
1567
+
1568
+
1569
+
1570
+
1571
+
1572
+
1573
+ "delicious" => array('favicon' => 'o.png',
1574
+
1575
+
1576
+
1577
+ 'url' => 'http://delicious.com/post?url='.$permalink.'&amp;title='.$title.'&amp;notes=EXCERPT',
1578
+
1579
+
1580
+
1581
+ "title" => "Share on delicious"),
1582
+
1583
+
1584
+
1585
+
1586
+
1587
+
1588
+
1589
+ "reader" => array('favicon' => 'n.png',
1590
+
1591
+
1592
+
1593
+ 'url' => 'http://www.google.com/reader/link?url='.$permalink.'&amp;title='.$title.'&amp;srcURL='.$permalink.'&amp;srcTitle='.$blogname.'',
1594
+
1595
+
1596
+
1597
+ "title" => "Share on Google Reader"),
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+
1604
+
1605
+ "linkedin" => array('favicon' => 'i.png',
1606
+
1607
+
1608
+
1609
+ 'url' => 'http://www.linkedin.com/shareArticle?mini=true&amp;url='.$permalink.'&amp;title='.$title.'&amp;source='.$blogname.'&amp;summary=EXCERPT',
1610
+
1611
+
1612
+
1613
+ "title" => "Share on LinkedIn")
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+
1621
+ );
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+
1628
+
1629
+ $share_buttons = "";
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+ foreach($share_links as $link){
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+
1644
+
1645
+ $share_buttons .= "<a target=\'_blank\' rel=\'nofollow\' href=\'".addslashes($link["url"])."\' title=\'".addslashes($link["title"])."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".addslashes($link["favicon"])."\' /></a>";
1646
+
1647
+
1648
+
1649
+ }
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+ return $share_buttons;
1658
+
1659
+
1660
+
1661
+ }
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+ /*
1678
+
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+ * Template Tag To Echo The Sociable 2 HTML
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+ */
1694
+
1695
+
1696
+
1697
+
1698
+
1699
+
1700
+
1701
+ function do_skyscraper(){
1702
+
1703
+
1704
+
1705
+
1706
+
1707
+
1708
+
1709
+ echo skyscraper_html();
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+
1716
+
1717
+ }
1718
+
1719
+
1720
+
1721
+
1722
+
1723
+
1724
+
1725
+
1726
+
1727
+
1728
+
1729
+
1730
+
1731
+
1732
+
1733
+ /*
1734
+
1735
+
1736
+
1737
+
1738
+
1739
+
1740
+
1741
+ * Sociable 2 Shortcode
1742
+
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+ */
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+ function skyscraper_shortcode(){
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+
1765
+ return skyscraper_html();
1766
+
1767
+
1768
+
1769
+
1770
+
1771
+
1772
+
1773
+ }
1774
+
1775
+
1776
+
1777
+
1778
+
1779
+
1780
+
1781
+ function auto_skyscraper($content){
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+ global $skyscraper_options;
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+
1797
+ if( ! isset( $skyscraper_options['active'] ) ){
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+
1804
+
1805
+ $content = "";
1806
+
1807
+
1808
+
1809
+ return $content;
1810
+
1811
+
1812
+
1813
+ }
1814
+
1815
+
1816
+
1817
+
1818
+
1819
+
1820
+
1821
+
1822
+
1823
+
1824
+
1825
+ if( ! isset( $skyscraper_options['locations'] ) || ! is_array( $skyscraper_options['locations'] ) || empty( $skyscraper_options['locations'] ) ){
1826
+
1827
+
1828
+
1829
+
1830
+
1831
+
1832
+
1833
+ $content = "";
1834
+
1835
+
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+ } else {
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+ $locations = $skyscraper_options['locations'];
1850
+
1851
+
1852
+
1853
+
1854
+
1855
+
1856
+
1857
+ }
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+
1864
+
1865
+ /*
1866
+
1867
+
1868
+
1869
+
1870
+
1871
+
1872
+
1873
+ * Determine if we are supposed to be displaying the output here.
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+ */
1882
+
1883
+
1884
+
1885
+
1886
+
1887
+
1888
+
1889
+ $display = false;
1890
+
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+ /*
1906
+
1907
+
1908
+
1909
+
1910
+
1911
+
1912
+
1913
+ * is_single is a unique case it still returning true
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+ */
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+
1931
+
1932
+
1933
+ //If We Can Verify That We are in the correct loaction, simply add something to the $display array, and test for a true result to continue.
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+ foreach( $locations as $location => $val ){
1942
+
1943
+
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+
1950
+
1951
+
1952
+
1953
+ //First We Handle is_single() so it returning true on Single Post Type Pages is not an issue, this is not the intended functionality of this plugin
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+
1961
+ if( $location == 'is_single' ){
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+
1968
+
1969
+ //If we are not in a post, lets ignore this one for now
1970
+
1971
+
1972
+
1973
+
1974
+
1975
+
1976
+
1977
+ if( is_single() && get_post_type() == 'post' ){
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+ $display = true;
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+ break;
1994
+
1995
+
1996
+
1997
+
1998
+
1999
+
2000
+
2001
+ } else {
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+
2008
+
2009
+ continue; // So not to trigger is_single later in this loop, but still be allowed to handle others
2010
+
2011
+
2012
+
2013
+
2014
+
2015
+
2016
+
2017
+ }
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+
2027
+
2028
+
2029
+
2030
+
2031
+
2032
+
2033
+ } elseif( strpos( $location , 'is_single_posttype_' ) === 0 ){ //Now We Need To Check For The Variable Names, Taxonomy Archives, Post Type Archives and Single Custom Post Types.
2034
+
2035
+
2036
+
2037
+
2038
+
2039
+
2040
+
2041
+
2042
+
2043
+
2044
+
2045
+
2046
+
2047
+
2048
+
2049
+ //Single Custom Post Type
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+
2056
+
2057
+ $post_type = str_replace( 'is_single_posttype_' , '' , $location );
2058
+
2059
+
2060
+
2061
+
2062
+
2063
+
2064
+
2065
+ if( is_single() && get_post_type() == $post_type ){
2066
+
2067
+
2068
+
2069
+
2070
+
2071
+
2072
+
2073
+ $display = true;
2074
+
2075
+
2076
+
2077
+
2078
+
2079
+
2080
+
2081
+ break;
2082
+
2083
+
2084
+
2085
+
2086
+
2087
+
2088
+
2089
+ }
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+
2096
+
2097
+
2098
+
2099
+
2100
+
2101
+
2102
+
2103
+
2104
+
2105
+ } elseif( strpos( $location , 'is_posttype_archive_' ) === 0 ){
2106
+
2107
+
2108
+
2109
+
2110
+
2111
+
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+
2118
+
2119
+
2120
+
2121
+ //Custom Post Type Archive
2122
+
2123
+
2124
+
2125
+
2126
+
2127
+
2128
+
2129
+ $post_type = str_replace( 'is_posttype_archive_' , '' , $location );
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+
2137
+ if( is_post_type_archive( $post_type ) ){
2138
+
2139
+
2140
+
2141
+
2142
+
2143
+
2144
+
2145
+ $display = true;
2146
+
2147
+
2148
+
2149
+
2150
+
2151
+
2152
+
2153
+ break;
2154
+
2155
+
2156
+
2157
+
2158
+
2159
+
2160
+
2161
+ }
2162
+
2163
+
2164
+
2165
+
2166
+
2167
+
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+
2174
+
2175
+
2176
+
2177
+ } elseif( strpos( $location , 'is_taxonomy_archive_' ) === 0 ) {
2178
+
2179
+
2180
+
2181
+
2182
+
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+
2192
+
2193
+ //Taxonomy Archive
2194
+
2195
+
2196
+
2197
+
2198
+
2199
+
2200
+
2201
+ $taxonomy = str_replace( 'is_taxonomy_archive_' , '' , $location );
2202
+
2203
+
2204
+
2205
+
2206
+
2207
+
2208
+
2209
+ if( is_tax( $taxonomy ) ){
2210
+
2211
+
2212
+
2213
+
2214
+
2215
+
2216
+
2217
+ $display = true;
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+
2224
+
2225
+ break;
2226
+
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+
2233
+ }
2234
+
2235
+
2236
+
2237
+
2238
+
2239
+
2240
+
2241
+
2242
+
2243
+
2244
+
2245
+
2246
+
2247
+
2248
+
2249
+ } elseif( function_exists( $location ) ) {
2250
+
2251
+
2252
+
2253
+
2254
+
2255
+
2256
+
2257
+
2258
+
2259
+
2260
+
2261
+
2262
+
2263
+
2264
+
2265
+ //Standard conditional tag, these will return BOOL
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+
2273
+ if( call_user_func( $location ) === true ){
2274
+
2275
+
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+ $display = true;
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+
2288
+
2289
+ break;
2290
+
2291
+
2292
+
2293
+
2294
+
2295
+
2296
+
2297
+ }
2298
+
2299
+
2300
+
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+
2307
+
2308
+
2309
+
2310
+
2311
+
2312
+
2313
+ } else {
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+ continue;
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+ }
2330
+
2331
+
2332
+
2333
+
2334
+
2335
+
2336
+
2337
+
2338
+
2339
+
2340
+
2341
+
2342
+
2343
+
2344
 
2345
+
2346
 
2347
 
 
2348
 
2349
 
2350
 
 
2351
 
2352
 
2353
+ }
2354
 
 
2355
 
 
2356
 
 
2357
 
 
2358
 
 
2359
 
 
2360
 
2361
+
2362
 
 
2363
 
 
2364
 
 
2365
 
 
2366
 
 
2367
 
 
2368
 
2369
+ //If We have passed all the checks and are looking in the right place lets do this thang
2370
 
2371
 
2372
 
 
2373
 
2374
 
2375
 
 
2376
 
2377
+ if( isset( $skyscraper_options['automatic_mode'] ) && $display === true ){
2378
 
 
2379
 
 
2380
 
 
2381
 
 
2382
 
 
2383
 
 
2384
 
2385
+ if (isset($skyscraper_options["topandbottom"])){
2386
 
 
2387
 
 
2388
 
 
2389
 
 
2390
 
 
2391
 
 
2392
 
2393
+ $content = skyscraper_html();
2394
 
 
2395
 
2396
 
2397
 
 
2398
 
2399
 
2400
 
2401
+ }else{
2402
 
 
2403
 
 
2404
 
 
2405
 
 
2406
 
 
2407
 
 
2408
 
2409
+ $content = skyscraper_html();
2410
 
 
2411
 
 
2412
 
 
2413
 
 
2414
 
 
2415
 
 
2416
 
2417
  }
2418
 
 
2419
 
 
2420
 
 
2421
 
 
2422
 
2423
 
2424
 
2425
+ }
2426
 
 
2427
 
 
2428
 
2429
+ else{
2430
 
2431
 
 
2432
 
2433
+ $content = skyscraper_html();
2434
 
 
 
2435
 
 
2436
 
2437
+ }
2438
 
2439
 
2440
 
2441
+
2442
 
2443
 
2444
 
2445
+
2446
 
 
2447
 
 
2448
 
 
2449
 
 
2450
 
 
2451
 
 
2452
 
2453
+
2454
 
 
2455
 
 
2456
 
 
2457
 
 
2458
 
 
2459
 
 
2460
 
2461
+ return $content;
2462
 
 
2463
 
 
2464
 
2465
+ }
2466
 
 
2467
 
 
2468
 
 
2469
 
 
2470
 
 
2471
 
 
2472
 
 
2473
 
 
2474
 
 
2475
 
 
2476
 
2477
+ function get_tweets_username($username_complete){
2478
 
 
2479
 
 
2480
 
2481
+
2482
 
 
2483
 
 
2484
 
2485
+ if (function_exists('curl_init')) {
2486
 
 
2487
 
 
2488
 
2489
+
2490
 
 
2491
 
 
2492
 
2493
+ // last tweets
2494
 
 
2495
 
 
2496
 
2497
+ $username = str_replace("@", "", $username_complete);
2498
 
 
2499
 
 
2500
 
2501
+ $url = "https://api.twitter.com/1/statuses/user_timeline/".$username.".json";
2502
 
2503
 
2504
 
2505
+ $latest = curl_call($url);
2506
 
2507
 
2508
 
2509
+ $latest_row = parser_twitter_results($latest,0);
2510
 
 
2511
 
2512
 
2513
+ update_option( "skyscraper_latest", $latest_row );
2514
 
 
2515
 
2516
 
2517
+
2518
 
 
2519
 
2520
 
2521
+ // last mentions
2522
 
 
2523
 
2524
 
2525
+ $url = "http://search.twitter.com/search.json?q=@".$username."&rpp=5&include_entities=true&result_type=mixed";
2526
 
 
2527
 
2528
 
2529
+ $mentions = curl_call($url);
2530
 
 
2531
 
2532
 
2533
+
2534
 
2535
 
2536
 
2537
+ if (count($mentions["results"]) > 1){
2538
 
2539
 
 
2540
 
2541
+
2542
 
2543
 
 
2544
 
2545
+ $mentions_row = parser_twitter_results($mentions["results"],1);
2546
 
2547
 
 
2548
 
2549
+ update_option( "skyscraper_mentions", $mentions_row );
2550
 
2551
 
 
2552
 
2553
+ }
2554
 
2555
 
2556
+
2557
+ }
2558
 
2559
 
2560
 
2562
 
2563
 
2564
 
 
2565
 
 
2566
 
 
2567
 
 
2568
 
2569
+ function ago($time){
2570
 
 
2571
 
 
2572
 
 
2573
 
 
2574
 
 
2575
 
 
2576
 
2577
+ $periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
2578
 
 
2579
 
 
2580
 
2581
+ $lengths = array("60","60","24","7","4.35","12","10");
2582
 
2583
 
 
2584
 
 
2585
 
 
2586
 
2587
 
2588
 
2589
+ $now = time();
2590
 
2591
 
2592
 
 
2593
 
2594
 
2595
 
 
2596
 
2597
+ $difference = $now - $time;
2598
 
2599
 
2600
+
2601
+ $tense = "ago";
2602
 
2603
 
2604
 
 
2605
 
2606
 
2607
 
 
2608
 
2609
+ for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
2610
 
2611
 
 
2612
 
2613
+ $difference /= $lengths[$j];
2614
 
2615
 
 
2616
 
2617
+ }
2618
 
2619
 
 
2620
 
 
2621
 
2622
 
2623
 
 
2624
 
2625
+ $difference = round($difference);
2626
 
2627
 
 
2628
 
 
2629
 
2630
 
2631
 
 
2632
 
2633
+ if($difference != 1) {
2634
 
2635
 
 
2636
 
2637
+ $periods[$j].= "s";
2638
 
2639
 
 
2640
 
2641
+ }
2642
 
2643
 
 
2644
 
2645
 
2646
 
 
2647
 
2648
 
2649
+ return $difference." ".$periods[$j]."ago";
2650
 
 
2651
 
2652
 
2653
+ }
2654
 
 
2655
 
2656
 
2657
 
 
2658
 
2659
 
2660
 
 
2661
 
2662
 
2663
 
 
2664
 
2665
+ function parser_twitter_results($results = array(), $mention){
2666
 
2667
 
 
2668
 
2669
+
2670
 
2671
 
 
2672
 
2673
+ $options_latest = array();
2674
 
2675
 
 
2676
 
2677
+ $options_latest = array("date" => date("YmdHis"));
2678
 
2679
 
 
2680
 
2681
+ global $skyscraper_options;
2682
 
2683
 
 
2684
 
2685
+ $i = 0;
2686
 
2687
 
 
2688
 
2689
+
2690
 
2691
 
 
2692
 
2693
+ if (is_array($results)){
2694
 
2695
 
 
2696
 
2697
+
2698
 
2699
 
 
2700
 
2701
+ foreach($results as $tweet){
2702
 
2703
 
 
2704
 
2705
+
2706
 
2707
 
 
2708
 
2709
+ $options_latest[$i] = array();
2710
 
2711
 
 
2712
 
2713
+ $options_latest[$i]["text"] = $tweet["text"];
2714
 
2715
 
 
2716
 
2717
+ $options_latest[$i]["created_at"] = ago(strtotime($tweet["created_at"]));
2718
 
2719
 
 
2720
 
2721
+
2722
 
2723
 
 
2724
 
2725
+ if ($mention){
2726
 
2727
 
 
2728
 
2729
+ $options_latest[$i]["name"] = $tweet["from_user_name"];
2730
 
2731
 
 
2732
 
2733
+ }
2734
 
2735
 
 
2736
 
2737
+ else{
2738
 
2739
 
 
2740
 
2741
+ $options_latest[$i]["name"] = $tweet["user"]["name"];
2742
 
2743
 
 
2744
 
2745
+ }
2746
 
2747
 
 
2748
 
2749
+
2750
 
2751
 
 
2752
 
2753
+ $i++;
2754
 
2755
 
 
2756
 
2757
+ if ($i == $skyscraper_options["num_tweets"]){
2758
 
2759
 
 
2760
 
2761
+ break;
2762
 
2763
 
 
2764
 
2765
+ }
2766
 
2767
 
 
2768
 
2769
+ }
2770
 
2771
 
 
2772
 
2773
+ }
2774
 
2775
 
 
2776
 
2777
+
2778
 
2779
 
 
2780
 
2781
+ return $options_latest;
2782
 
2783
 
 
2784
 
2785
+ }
2786
 
2787
 
 
2788
 
2789
 
2790
 
 
2791
 
2792
 
2793
+ function curl_call($url){
2794
 
 
2795
 
2796
 
2797
+
2798
 
 
2799
 
2800
 
2801
+ $ch = curl_init();
2802
 
 
2803
 
2804
 
2805
+ curl_setopt($ch, CURLOPT_URL, $url);
2806
 
 
2807
 
2808
 
2809
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
2810
 
 
2811
 
2812
 
2813
+ curl_setopt($ch, CURLOPT_TIMEOUT, 3);
2814
 
 
2815
 
2816
 
2817
+ curl_setopt($ch, CURLINFO_HEADER_OUT, true);
2818
 
 
2819
 
2820
 
2821
+ $output = curl_exec($ch);
2822
 
 
2823
 
2824
 
2825
+ $info = curl_getinfo($ch);
2826
 
 
2827
 
2828
 
2829
+ curl_close($ch);
2830
 
 
2831
 
2832
 
2833
+
2834
 
 
2835
 
2836
 
2837
+ if ($info["http_code"] == "200"){
2838
 
 
2839
 
2840
 
2841
+
2842
 
 
2843
 
2844
 
2845
+ $return = json_decode($output,1);
2846
 
 
2847
 
2848
 
2849
+ }
2850
 
 
2851
 
2852
 
2853
+ else{
2854
 
 
2855
 
2856
 
2857
+ $return = false;
2858
 
 
2859
 
2860
 
2861
+ }
2862
 
 
2863
 
 
2864
 
2865
+
2866
 
 
2867
 
 
2868
 
2869
+ return $return;
2870
 
2871
 
2872
 
2873
+ }
2874
 
2875
 
2876
 
 
2877
 
 
2878
 
2879
 
2880
 
2881
+ function get_option_tweets($option){
2882
 
2883
 
 
2884
 
2885
 
2886
 
 
2887
 
 
2888
 
2889
+ global $skyscraper_options;
2890
 
 
2891
 
 
2892
 
2893
+ $skyscraper_latest = get_option($option);
2894
 
 
2895
 
 
2896
 
2897
 
2898
 
 
2899
 
 
2900
 
2901
+ if (empty($skyscraper_latest)){
2902
 
 
2903
 
 
2904
 
2905
+
2906
 
 
2907
 
 
2908
 
2909
+ get_tweets_username($skyscraper_options["twitter_username"]);
2910
 
 
2911
 
 
2912
 
2913
+ $skyscraper_latest = get_option($option);
2914
 
2915
 
 
2916
 
2917
+ }
2918
 
2919
 
 
2920
 
2921
+ else{
2922
 
2923
 
2924
 
2925
+
2926
 
2927
 
2928
 
2929
+ // 5 minutes
2930
 
 
2931
 
2932
 
2933
+ if (diff_date($skyscraper_latest["date"], date("YmdHis")) > 5){
2934
 
 
2935
 
 
2936
 
2937
+
2938
 
2939
 
2940
 
2941
+ get_tweets_username($skyscraper_options["twitter_username"]);
2942
 
2943
 
2944
 
2945
+ $skyscraper_latest = get_option($option);
2946
 
 
2947
 
 
2948
 
2949
+ }
2950
 
2951
 
 
2952
 
2953
+ }
2954
 
2955
 
2956
 
2957
+
2958
 
2959
 
 
2960
 
2961
 
2962
 
 
 
 
2963
 
 
2964
 
2965
+ return generate_tweets_box_content($skyscraper_latest);
2966
 
 
2967
 
 
2968
 
2969
+ }
2970
 
 
2971
 
 
2972
 
 
2973
 
 
2974
 
 
2975
 
 
2976
 
2977
+ function generate_tweets_box_content($tweets){
2978
 
 
2979
 
 
2980
 
 
2981
 
 
2982
 
 
2983
 
 
2984
 
2985
+ $content = "";
2986
 
 
2987
 
 
2988
 
2989
+ if (isset($tweets["date"])){
2990
 
 
2991
 
 
2992
 
2993
+ unset($tweets["date"]);
2994
 
 
2995
 
 
2996
 
2997
+ }
2998
 
2999
 
 
3000
 
3001
+
3002
 
 
3003
 
 
3004
 
3005
+
3006
 
 
3007
 
 
3008
 
3009
+ foreach($tweets as $tweet){
3010
 
 
3011
 
 
3012
 
3013
 
3014
 
 
3015
 
 
3016
 
3017
+ $tweet["name"] = addslashes($tweet["name"]);
3018
 
 
3019
 
 
3020
 
3021
+ $tweet["text"] = addslashes($tweet["text"]);
3022
 
 
3023
 
 
3024
 
3025
+
3026
 
 
3027
 
3028
 
3029
+ $content .= "['".$tweet["name"]."','".$tweet["name"]."','".$tweet["text"]."','','".$tweet["created_at"]."'],";
3030
 
 
3031
 
 
3032
 
3033
+ }
3034
 
 
3035
 
 
3036
 
3037
+ $content = trim(trim(trim($content), ","));
3038
 
 
3039
 
 
3040
 
3041
+
3042
 
 
3043
 
 
3044
 
3045
+ return $content;
3046
 
 
3047
 
 
3048
 
3049
+ }
3050
 
 
3051
 
 
3052
 
 
3053
 
 
3054
 
 
3055
 
 
3056
 
3057
+ if (!empty($_GET["sky"])){
3058
 
 
3059
 
3060
 
3061
 
 
3062
 
3063
 
3064
 
3065
+ add_action('wp_ajax_my_action', 'my_action_callback');
3066
 
 
3067
 
 
3068
 
 
3069
 
 
3070
 
 
3071
 
 
3072
 
3073
+ function my_action_callback() {
3074
 
 
3075
 
 
3076
 
3077
+ global $wpdb; global $skyscraper_options; // this is how you get access to the database
3078
 
 
3079
 
 
3080
 
 
3081
 
 
3082
 
 
3083
 
 
3084
 
3085
+ $whatever = intval( $_POST['whatever'] );
3086
 
3087
 
 
3088
 
3089
 
3090
 
 
3091
 
3092
 
3093
+ $whatever += 10;
3094
 
 
3095
 
 
3096
 
3097
 
3098
 
 
3099
 
3100
 
3101
+ echo $whatever;
3102
 
 
3103
 
3104
 
3105
 
 
3106
 
3107
 
3108
 
3109
  die(); // this is required to return a proper result
3110
 
3111
+
3112
+
3113
  }
3114
 
3115
+
3116
+
3117
  }
3118
 
3119
+
3120
+
3121
  ?>
readme.txt CHANGED
@@ -13,14 +13,14 @@ Requires at least: 2.6
13
 
14
  Tested up to: 3.2.1
15
 
16
- Stable tag: 4.1.7
17
 
18
  == Description ==
19
- Sociable continues being the leader in the sharing space of WordPress plugins. Started more than 2 years ago, and with over 1,5mm downloads now, here comes the latest version 4.1.7, with everything you expect to get, and now introducing Sociable Skyscraper: the ultimate advanced packed plugin for setting up rating system on your WordPress blog. Sociable Skyscraper allows you to set up pages and comments with great degree of customization.
20
  About Sociable Skyscraper
21
  Sociable Skyscraper is the ultimate advanced and feature packed plugin for setting up rating system on your WordPress blog. Plugin allows you to set up different rating systems for posts, pages and comments with great degree of customization.
22
  List of features is so smart, very long and non-stop growing:
23
- You can get more Sociable with Sociable Skyscraper and easily getting Rating and Review of: posts, pages, comments, Facebook, G+, LinkedIN, Twitter. Multiple ratings for posts and pages. Latest twits, latests posts, follows, mentions. Visitors counter, visitors from Facebook and Twitter. As a plus you get an easy way to get TOP or HOME from Sociable Skyscraper.
24
 
25
  About Sociable Classic
26
  As you know, we've improved our visual interface, the default icons are now much more appealing, and a touch bit larger (you do want your readers to share your posts, don't you? :)
@@ -35,8 +35,8 @@ Be Sociable, Share!!!
35
 
36
 
37
 
 
38
 
39
- [vimeo http://vimeo.com/31023684]S
40
 
41
  Have technical support issues? Please leave them in the forum: http://wordpress.org/tags/sociable?forum_id=10
42
 
@@ -52,13 +52,15 @@ Sociable finds its home outside of the WordPress environment on Blogplay.com-
52
 
53
 
54
 
55
- *** Sociable 4.1.7 ***
56
 
57
 
58
 
59
 
60
  = Recent Updates =
61
 
 
 
62
  * Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of course you can customize it to whatever you want.
63
 
64
  * Complete re-write to increase efficiency and speed of the plugin
@@ -152,6 +154,10 @@ Please send us an email to sociableblogplay [ at ] gmail.com
152
 
153
  == Changelog ==
154
 
 
 
 
 
155
  = 4.1.7 =
156
 
157
  * FIXED: Some Fixes
13
 
14
  Tested up to: 3.2.1
15
 
16
+ Stable tag: 4.1.8
17
 
18
  == Description ==
19
+ Sociable continues being the leader in the sharing space of WordPress plugins. Started more than 2 years ago, and with over 1,5mm downloads now, here comes the latest version 4.1.8, with everything you expect to get, and now introducing Sociable Skyscraper: the ultimate advanced packed plugin for setting up rating system on your WordPress blog. Sociable Skyscraper allows you to set up pages and comments with great degree of customization.
20
  About Sociable Skyscraper
21
  Sociable Skyscraper is the ultimate advanced and feature packed plugin for setting up rating system on your WordPress blog. Plugin allows you to set up different rating systems for posts, pages and comments with great degree of customization.
22
  List of features is so smart, very long and non-stop growing:
23
+ You can get more Sociable with Sociable Skyscraper and easily getting Rating and Review of: posts, pages, comments, Facebook, G+, LinkedIN, Twitter. Multiple ratings for posts and pages. Latest twits, latests posts, follows, mentions. Visitor's counter, visitor's from Facebook and Twitter. As a plus you get an easy way to get TOP or HOME from Sociable Skyscraper.
24
 
25
  About Sociable Classic
26
  As you know, we've improved our visual interface, the default icons are now much more appealing, and a touch bit larger (you do want your readers to share your posts, don't you? :)
35
 
36
 
37
 
38
+ [vimeo http://vimeo.com/31023684]
39
 
 
40
 
41
  Have technical support issues? Please leave them in the forum: http://wordpress.org/tags/sociable?forum_id=10
42
 
52
 
53
 
54
 
55
+ *** Sociable 4.1.8 ***
56
 
57
 
58
 
59
 
60
  = Recent Updates =
61
 
62
+ * Added skyscraper plugin, with counters, share icons and feed of your rss tweets, and more.
63
+
64
  * Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of course you can customize it to whatever you want.
65
 
66
  * Complete re-write to increase efficiency and speed of the plugin
154
 
155
  == Changelog ==
156
 
157
+ = 4.1.8 =
158
+
159
+ * FIXED: Some Fixes
160
+
161
  = 4.1.7 =
162
 
163
  * FIXED: Some Fixes
sociable.php CHANGED
@@ -6,43 +6,39 @@
6
 
7
 
8
 
9
- /*
10
 
11
 
12
 
13
 
14
 
15
- Plugin Name: Sociable
16
 
17
 
18
 
 
19
 
20
 
21
- Plugin URI: http://blogplay.com/plugin
22
 
23
 
24
 
25
 
26
 
27
- Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
28
 
29
 
30
 
31
 
 
32
 
33
- Version: 4.1.7
34
 
35
 
36
 
37
 
38
 
39
- Author: Blogplay
40
 
41
 
42
 
43
 
44
 
45
- Author URI: http://blogplay.com/
46
 
47
 
48
 
@@ -54,20 +50,19 @@ Author URI: http://blogplay.com/
54
 
55
 
56
 
57
- Copyright 2006 Peter Harkins (ph@malaprop.org)
58
 
59
 
60
 
61
 
62
 
63
- Copyright 2008-2009 Joost de Valk (joost@yoast.com)
64
 
65
 
66
 
67
 
68
 
69
- Copyright 2009-Present Blogplay.com (info@blogplay.com)
70
 
 
71
 
72
 
73
 
@@ -79,26 +74,24 @@ Copyright 2009-Present Blogplay.com (info@blogplay.com)
79
 
80
 
81
 
 
82
 
83
- This program is free software; you can redistribute it and/or modify
84
 
85
 
86
 
87
 
88
 
89
- it under the terms of the GNU General Public License as published by
90
 
91
 
92
 
93
 
94
 
95
- the Free Software Foundation; either version 2 of the License, or
96
 
97
 
98
 
99
 
100
 
101
- (at your option) any later version.
102
 
103
 
104
 
@@ -110,28 +103,26 @@ the Free Software Foundation; either version 2 of the License, or
110
 
111
 
112
 
113
- This program is distributed in the hope that it will be useful,
114
 
115
 
116
 
117
 
118
 
119
- but WITHOUT ANY WARRANTY; without even the implied warranty of
120
 
121
 
 
122
 
123
 
124
 
125
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
126
 
127
 
128
 
129
 
130
 
131
- GNU General Public License for more details.
132
 
133
 
134
 
 
135
 
136
 
137
 
@@ -140,19 +131,17 @@ GNU General Public License for more details.
140
 
141
 
142
 
143
- You should have received a copy of the GNU General Public License
144
 
145
 
146
 
 
147
 
148
 
149
- along with this program; if not, write to the Free Software
150
 
151
 
152
 
153
 
154
 
155
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
156
 
157
 
158
 
@@ -170,10 +159,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
170
 
171
 
172
 
173
- */
174
 
175
 
176
 
 
177
 
178
 
179
 
@@ -182,36 +171,34 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
182
 
183
 
184
 
185
- /*
186
 
187
 
188
 
 
189
 
190
 
191
- * Define Some Paths
192
 
193
 
194
 
195
 
196
 
197
- */
198
 
199
 
200
 
201
 
 
202
 
203
 
204
- define( 'SOCIABLE_HTTP_PATH' , WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
205
 
206
 
207
 
208
 
209
 
210
- define( 'SOCIABLE_ABSPATH' , WP_PLUGIN_DIR . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
211
 
212
 
213
 
214
 
 
215
 
216
 
217
 
@@ -219,40 +206,35 @@ define( 'SOCIABLE_ABSPATH' , WP_PLUGIN_DIR . '/' . str_replace(basename( __FILE_
219
 
220
 
221
 
222
- /*
223
 
224
 
225
 
226
 
227
 
228
- * Includes
229
 
230
 
231
 
232
 
233
 
234
- */
235
 
236
 
237
 
238
 
239
 
240
- include 'includes/class-sociable_Admin_Options.php';
241
 
 
242
 
243
- include("includes/skyscraper_output.php");
244
 
245
 
246
- include 'includes/class-Sociable_Globals.php';
247
 
248
 
249
 
250
 
251
 
252
- include 'includes/sociable_output.php';
253
 
254
 
255
 
 
256
 
257
 
258
 
@@ -261,54 +243,46 @@ include 'includes/sociable_output.php';
261
 
262
 
263
 
264
- /*
265
 
266
 
267
 
 
268
 
269
 
270
- * Global Variables
271
 
272
 
273
 
274
 
275
 
276
- */
277
 
278
 
279
 
280
 
 
281
 
282
- //$sociable_known_sites = Sociable_Globals::default_sites();
283
 
284
 
285
 
286
 
287
 
288
- $sociable_options = get_option( 'sociable_options' );
289
 
290
- $skyscraper_options = get_option( 'skyscraper_options' );
291
 
292
- $skyscraper_latest = get_option( 'skyscraper_latest' );
293
 
294
- $skyscraper_mentions = get_option( 'skyscraper_mentions' );
295
- //print_r($sociable_options);
296
 
297
 
298
 
299
 
300
 
301
- //$sociable_post_types = array(); //Set This blank here, won't work before init
302
 
303
 
304
 
305
 
306
 
307
- //$sociable_taxonomies = array(); //Same Here
308
 
309
 
310
 
311
 
 
312
 
313
 
314
 
@@ -316,70 +290,38 @@ $skyscraper_mentions = get_option( 'skyscraper_mentions' );
316
 
317
 
318
 
319
- /*
320
 
321
 
322
 
323
 
 
324
 
325
- * General Init Function
326
 
327
 
328
 
329
 
330
 
331
- */
332
 
333
 
334
 
335
 
336
 
337
- function sociable_init(){
338
 
339
- wp_enqueue_script('jquery');
340
- wp_enqueue_script( 'oplugin' , SOCIABLE_HTTP_PATH . 'js/async_call.js' );
341
- wp_enqueue_script( 'async_call' , SOCIABLE_HTTP_PATH . 'js/oPlugin.js' );
342
- wp_enqueue_style("skyscraper_style_shape",SOCIABLE_HTTP_PATH."/css/shape.css");
343
- wp_enqueue_style("skyscraper_style_toolbar", SOCIABLE_HTTP_PATH."/css/toolbar.css");
344
- global $sociable_post_types, $sociable_taxonomies, $sociable_options, $skyscraper_options;
345
 
346
- if (!isset($sociable_options['icon_size']) || $sociable_options['icon_size'] == "" || !isset($sociable_options['version'])) sociable_reset();
347
 
348
-
349
- if ( $skyscraper_options['version'] != "1.0" ){
350
- skyscraper_reset();
351
- }
352
 
353
- //echo dirname( plugin_basename( __FILE__ ) )."/includes"
354
 
355
- load_plugin_textdomain( 'sociable', false, dirname( plugin_basename( __FILE__ ) )."/languages" );
356
 
357
- $active_sites = ( isset( $sociable_options['active_sites'] ) ) ? $sociable_options['active_sites'] : array() ;
358
 
359
- //Set The Post Types
360
- $sociable_post_types = Sociable_Globals::sociable_get_post_types();
361
 
362
- //Set The Custom Taxonomies
363
- $sociable_taxonomies = Sociable_Globals::sociable_get_taxonomies();
364
 
365
- wp_enqueue_script( 'sociable' , SOCIABLE_HTTP_PATH . 'js/sociable.js' );
366
 
367
- wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
368
 
369
- if( ! is_admin() ){
370
- //Load Up The Front Of Site CSS And JS
371
 
372
- if( array_key_exists( 'Add to favorites' , $active_sites ) ){
373
 
374
- // wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
375
- }
376
 
377
- if( isset( $sociable_options['use_stylesheet'] ) ){
378
- wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
379
- }
380
- }
381
 
382
- }
383
 
384
 
385
 
@@ -391,61 +333,52 @@ function sociable_init(){
391
 
392
 
393
 
394
- /*
395
 
396
 
397
 
398
 
399
 
400
- * Hooks And Filters
401
 
402
 
403
 
404
 
 
405
 
406
- */
407
 
408
 
409
 
410
 
411
 
412
- add_action( 'admin_init' , array( 'sociable_Admin_Options' , 'init' ) );
413
 
414
 
415
 
416
 
417
- add_action( 'admin_menu' , array( 'sociable_Admin_Options' , 'add_menu_pages' ) );
418
-
419
 
420
 
421
 
422
 
423
- add_action( 'save_post' , array( 'sociable_Admin_Options' , 'save_post' ) );
424
 
425
 
426
 
427
 
428
 
429
- add_action( 'init' , 'sociable_init' );
430
 
431
 
432
 
433
 
 
434
 
435
 
436
 
437
 
438
 
439
 
440
- add_filter( 'the_content', 'auto_sociable' );
441
 
442
- //add_filter( 'get_pages', 'auto_skyscraper' );
443
 
444
- //add_filter( 'the_excerpt', 'auto_skyscraper' );
445
 
446
- add_filter( 'the_excerpt', 'auto_sociable' );
447
 
448
 
 
449
 
450
 
451
 
@@ -453,14 +386,13 @@ add_filter( 'the_excerpt', 'auto_sociable' );
453
 
454
 
455
 
456
- register_activation_hook(__FILE__, 'sociable_activate' );
457
 
458
 
459
 
460
 
 
461
 
462
 
463
- register_deactivation_hook( __FILE__, 'sociable_deactivate' );
464
 
465
 
466
 
@@ -468,1259 +400,3617 @@ register_deactivation_hook( __FILE__, 'sociable_deactivate' );
468
 
469
 
470
 
471
- /*
472
 
473
 
474
 
475
 
 
476
 
477
- * Activation Function
478
 
479
 
480
 
481
 
482
 
483
- */
484
 
485
 
486
 
487
 
488
 
489
- function sociable_activate(){
490
 
491
 
492
 
493
 
494
 
495
-
496
 
497
 
498
 
499
 
500
 
501
- if( ! get_option( 'sociable_options' ) ){
502
 
503
 
504
 
505
 
506
 
507
- return sociable_reset();
508
 
509
 
510
 
511
 
512
 
513
- }
514
 
515
 
516
 
 
517
 
518
 
519
-
520
 
521
 
522
 
523
 
524
 
525
- }
526
 
527
 
528
 
529
 
 
530
 
531
 
532
 
533
 
534
 
535
- /*
536
 
537
 
538
 
539
 
540
 
541
- * Reset Function
542
 
 
543
 
544
 
545
 
546
 
547
- */
548
 
549
 
550
 
551
 
552
 
553
- function sociable_reset(){
554
 
555
 
556
- global $wpdb;
557
 
558
 
559
- //reset all data to factory defaults, install if is there.
560
 
561
- //Delete All Metadata From The Database ?
562
 
563
- $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
564
 
 
565
 
566
- $sociable_options = array(
567
 
568
- 'version' =>'4.1.7',
569
 
570
 
571
 
572
- 'automatic_mode' => 'on',
573
 
574
 
575
 
576
- 'tagline' => 'Be Sociable, Share!',
577
 
578
 
579
 
580
- 'custom_image_directory' => '',
581
 
582
 
583
 
584
- 'use_stylesheet' => 'on',
585
 
586
 
 
587
 
588
- 'use_images' => 'on',
589
 
590
 
591
- 'use_alphamask' => 'on',
592
- 'new_window' => 'on',
593
 
594
-
595
 
596
- 'help_grow' => 'on',
597
 
598
 
599
 
600
- 'locations' => array(
601
 
602
 
603
 
604
- 'is_single' => 'on',
605
 
606
 
607
 
608
- 'is_page' => 'on'
609
 
610
 
611
 
612
- ),
613
 
614
 
615
 
616
- 'active_sites' => array(
617
 
618
- 'Twitter' => 'on',
619
 
620
- 'Facebook' => 'on',
621
 
622
- 'email'=>'on',
623
 
624
- 'Add to favorites'=>'on',
625
 
626
- 'StumbleUpon' =>'on',
627
 
628
- 'Delicious' =>'on',
629
 
630
- 'Google Reader' =>'on',
631
 
632
- 'LinkedIn' => 'on',
633
 
634
- 'BlinkList' =>'on',
635
 
636
- 'More' => 'on',
637
 
638
- 'Twitter Counter' =>'on',
639
 
640
- 'Facebook Counter' =>'on',
641
 
642
- 'Google +' =>'on',
643
 
644
- 'LinkedIn Counter' =>'on',
645
 
646
- 'StumbleUpon Counter' =>'on'
647
 
648
-
649
 
650
-
651
 
652
- ),
653
 
654
 
655
 
656
- 'icon_size' => '32',
657
 
658
- 'icon_option' => 'option1',
659
 
660
- "active" => 1
661
 
662
 
 
663
 
664
- );
665
 
666
 
667
 
668
 
669
 
670
- $sociable_known_sites = array(
671
 
672
-
673
 
674
- 'Facebook' => array(
675
 
676
 
677
 
678
- 'favicon' => 'facebook.png',
679
 
680
 
681
 
682
- 'url' => 'http://www.facebook.com/share.php?u=PERMALINK&amp;t=TITLE',
683
 
684
 
685
 
686
- 'spriteCoordinates' => Array(
687
 
688
 
689
 
690
- '16' => array("-48px","0px"),
691
 
692
 
 
693
 
694
- '32' => array("-96px","0px"),
695
 
696
 
 
697
 
698
- '48' => array("-144px","0px"),
699
 
700
 
 
701
 
702
- '64' => array("-192px","0px")
703
 
704
 
 
705
 
706
- )
707
 
708
- ),
709
 
710
-
711
 
712
- 'Facebook Counter' => array(
713
 
714
- 'counter' =>1,
715
 
716
- 'favicon' => 'likecounter.png',
717
 
718
 
719
 
720
- 'url' => '<iframe src="//www.facebook.com/plugins/like.php?href=PERMALINKCOUNT&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe>',
721
 
722
-
723
 
724
- 'spriteCoordinates' => Array(
725
 
 
726
 
727
 
728
- '16' => array("-48px","0px"),
729
 
730
 
731
 
732
- '32' => array("-96px","0px"),
733
 
734
 
735
 
736
- '48' => array("-144px","0px"),
737
 
738
 
739
 
740
- '64' => array("-192px","0px")
741
 
742
 
743
 
744
- )
745
 
746
- ),
747
 
748
 
749
 
750
- 'Myspace' => array(
751
 
752
 
753
 
754
- 'favicon' => 'myspace.png',
755
 
756
 
757
 
758
- 'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&amp;t=TITLE',
759
 
760
 
761
 
762
- 'spriteCoordinates' => Array(
763
 
764
 
765
 
766
- '16' => array("0px","-16px"),
767
 
768
 
769
 
770
- '32' => array("0px","-32px"),
771
 
 
772
 
773
 
774
- '48' => array("0px","-48px"),
775
 
776
 
777
 
778
- '64' => array("0px","-64px")
779
 
780
 
781
 
782
- )
783
 
784
 
785
 
786
- ),
787
 
788
 
789
 
790
- 'Twitter' => array(
791
 
792
 
793
 
794
- 'favicon' => 'twitter.png',
795
 
796
 
797
 
798
- 'url' => 'http://twitter.com/intent/tweet?text=TITLE%20-%20PERMALINK%20(via%20@sociablesite)',
799
 
800
 
 
801
 
802
- 'spriteCoordinates' => Array(
803
 
804
 
805
 
806
- '16' => array("-144px","-16px"),
807
 
808
 
809
 
810
- '32' => array("-288px","-32px"),
811
 
812
 
813
 
814
- '48' => array("-432px","-48px"),
815
 
 
816
 
817
 
818
- '64' => array("-576px","-64px")
819
 
 
820
 
 
821
 
822
- )
823
 
 
824
 
 
825
 
826
- ),
827
 
828
 
829
 
830
- 'Twitter Counter' => array(
831
 
832
- 'counter' =>1,
833
 
834
- 'favicon' => 'twitter.png',
835
 
 
836
 
 
837
 
838
- 'url' => '<a href="https://twitter.com/share" data-text="TITLECOUNT - PERMALINKCOUNT (via #sociablesite)" data-url="PERMALINKCOUNT" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>',
839
 
 
840
 
841
 
842
- 'spriteCoordinates' => Array(
843
 
 
844
 
845
 
846
- '16' => array("-144px","-16px"),
847
 
 
848
 
849
 
850
- '32' => array("-288px","-32px"),
851
 
 
852
 
853
 
854
- '48' => array("-432px","-48px"),
855
 
 
856
 
 
857
 
858
- '64' => array("-576px","-64px")
859
 
860
 
 
861
 
862
- )
863
 
864
 
865
 
866
- ),
867
 
868
-
869
 
870
-
871
 
872
-
873
 
874
- 'LinkedIn' => array(
875
 
876
 
 
877
 
878
- 'favicon' => 'linkedin.png',
879
 
880
 
881
 
882
- 'url' => 'http://www.linkedin.com/shareArticle?mini=true&amp;url=PERMALINK&amp;title=TITLE&amp;source=BLOGNAME&amp;summary=EXCERPT',
883
 
884
 
885
 
886
- 'spriteCoordinates' => Array(
887
 
 
888
 
889
 
890
- '16' => array("-144px","0px"),
891
 
 
892
 
 
893
 
894
- '32' => array("-288px","0px"),
895
 
 
896
 
897
 
898
- '48' => array("-432px","0px"),
899
 
 
900
 
901
 
902
- '64' => array("-576px","0px")
903
 
904
 
905
 
906
- )
907
 
908
 
909
 
910
-
911
 
912
 
913
 
914
- ),
915
 
916
-
917
 
918
- 'LinkedIn Counter' => array(
919
 
920
- 'counter'=>1,
921
 
922
 
923
 
924
- 'favicon' => 'linkedin.png',
925
 
926
 
927
 
928
- 'url' => '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="PERMALINKCOUNT" data-counter="right"></script>',
929
 
930
 
931
 
932
- 'spriteCoordinates' => Array(
933
 
934
 
935
 
936
- '16' => array("-144px","0px"),
937
 
938
 
939
 
940
- '32' => array("-288px","0px"),
941
 
942
 
943
 
944
- '48' => array("-432px","0px"),
945
 
946
 
 
947
 
948
- '64' => array("-576px","0px")
949
 
950
 
951
 
952
- )
953
 
954
 
955
 
956
-
957
 
958
 
959
 
960
- ),
961
 
 
962
 
963
 
964
-
965
 
966
 
967
 
968
- 'Delicious' => array(
969
 
970
 
971
 
972
- 'favicon' => 'delicious.png',
973
 
974
 
975
 
976
- 'url' => 'http://delicious.com/post?url=PERMALINK&amp;title=TITLE&amp;notes=EXCERPT',
977
 
978
 
979
 
980
- 'spriteCoordinates' => Array(
981
 
982
 
983
 
984
- '16' => array("-16px","0px"),
985
 
986
 
987
 
988
- '32' => array("-32px","0px"),
989
 
 
990
 
991
 
992
- '48' => array("-48px","0px"),
993
 
994
 
995
 
996
- '64' => array("-64px","0px")
997
 
998
 
999
 
1000
- )
1001
 
 
1002
 
1003
 
1004
- ),
1005
 
1006
 
1007
 
1008
- 'Digg' => array(
1009
 
1010
 
1011
 
1012
- 'favicon' => 'digg.png',
1013
 
1014
 
1015
 
1016
- 'url' => 'http://digg.com/submit?phase=2&amp;url=PERMALINK&amp;title=TITLE&amp;bodytext=EXCERPT',
1017
 
1018
 
1019
 
1020
- 'spriteCoordinates' => Array(
1021
 
1022
 
1023
 
1024
- '16' => array("-32px","0px"),
1025
 
1026
 
1027
 
1028
- '32' => array("-64px","0px"),
1029
 
1030
 
1031
 
1032
- '48' => array("-96px","0px"),
1033
 
1034
 
1035
 
1036
- '64' => array("-128px","0px")
1037
 
1038
 
1039
 
1040
- )
1041
 
1042
 
1043
 
1044
- ),
1045
 
1046
 
1047
 
1048
- 'Digg Counter' => array(
1049
 
1050
- 'counter' =>1,
1051
 
1052
- 'favicon' => 'digg.png',
1053
 
 
1054
 
1055
 
1056
- 'url' => "<script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=PERMALINK&amp;title=TITLE' class='DiggThisButton DiggCompact'></a>",
1057
 
 
1058
 
1059
 
1060
- 'spriteCoordinates' => Array(
1061
 
1062
 
1063
 
1064
- '16' => array("-32px","0px"),
1065
 
1066
 
1067
 
1068
- '32' => array("-64px","0px"),
1069
 
1070
 
1071
 
1072
- '48' => array("-96px","0px"),
1073
 
1074
 
1075
 
1076
- '64' => array("-128px","0px")
1077
 
1078
 
1079
 
1080
- )
1081
 
1082
 
 
1083
 
1084
- ),
1085
 
1086
 
1087
 
1088
-
1089
 
1090
-
1091
 
1092
-
1093
 
1094
-
1095
 
1096
- 'Reddit' => array(
1097
 
1098
 
1099
 
1100
- 'favicon' => 'reddit.png',
1101
 
1102
 
 
1103
 
1104
- 'url' => 'http://reddit.com/submit?url=PERMALINK&amp;title=TITLE',
1105
 
1106
 
1107
 
1108
- 'spriteCoordinates' => Array(
1109
 
1110
 
1111
 
1112
- '16' => array("-64px","-16px"),
1113
 
1114
 
1115
 
1116
- '32' => array("-128px","-32px"),
1117
 
1118
 
1119
 
1120
- '48' => array("-192px","-48px"),
1121
 
1122
 
 
1123
 
1124
- '64' => array("-256px","-64px")
1125
 
1126
 
1127
 
1128
- )
1129
 
1130
 
1131
 
1132
- ),
1133
 
1134
 
1135
 
1136
-
1137
 
 
1138
 
1139
 
1140
- 'StumbleUpon' => array(
1141
 
1142
 
1143
 
1144
- 'favicon' => 'stumbleupon.png',
1145
 
1146
 
1147
 
1148
- 'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE',
1149
 
1150
 
1151
 
1152
- 'spriteCoordinates' => Array(
1153
 
1154
 
1155
 
1156
- '16' => array("-112px","-16px"),
1157
 
1158
 
1159
 
1160
- '32' => array("-224px","-32px"),
1161
 
1162
 
1163
 
1164
- '48' => array("-336px","-48px"),
1165
 
1166
 
 
1167
 
1168
- '64' => array("-448px","-64px")
1169
 
1170
 
1171
 
1172
- )),
1173
 
1174
-
1175
 
1176
- 'StumbleUpon Counter' => array(
1177
 
1178
- 'counter' =>1,
1179
 
1180
- 'favicon' => 'stumbleupon.png',
1181
 
1182
 
1183
 
1184
- 'url' => '<script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=PERMALINKCOUNT"></script>',
1185
 
1186
 
1187
 
1188
- 'spriteCoordinates' => Array(
1189
 
1190
 
1191
 
1192
- '16' => array("-112px","-16px"),
1193
 
1194
 
1195
 
1196
- '32' => array("-224px","-32px"),
1197
 
1198
 
 
1199
 
1200
- '48' => array("-336px","-48px"),
1201
 
1202
 
1203
 
1204
- '64' => array("-448px","-64px")
1205
 
1206
 
1207
 
1208
- )
1209
 
1210
 
1211
 
1212
- ),
1213
 
1214
- 'Google Bookmarks' => Array (
1215
 
1216
 
1217
 
1218
- 'favicon' => 'google.png',
1219
 
1220
 
1221
 
1222
- 'url' => 'http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=PERMALINK&amp;title=TITLE&amp;annotation=EXCERPT',
1223
 
1224
 
1225
 
1226
- 'description' => 'Google Bookmarks',
1227
 
1228
 
 
1229
 
1230
- 'spriteCoordinates' => Array(
1231
 
1232
 
1233
 
1234
- '16' => array("-96px","0px"),
1235
 
1236
 
1237
 
1238
- '32' => array("-192px","0px"),
1239
 
1240
 
1241
 
1242
- '48' => array("-288px","0px"),
1243
 
 
1244
 
1245
 
1246
- '64' => array("-384px","0px")
1247
 
1248
 
1249
 
1250
- )
1251
 
1252
 
1253
 
1254
- ),
1255
 
1256
-
1257
 
1258
- 'Google +' => Array (
1259
 
1260
-
 
 
 
 
 
 
 
 
 
1261
 
1262
- 'counter' =>1,
1263
 
1264
 
1265
 
1266
- 'favicon' => 'google.png',
1267
 
1268
 
1269
 
1270
- /* 'url' => '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
1271
 
1272
- <g:plusone annotation="bubble" size="medium"></g:plusone>',*/
1273
 
1274
- 'url' => '<g:plusone annotation="bubble" href="PERMALINKCOUNT" size="medium"></g:plusone>',
1275
 
1276
  /*
1277
 
1278
- <script type="text/javascript">
1279
 
1280
- window.___gcfg = {
1281
 
1282
- lang: \'en-US\'
1283
 
1284
- };
1285
 
1286
 
1287
 
1288
- (function() {
1289
 
1290
- var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
1291
 
1292
- po.src = \'https://apis.google.com/js/plusone.js\';
1293
 
1294
- var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
1295
 
1296
- })();
1297
 
1298
- </script>
1299
 
1300
- ',*/
1301
 
1302
 
1303
 
1304
- 'description' => 'Google Bookmarks',
1305
 
1306
 
1307
 
1308
- 'spriteCoordinates' => Array(
1309
 
1310
 
1311
 
1312
- '16' => array("-96px","0px"),
 
1313
 
1314
 
1315
 
1316
- '32' => array("-192px","0px"),
1317
 
1318
 
1319
 
1320
- '48' => array("-288px","0px"),
1321
 
1322
 
1323
 
1324
- '64' => array("-384px","0px")
1325
 
 
1326
 
1327
 
1328
- )
1329
 
1330
 
1331
 
1332
- ),
1333
 
1334
-
1335
 
1336
- 'HackerNews' => Array(
1337
 
1338
 
1339
 
1340
- 'favicon' => 'hacker_news.png',
1341
 
1342
 
1343
 
1344
- 'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&amp;t=TITLE',
1345
 
1346
 
1347
 
1348
- 'spriteCoordinates' => Array(
1349
 
1350
 
1351
 
1352
- '16' => array("-128px","0px"),
1353
 
 
1354
 
1355
 
1356
- '32' => array("-256px","0px"),
1357
 
 
1358
 
1359
 
1360
- '48' => array("-384px","0px"),
1361
 
1362
 
1363
 
1364
- '64' => array("-512px","0px")
1365
 
1366
 
 
1367
 
1368
- )
1369
 
1370
 
1371
 
1372
- ),
1373
 
1374
- 'MSNReporter' => Array(
1375
 
1376
 
 
1377
 
1378
- 'favicon' => 'msn.png',
1379
 
1380
 
1381
 
1382
- 'url' => 'http://reporter.es.msn.com/?fn=contribute&amp;Title=TITLE&amp;URL=PERMALINK&amp;cat_id=6&amp;tag_id=31&amp;Remark=EXCERPT',
1383
 
1384
 
1385
 
1386
- 'description' => 'MSN Reporter',
1387
 
1388
 
1389
 
1390
- 'spriteCoordinates' => Array(
1391
 
1392
 
1393
 
1394
- '16' => array("-176px","0px"),
1395
 
 
1396
 
1397
 
1398
- '32' => array("-352px","0px"),
1399
 
1400
 
1401
 
1402
- '48' => array("-528px","0px"),
1403
 
1404
 
 
1405
 
1406
- '64' => array("-704px","0px")
1407
 
1408
 
1409
 
1410
- )
1411
 
 
1412
 
 
1413
 
1414
- ),
1415
 
1416
 
 
1417
 
1418
-
1419
 
1420
- 'BlinkList' => Array(
1421
 
1422
- 'favicon' => 'blinklist.png',
1423
 
1424
- 'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=PERMALINK&amp;Title=TITLE',
1425
 
1426
- 'spriteCoordinates' => Array(
1427
 
1428
 
1429
 
1430
- '16' => array("0px","0px"),
1431
 
1432
 
 
1433
 
1434
- '32' => array("0px","0px"),
1435
 
1436
 
1437
 
1438
- '48' => array("0px","0px"),
1439
 
1440
 
1441
 
1442
- '64' => array("0px","0px")
1443
 
1444
 
1445
 
1446
- ),
1447
 
1448
- 'supportsIframe' => false,
1449
 
1450
- ),
1451
 
1452
- 'Sphinn' => Array(
1453
 
1454
- 'favicon' => 'sphinn.png',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1455
 
1456
- 'url' => 'http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=PERMALINK',
1457
 
1458
- 'spriteCoordinates' => Array(
1459
 
1460
 
1461
 
1462
- '16' => array("-96px","-16px"),
1463
 
1464
 
 
1465
 
1466
- '32' => array("-192px","-32px"),
1467
 
1468
 
 
1469
 
1470
- '48' => array("-288px","-48px"),
1471
 
1472
 
 
1473
 
1474
- '64' => array("-384px","-64px")
1475
 
1476
 
 
1477
 
1478
- )
1479
 
1480
- ),
1481
 
1482
-
1483
 
1484
- 'Posterous' => Array(
1485
 
1486
- 'favicon' => 'posterous.png',
1487
 
1488
- 'url' => 'http://posterous.com/share?linkto=PERMALINK&amp;title=TITLE&amp;selection=EXCERPT',
1489
 
1490
- 'spriteCoordinates' => Array(
1491
 
1492
 
 
1493
 
1494
- '16' => array("-32px","-16px"),
1495
 
1496
 
1497
 
1498
- '32' => array("-64px","-32px"),
1499
 
1500
 
1501
 
1502
- '48' => array("-96px","-48px"),
1503
 
1504
 
1505
 
1506
- '64' => array("-128px","-64px")
1507
 
1508
 
1509
 
1510
- )
1511
 
1512
- ),
1513
 
1514
- 'Tumblr' => Array(
1515
 
1516
- 'favicon' => 'tumblr.png',
1517
 
1518
- 'url' => 'http://www.tumblr.com/share?v=3&amp;u=PERMALINK&amp;t=TITLE&amp;s=EXCERPT',
1519
 
1520
- 'spriteCoordinates' => Array(
1521
 
1522
 
1523
 
1524
- '16' => array("-128px","-16px"),
1525
 
1526
 
1527
 
1528
- '32' => array("-256px","-32px"),
1529
 
1530
 
1531
 
1532
- '48' => array("-384px","-48px"),
1533
 
1534
 
1535
 
1536
- '64' => array("-512px","-64px")
1537
 
1538
 
1539
 
1540
- ),
1541
 
1542
- 'supportsIframe' => false
1543
 
1544
- ),
1545
 
1546
- 'email' => Array(
1547
 
1548
- 'favicon' => 'gmail.png',
1549
 
1550
- 'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su=TITLE&body=PERMALINK&ui=2&tf=1&shva=1',
1551
 
1552
- 'spriteCoordinates' => Array(
1553
 
1554
 
 
1555
 
1556
- '16' => array("-80px","0px"),
1557
 
1558
 
1559
 
1560
- '32' => array("-160px","0px"),
1561
 
1562
 
1563
 
1564
- '48' => array("-240px","0px"),
1565
 
1566
 
1567
 
1568
- '64' => array("-320px","0px")
1569
 
1570
 
1571
 
1572
- ),
1573
 
1574
- 'supportsIframe' => false
1575
 
1576
- ),
1577
 
1578
-
1579
 
1580
- 'Google Reader' => array (
1581
 
1582
- 'favicon' => 'googlebuzz.png',
1583
 
1584
- 'url' => 'http://www.google.com/reader/link?url=PERMALINK&amp;title=TITLE&amp;srcURL=PERMALINK&amp;srcTitle=BLOGNAME',
1585
 
1586
- 'spriteCoordinates' => Array(
1587
 
1588
 
1589
 
1590
- '16' => array("-112px","0px"),
1591
 
1592
 
1593
 
1594
- '32' => array("-224px","0px"),
1595
 
 
1596
 
1597
 
1598
- '48' => array("-336px","0px"),
1599
 
 
1600
 
1601
 
1602
- '64' => array("-448px","0px")
1603
 
1604
 
1605
 
1606
- )
1607
 
1608
- ),
1609
 
1610
- 'Add to favorites' => array(
1611
 
1612
- 'favicon' => 'favorites.png',
1613
 
1614
- 'url' => 'javascript:AddToFavorites();',
1615
 
1616
- 'spriteCoordinates' => Array(
1617
 
1618
 
1619
 
1620
- '16' => array("-64px","0px"),
1621
 
1622
 
1623
 
1624
- '32' => array("-128px","0px"),
1625
 
1626
 
 
1627
 
1628
- '48' => array("-192px","0px"),
1629
 
1630
 
1631
 
1632
- '64' => array("-256px","0px")
1633
 
1634
 
1635
 
1636
- )
1637
 
1638
- ),
1639
 
1640
- 'More' => array(
1641
 
1642
- 'favicon' => 'more.png',
1643
 
1644
- 'url' => 'javascript:more();',
1645
 
1646
- 'spriteCoordinates' => Array(
1647
 
1648
 
1649
 
1650
- '16' => array("0px","0px"),
1651
 
1652
 
1653
 
1654
- '32' => array("0px","0px"),
1655
 
1656
 
1657
 
1658
- '48' => array("0px","0px"),
1659
 
 
1660
 
1661
 
1662
- '64' => array("0px","0px")
1663
 
1664
 
1665
 
1666
- )
1667
 
1668
- ),
1669
 
1670
- );
1671
-
1672
-
1673
- //Update will create if it doesn't exist.
1674
 
1675
-
1676
- update_option( 'sociable_known_sites' , $sociable_known_sites );
1677
- update_option( 'sociable_options' , $sociable_options );
1678
- update_option( 'sociable_helpus' , 1);
1679
- }
1680
 
1681
- function skyscraper_reset(){
1682
 
1683
- $skyscraper_options = array(
1684
- "version" => "1.0",
1685
- "widget_width" => "60px",
1686
- "widget_position" => "1",
1687
- "background_color" => "#fefefe",
1688
- "labels_color" => "#f7f7f7",
1689
- "text_size" => "10px",
1690
- "counters" => array("check" => "0",
1691
- "folded" => "0"),
1692
- "share" => array("check" => "0",
1693
- "folded" => "0"),
1694
- "num_tweets" => 3,
1695
- "num_rss" =>3,
1696
- "locations" => array("is_front_page" => 1,
1697
- "is_home" => 1,
1698
- "is_single" => 1,
1699
- "is_page" => 1,
1700
- "is_category" => 1,
1701
- "is_date" => 1,
1702
- "is_tag" => 1,
1703
- "is_author" => 1,
1704
- "is_search" => 1,
1705
- "is_rss" => 1 ),
1706
-
1707
- "counters" => array("check" => 1,
1708
- "folded" => 1),
1709
- "share" => array("check" => 1,
1710
- "folded" => 1),
1711
- "active" => 1
1712
-
1713
- );
1714
 
1715
- update_option( 'skyscraper_options' , $skyscraper_options );
1716
-
1717
-
1718
- $skyscraper_latest = array();
1719
- update_option("skyscraper_latest",$skyscraper_latest );
1720
-
1721
- $skyscraper_mentions = array();
1722
- update_option("skyscraper_mentions",$skyscraper_mentions );
1723
- }
1724
 
1725
 
1726
 
@@ -1730,63 +4020,57 @@ function skyscraper_reset(){
1730
 
1731
 
1732
 
1733
- /*
1734
 
1735
 
1736
 
1737
 
1738
 
1739
- * De-Activate Function
1740
 
1741
 
1742
 
1743
 
1744
 
1745
- */
1746
 
1747
 
1748
 
1749
 
 
1750
 
1751
- function sociable_deactivate(){
1752
 
1753
 
1754
 
1755
 
1756
 
1757
- // global $wpdb;
1758
 
1759
 
1760
 
1761
 
1762
 
1763
- // //Delete The Metadata
1764
 
1765
 
1766
 
1767
 
1768
 
1769
- // $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
1770
 
1771
 
1772
 
1773
 
1774
 
1775
- // //delete The Options
1776
 
 
1777
 
1778
 
1779
 
1780
 
1781
- // return delete_option( 'sociable_options' );
1782
 
1783
 
1784
 
1785
 
1786
 
1787
- }
1788
 
1789
 
 
1790
 
1791
 
1792
 
@@ -1796,91 +4080,80 @@ function sociable_deactivate(){
1796
 
1797
 
1798
 
1799
- /*
1800
 
1801
 
 
1802
 
1803
 
1804
 
1805
- * Function To Completely Remove The Options
1806
 
1807
 
1808
 
1809
 
1810
 
1811
- */
1812
 
1813
 
1814
 
1815
 
1816
 
1817
- function sociable_2_remove(){
1818
 
1819
 
1820
 
1821
 
1822
 
1823
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
1824
 
1825
 
1826
 
1827
 
1828
 
1829
-
1830
 
1831
 
1832
 
1833
 
1834
 
1835
- global $wpdb;
1836
 
1837
 
1838
 
1839
 
1840
 
1841
- //Delete The Metadata
1842
 
1843
 
1844
 
1845
 
1846
 
1847
- $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
1848
 
1849
 
1850
 
1851
 
1852
 
1853
- //delete The Options
1854
 
1855
 
1856
 
 
1857
 
1858
 
1859
- delete_option( 'sociable_options' );
1860
 
1861
 
1862
 
1863
 
1864
 
1865
-
1866
 
1867
 
1868
 
1869
 
 
1870
 
1871
- deactivate_plugins( array( 'sociable-2/sociable-2.php' ) );
1872
 
1873
 
1874
 
1875
 
1876
 
1877
- wp_redirect( '/wp-admin/plugins.php?deactivate=true' );
1878
 
1879
 
1880
 
1881
 
1882
 
1883
- }
1884
 
1885
 
1886
 
@@ -1892,75 +4165,59 @@ function sociable_2_remove(){
1892
 
1893
 
1894
 
1895
- /*
1896
 
 
1897
 
1898
 
1899
 
1900
 
1901
- * Generic Plugin Wide Functions
1902
 
1903
 
1904
 
1905
 
1906
 
1907
- */
1908
 
1909
 
 
1910
 
1911
 
1912
 
1913
 
1914
 
1915
- function _get_sociable_image_path(){
1916
 
1917
 
1918
 
1919
- global $sociable_options;
1920
 
1921
 
1922
 
1923
-
1924
 
1925
 
1926
 
1927
- if( empty( $sociable_options['custom_icons'] )){
1928
 
1929
- if ($sociable_options['icon_option'] !="option6"){
1930
 
1931
- $path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/'.$sociable_options['icon_option']."/" . $sociable_options['icon_size'] );
1932
 
1933
- }else{
1934
 
1935
-
1936
 
1937
- $path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/original/');
1938
 
1939
- }
1940
 
1941
 
1942
 
1943
- } else {
1944
 
1945
 
1946
 
1947
- $path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/customIcons/');
1948
 
1949
 
1950
 
1951
- }
1952
 
1953
-
1954
 
1955
-
1956
 
1957
 
1958
 
1959
- return $path;
1960
 
1961
 
1962
 
1963
- }
1964
 
1965
 
1966
 
@@ -1974,73 +4231,66 @@ function _get_sociable_image_path(){
1974
 
1975
 
1976
 
1977
- function _get_sociable_image( $site, $description ){
1978
 
1979
- global $sociable_options;
1980
 
1981
 
1982
 
1983
- $imageclass = '';
1984
 
1985
 
1986
 
 
1987
 
1988
 
1989
- $imagestyle = '';
1990
 
1991
 
1992
 
1993
 
1994
 
1995
- $imagepath = _get_sociable_image_path();
1996
 
1997
 
1998
 
1999
 
2000
 
2001
- //Get The Source Of The Image
2002
 
2003
 
2004
 
 
2005
 
2006
 
2007
- if ( ! isset( $site['spriteCoordinates'] ) || ! isset( $sociable_options['use_sprites'] ) || is_feed() ) {
2008
 
2009
 
2010
 
2011
 
2012
 
 
2013
 
2014
 
2015
 
2016
 
2017
 
2018
 
2019
- if ( strpos( $site['favicon'], 'http' ) === 0 ) {
2020
 
2021
 
2022
 
2023
 
2024
 
2025
- $imagesource = $site['favicon'];
2026
 
2027
 
2028
 
2029
 
2030
 
2031
- } else {
2032
 
2033
 
2034
 
2035
 
2036
 
2037
- $imagesource = $imagepath.$site['favicon'];
2038
 
 
2039
 
2040
 
2041
 
2042
 
2043
- }
2044
 
2045
 
2046
 
@@ -2052,7 +4302,6 @@ global $sociable_options;
2052
 
2053
 
2054
 
2055
- } else {
2056
 
2057
 
2058
 
@@ -2061,19 +4310,19 @@ global $sociable_options;
2061
 
2062
 
2063
 
 
2064
 
2065
 
2066
 
2067
- $imagesource = $imagepath . "services-sprite.gif";
2068
 
2069
 
2070
 
2071
 
2072
 
2073
- $services_sprite_url = $imagepath . "sprite.png";
2074
 
2075
 
2076
 
 
2077
 
2078
 
2079
 
@@ -2082,23 +4331,22 @@ global $sociable_options;
2082
 
2083
 
2084
 
2085
- $spriteCoords = $site['spriteCoordinates'];
2086
 
2087
 
2088
 
 
2089
 
2090
 
2091
-
2092
 
2093
 
2094
 
2095
 
2096
 
2097
- $size = $sociable_options['icon_size'];
2098
 
2099
 
2100
 
2101
 
 
2102
 
2103
 
2104
 
@@ -2106,7 +4354,6 @@ global $sociable_options;
2106
 
2107
 
2108
 
2109
- $imagestyle = 'width: ' . $size . 'px; height: ' . $size . 'px; background: transparent url(' . $services_sprite_url . ') no-repeat; background-position:' . $spriteCoords[$size] . 'px 0';
2110
 
2111
 
2112
 
@@ -2118,31 +4365,28 @@ global $sociable_options;
2118
 
2119
 
2120
 
2121
- }
2122
 
2123
 
2124
 
2125
 
2126
 
 
2127
 
2128
 
2129
-
2130
 
2131
 
2132
 
2133
- if( isset( $sociable_options['use_alphamask'] ) ){
2134
 
2135
 
2136
 
2137
 
2138
 
2139
- $imageclass .= 'sociable-hovers';
2140
 
 
2141
 
2142
 
2143
 
2144
 
2145
- }
2146
 
2147
 
2148
 
@@ -2150,89 +4394,83 @@ global $sociable_options;
2150
 
2151
 
2152
 
 
2153
 
2154
 
2155
 
2156
 
2157
- //If A Class Has Been Specified, Ensure It Is Added To The Class Attribute.
2158
 
2159
 
2160
 
2161
 
2162
 
2163
- if ( isset( $site['class'] ) ) {
2164
 
2165
 
2166
 
2167
 
2168
 
2169
- $imageclass .= 'sociable_' . $site['class'];
2170
 
 
2171
 
2172
 
2173
 
2174
 
2175
- }
2176
 
2177
 
2178
 
 
2179
 
2180
 
2181
 
 
2182
 
2183
 
2184
 
 
2185
 
2186
 
2187
- if( $imagestyle != '' ){
2188
 
 
2189
 
2190
 
2191
 
2192
 
2193
- $imagestyle = 'style="' . $imagestyle . '"';
2194
 
2195
 
2196
 
2197
 
2198
 
2199
- }
2200
 
2201
 
 
2202
 
2203
 
2204
 
2205
 
2206
 
2207
- if ($sociable_options['icon_option'] !="option6"){
2208
 
2209
 
2210
 
2211
- $image = '<img src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
2212
 
2213
- }else{
2214
 
2215
- $image = '<img class="' . $imageclass . '" src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
2216
 
2217
- }
2218
 
2219
 
2220
 
2221
 
2222
 
2223
-
2224
 
2225
 
2226
 
2227
 
2228
 
2229
- return $image;
2230
 
 
2231
 
2232
 
2233
 
2234
 
2235
- }
2236
 
2237
 
2238
 
6
 
7
 
8
 
 
9
 
10
 
11
 
12
 
13
 
 
14
 
15
 
16
 
17
+ /*
18
 
19
 
 
20
 
21
 
22
 
23
 
24
 
 
25
 
26
 
27
 
28
 
29
+ Plugin Name: Sociable
30
 
 
31
 
32
 
33
 
34
 
35
 
 
36
 
37
 
38
 
39
 
40
 
41
+ Plugin URI: http://blogplay.com/plugin
42
 
43
 
44
 
50
 
51
 
52
 
53
+ Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
54
 
55
 
56
 
57
 
58
 
 
59
 
60
 
61
 
62
 
63
 
 
64
 
65
+ Version: 4.1.8
66
 
67
 
68
 
74
 
75
 
76
 
77
+ Author: Blogplay
78
 
 
79
 
80
 
81
 
82
 
83
 
 
84
 
85
 
86
 
87
 
88
 
89
+ Author URI: http://blogplay.com/
90
 
91
 
92
 
93
 
94
 
 
95
 
96
 
97
 
103
 
104
 
105
 
 
106
 
107
 
108
 
109
 
110
 
 
111
 
112
 
113
+ Copyright 2006 Peter Harkins (ph@malaprop.org)
114
 
115
 
116
 
 
117
 
118
 
119
 
120
 
121
 
 
122
 
123
 
124
 
125
+ Copyright 2008-2009 Joost de Valk (joost@yoast.com)
126
 
127
 
128
 
131
 
132
 
133
 
 
134
 
135
 
136
 
137
+ Copyright 2009-Present Blogplay.com (info@blogplay.com)
138
 
139
 
 
140
 
141
 
142
 
143
 
144
 
 
145
 
146
 
147
 
159
 
160
 
161
 
 
162
 
163
 
164
 
165
+ This program is free software; you can redistribute it and/or modify
166
 
167
 
168
 
171
 
172
 
173
 
 
174
 
175
 
176
 
177
+ it under the terms of the GNU General Public License as published by
178
 
179
 
 
180
 
181
 
182
 
183
 
184
 
 
185
 
186
 
187
 
188
 
189
+ the Free Software Foundation; either version 2 of the License, or
190
 
191
 
 
192
 
193
 
194
 
195
 
196
 
 
197
 
198
 
199
 
200
 
201
+ (at your option) any later version.
202
 
203
 
204
 
206
 
207
 
208
 
 
209
 
210
 
211
 
212
 
213
 
 
214
 
215
 
216
 
217
 
218
 
 
219
 
220
 
221
 
222
 
223
 
 
224
 
225
+ This program is distributed in the hope that it will be useful,
226
 
 
227
 
228
 
 
229
 
230
 
231
 
232
 
233
 
 
234
 
235
 
236
 
237
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
238
 
239
 
240
 
243
 
244
 
245
 
 
246
 
247
 
248
 
249
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
250
 
251
 
 
252
 
253
 
254
 
255
 
256
 
 
257
 
258
 
259
 
260
 
261
+ GNU General Public License for more details.
262
 
 
263
 
264
 
265
 
266
 
267
 
 
268
 
 
269
 
 
270
 
 
 
271
 
272
 
273
 
274
 
275
 
 
276
 
277
 
278
 
279
 
280
 
 
281
 
282
 
283
 
284
 
285
+ You should have received a copy of the GNU General Public License
286
 
287
 
288
 
290
 
291
 
292
 
 
293
 
294
 
295
 
296
 
297
+ along with this program; if not, write to the Free Software
298
 
 
299
 
300
 
301
 
302
 
303
 
 
304
 
305
 
306
 
307
 
308
 
309
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
310
 
 
 
 
 
 
 
311
 
 
312
 
 
 
 
 
313
 
 
314
 
 
315
 
 
316
 
 
 
317
 
 
 
318
 
 
319
 
 
320
 
 
 
321
 
 
322
 
 
 
323
 
 
 
 
 
324
 
 
325
 
326
 
327
 
333
 
334
 
335
 
 
336
 
337
 
338
 
339
 
340
 
 
341
 
342
 
343
 
344
 
345
+ */
346
 
 
347
 
348
 
349
 
350
 
351
 
 
352
 
353
 
354
 
355
 
 
 
356
 
357
 
358
 
359
 
 
360
 
361
 
362
 
363
 
364
 
 
365
 
366
 
367
 
368
 
369
+ /*
370
 
371
 
372
 
373
 
374
 
375
 
 
376
 
 
377
 
 
378
 
 
379
 
380
 
381
+ * Define Some Paths
382
 
383
 
384
 
386
 
387
 
388
 
 
389
 
390
 
391
 
392
 
393
+ */
394
 
395
 
 
396
 
397
 
398
 
400
 
401
 
402
 
 
403
 
404
 
405
 
406
 
407
+ define( 'SOCIABLE_HTTP_PATH' , WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
408
 
 
409
 
410
 
411
 
412
 
413
 
 
414
 
415
 
416
 
417
 
418
 
419
+ define( 'SOCIABLE_ABSPATH' , WP_PLUGIN_DIR . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
420
 
421
 
422
 
423
 
424
 
 
425
 
426
 
427
 
428
 
429
 
 
430
 
431
 
432
 
433
 
434
 
 
435
 
436
 
437
 
438
 
439
 
 
440
 
441
 
442
 
443
+ /*
444
 
445
 
 
446
 
447
 
448
 
449
 
450
 
 
451
 
452
 
453
 
454
 
455
+ * Includes
456
 
457
 
458
 
459
 
460
 
 
461
 
462
 
463
 
464
 
465
 
 
466
 
467
+ */
468
 
469
 
470
 
471
 
 
472
 
473
 
474
 
475
 
476
 
 
477
 
478
 
479
+ include 'includes/class-sociable_Admin_Options.php';
480
 
481
 
 
482
 
 
483
 
 
484
 
485
+ include("includes/skyscraper_output.php");
486
 
 
487
 
 
488
 
489
 
490
 
491
+ include 'includes/class-Sociable_Globals.php';
492
 
493
 
494
 
 
495
 
496
 
497
 
 
498
 
499
 
500
 
 
501
 
502
 
503
+ include 'includes/sociable_output.php';
504
 
 
505
 
506
 
 
 
507
 
 
508
 
 
509
 
510
 
511
 
 
512
 
513
 
514
 
 
515
 
516
 
517
 
 
518
 
519
 
520
 
 
521
 
522
 
523
 
 
524
 
 
525
 
 
526
 
527
+ /*
528
 
 
529
 
 
530
 
 
531
 
 
532
 
 
533
 
 
534
 
 
535
 
 
536
 
 
537
 
 
538
 
539
+ * Global Variables
540
 
 
541
 
 
542
 
 
543
 
 
544
 
545
 
546
 
 
547
 
 
548
 
 
549
 
550
 
551
+ */
552
 
 
553
 
554
 
555
 
556
 
557
 
 
558
 
 
559
 
 
560
 
561
 
562
 
563
+ //$sociable_known_sites = Sociable_Globals::default_sites();
564
 
565
 
566
 
 
567
 
568
 
569
 
 
570
 
571
 
572
 
 
573
 
574
 
575
+ $sociable_options = get_option( 'sociable_options' );
576
 
 
577
 
578
 
579
+ $skyscraper_options = get_option( 'skyscraper_options' );
580
 
 
581
 
582
 
583
+ $skyscraper_latest = get_option( 'skyscraper_latest' );
584
 
 
585
 
586
 
587
+ $skyscraper_mentions = get_option( 'skyscraper_mentions' );
588
 
589
+ //print_r($sociable_options);
590
 
 
591
 
 
592
 
 
593
 
 
594
 
 
595
 
596
 
597
 
 
598
 
 
599
 
 
600
 
601
+ //$sociable_post_types = array(); //Set This blank here, won't work before init
602
 
603
 
 
604
 
605
 
606
 
 
607
 
608
 
609
 
 
610
 
611
 
612
 
613
+ //$sociable_taxonomies = array(); //Same Here
614
 
615
 
616
 
 
617
 
 
618
 
619
 
620
 
 
621
 
622
 
623
 
 
624
 
625
 
626
 
 
627
 
628
 
629
 
 
630
 
631
 
632
 
 
633
 
634
 
635
 
 
636
 
637
+ /*
638
 
639
 
 
640
 
641
 
642
 
 
643
 
644
 
645
 
 
646
 
647
 
648
 
649
+ * General Init Function
650
 
651
 
652
 
 
653
 
654
 
655
 
 
656
 
657
 
658
 
 
659
 
660
 
661
+ */
662
 
 
663
 
664
 
665
 
 
666
 
667
 
668
 
 
669
 
670
 
671
 
 
672
 
673
+ function sociable_init(){
674
 
675
 
 
676
 
677
+ wp_enqueue_script('jquery');
678
 
679
+ wp_enqueue_script( 'oplugin' , SOCIABLE_HTTP_PATH . 'js/async_call.js' );
680
 
681
+ wp_enqueue_script( 'async_call' , SOCIABLE_HTTP_PATH . 'js/oPlugin.js' );
682
 
683
+ wp_enqueue_style("skyscraper_style_shape",SOCIABLE_HTTP_PATH."/css/shape.css");
684
 
685
+ wp_enqueue_style("skyscraper_style_toolbar", SOCIABLE_HTTP_PATH."/css/toolbar.css");
686
 
687
+ global $sociable_post_types, $sociable_taxonomies, $sociable_options, $skyscraper_options;
688
 
689
 
690
 
691
+ if (!isset($sociable_options['icon_size']) || $sociable_options['icon_size'] == "" || !isset($sociable_options['version'])) sociable_reset();
692
 
 
693
 
 
694
 
695
+
696
 
697
+ if ( $skyscraper_options['version'] != "1.0" ){
698
 
699
+ skyscraper_reset();
700
 
701
+ }
702
 
703
 
 
704
 
705
+ //echo dirname( plugin_basename( __FILE__ ) )."/includes"
706
 
707
 
 
708
 
709
+ load_plugin_textdomain( 'sociable', false, dirname( plugin_basename( __FILE__ ) )."/languages" );
710
 
711
 
 
712
 
713
+ $active_sites = ( isset( $sociable_options['active_sites'] ) ) ? $sociable_options['active_sites'] : array() ;
714
 
715
 
 
716
 
717
+ //Set The Post Types
718
 
719
+ $sociable_post_types = Sociable_Globals::sociable_get_post_types();
720
 
 
721
 
722
 
723
+ //Set The Custom Taxonomies
724
 
725
+ $sociable_taxonomies = Sociable_Globals::sociable_get_taxonomies();
726
 
727
 
728
 
729
+ wp_enqueue_script( 'sociable' , SOCIABLE_HTTP_PATH . 'js/sociable.js' );
730
 
 
731
 
 
732
 
733
+ wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
734
 
 
735
 
736
 
737
+ if( ! is_admin() ){
738
 
739
+ //Load Up The Front Of Site CSS And JS
740
 
741
 
742
 
743
+ if( array_key_exists( 'Add to favorites' , $active_sites ) ){
744
 
745
 
746
 
747
+ // wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
748
 
749
+ }
750
 
751
 
 
752
 
753
+ if( isset( $sociable_options['use_stylesheet'] ) ){
754
 
755
+ wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
756
 
757
+ }
758
 
759
+ }
760
 
761
 
 
762
 
763
+ }
764
 
765
 
 
766
 
767
 
768
 
 
769
 
770
 
771
 
 
772
 
773
 
774
 
 
775
 
 
776
 
 
777
 
 
778
 
779
 
780
 
 
781
 
782
 
783
 
 
784
 
785
 
786
 
787
+ /*
788
 
789
 
790
 
 
791
 
792
 
793
 
 
794
 
795
 
796
 
 
797
 
798
 
799
+ * Hooks And Filters
800
 
 
801
 
802
 
803
 
 
804
 
805
 
806
 
 
807
 
808
 
809
 
 
810
 
811
+ */
812
 
813
 
 
814
 
815
 
816
 
 
817
 
818
 
819
 
 
820
 
821
 
822
 
823
+ add_action( 'admin_init' , array( 'sociable_Admin_Options' , 'init' ) );
824
 
825
 
826
 
 
827
 
828
 
829
 
 
830
 
831
 
832
 
833
+ add_action( 'admin_menu' , array( 'sociable_Admin_Options' , 'add_menu_pages' ) );
834
 
835
+
836
 
837
 
 
838
 
839
 
840
 
 
841
 
842
 
843
 
 
844
 
845
+ add_action( 'save_post' , array( 'sociable_Admin_Options' , 'save_post' ) );
846
 
847
 
 
848
 
849
 
850
 
 
851
 
852
 
853
 
 
854
 
855
 
856
 
857
+ add_action( 'init' , 'sociable_init' );
858
 
859
 
860
 
 
861
 
862
 
863
 
 
864
 
865
 
866
 
 
867
 
868
 
869
 
 
870
 
871
 
872
 
 
873
 
874
 
875
 
 
876
 
877
 
878
 
879
+ add_filter( 'the_content', 'auto_sociable' );
880
 
881
 
882
 
883
+ //add_filter( 'get_pages', 'auto_skyscraper' );
884
 
 
885
 
 
886
 
887
+ //add_filter( 'the_excerpt', 'auto_skyscraper' );
888
 
889
 
 
890
 
891
+ add_filter( 'the_excerpt', 'auto_sociable' );
892
 
893
 
 
894
 
895
 
896
 
 
897
 
898
 
899
 
 
900
 
901
 
902
 
 
903
 
904
 
905
 
 
906
 
907
 
908
 
 
909
 
910
 
911
+ register_activation_hook(__FILE__, 'sociable_activate' );
912
 
 
913
 
914
 
915
 
 
916
 
 
917
 
 
918
 
 
919
 
 
920
 
921
 
922
 
 
923
 
924
 
925
+ register_deactivation_hook( __FILE__, 'sociable_deactivate' );
926
 
 
927
 
928
 
929
 
 
930
 
931
 
932
 
 
933
 
934
 
935
 
 
936
 
937
 
938
 
 
939
 
940
 
941
+ /*
942
 
 
943
 
944
 
945
 
 
946
 
947
 
948
 
 
949
 
950
 
951
 
 
952
 
953
+ * Activation Function
954
 
955
 
 
956
 
957
 
958
 
 
959
 
960
 
961
 
 
962
 
963
 
964
 
965
+ */
966
 
967
 
968
 
 
969
 
970
 
971
 
 
972
 
973
 
974
 
 
975
 
976
 
977
+ function sociable_activate(){
978
 
 
979
 
980
 
981
 
 
982
 
 
983
 
 
984
 
 
985
 
 
986
 
987
 
988
 
989
+
990
 
991
 
992
 
 
993
 
994
 
995
 
 
996
 
997
 
998
 
 
999
 
1000
 
1001
+ if( ! get_option( 'sociable_options' ) ){
1002
 
 
1003
 
1004
 
1005
 
 
1006
 
1007
 
1008
 
 
1009
 
1010
 
1011
 
 
1012
 
1013
+ return sociable_reset();
1014
 
1015
 
1016
 
 
1017
 
1018
 
1019
 
 
1020
 
1021
 
1022
 
 
1023
 
1024
 
1025
+ }
1026
 
 
1027
 
1028
 
1029
 
 
1030
 
1031
 
1032
 
 
1033
 
1034
 
1035
 
 
1036
 
1037
+
1038
 
1039
 
 
1040
 
1041
 
1042
 
 
1043
 
1044
 
1045
 
 
1046
 
 
1047
 
 
1048
 
1049
+ }
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
 
 
1060
 
1061
 
1062
 
 
1063
 
1064
 
1065
 
 
1066
 
 
1067
 
 
1068
 
1069
  /*
1070
 
 
1071
 
 
1072
 
 
1073
 
 
1074
 
1075
 
1076
 
 
1077
 
 
1078
 
 
1079
 
 
1080
 
1081
+ * Reset Function
1082
 
 
1083
 
 
1084
 
1085
 
1086
 
 
1087
 
1088
 
1089
 
 
1090
 
1091
 
1092
 
1093
+ */
1094
+
1095
 
1096
 
1097
 
 
1098
 
1099
 
1100
 
 
1101
 
1102
 
1103
 
 
1104
 
1105
+ function sociable_reset(){
1106
 
1107
 
 
1108
 
1109
 
1110
 
1111
+ global $wpdb;
1112
 
 
1113
 
 
1114
 
1115
 
1116
 
1117
+ //reset all data to factory defaults, install if is there.
1118
 
1119
 
1120
 
1121
+ //Delete All Metadata From The Database ?
1122
 
1123
 
1124
 
1125
+ $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
1126
 
1127
 
1128
 
1129
+
1130
 
1131
+ $sociable_options = array(
1132
 
1133
 
 
1134
 
1135
+ 'version' =>'4.1.8',
1136
 
1137
 
 
1138
 
1139
 
1140
 
 
1141
 
1142
 
1143
+ 'automatic_mode' => 'on',
1144
 
 
1145
 
1146
 
1147
 
 
1148
 
 
1149
 
1150
 
1151
+ 'tagline' => 'Be Sociable, Share!',
1152
 
 
1153
 
1154
 
1155
 
 
1156
 
1157
 
1158
 
1159
+ 'custom_image_directory' => '',
1160
 
1161
 
1162
 
 
1163
 
1164
 
1165
 
 
1166
 
1167
+ 'use_stylesheet' => 'on',
1168
 
1169
 
 
1170
 
1171
 
1172
 
 
1173
 
1174
 
1175
+ 'use_images' => 'on',
1176
 
 
1177
 
1178
 
1179
 
 
1180
 
1181
+ 'use_alphamask' => 'on',
1182
 
1183
+ 'new_window' => 'on',
1184
 
 
1185
 
1186
 
1187
+
1188
 
 
1189
 
 
1190
 
1191
+ 'help_grow' => 'on',
1192
 
 
1193
 
 
1194
 
1195
 
1196
 
 
1197
 
1198
 
1199
+ 'locations' => array(
1200
 
 
1201
 
1202
 
1203
 
 
1204
 
1205
 
1206
 
1207
+ 'is_single' => 'on',
1208
 
1209
 
1210
 
 
1211
 
 
1212
 
 
1213
 
 
1214
 
1215
+ 'is_page' => 'on'
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+ ),
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+ 'active_sites' => array(
1232
+
1233
+
1234
+
1235
+ 'Twitter' => 'on',
1236
+
1237
+
1238
+
1239
+ 'Facebook' => 'on',
1240
+
1241
+
1242
+
1243
+ 'email'=>'on',
1244
+
1245
+
1246
+
1247
+ 'Add to favorites'=>'on',
1248
+
1249
+
1250
+
1251
+ 'StumbleUpon' =>'on',
1252
+
1253
+
1254
+
1255
+ 'Delicious' =>'on',
1256
+
1257
+
1258
+
1259
+ 'Google Reader' =>'on',
1260
+
1261
+
1262
+
1263
+ 'LinkedIn' => 'on',
1264
+
1265
+
1266
+
1267
+ 'BlinkList' =>'on',
1268
+
1269
+
1270
+
1271
+ 'More' => 'on',
1272
+
1273
+
1274
+
1275
+ 'Twitter Counter' =>'on',
1276
+
1277
+
1278
+
1279
+ 'Facebook Counter' =>'on',
1280
+
1281
+
1282
+
1283
+ 'Google +' =>'on',
1284
+
1285
+
1286
+
1287
+ 'LinkedIn Counter' =>'on',
1288
+
1289
+
1290
+
1291
+ 'StumbleUpon Counter' =>'on'
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+ ),
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+ 'icon_size' => '32',
1312
+
1313
+
1314
+
1315
+ 'icon_option' => 'option1',
1316
+
1317
+
1318
+
1319
+ "active" => 1
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+ );
1328
+
1329
+
1330
+
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+
1339
+ $sociable_known_sites = array(
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+ 'Facebook' => array(
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+ 'favicon' => 'facebook.png',
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+ 'url' => 'http://www.facebook.com/share.php?u=PERMALINK&amp;t=TITLE',
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+
1370
+
1371
+ 'spriteCoordinates' => Array(
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+ '16' => array("-48px","0px"),
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+ '32' => array("-96px","0px"),
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+ '48' => array("-144px","0px"),
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+
1403
+ '64' => array("-192px","0px")
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+ )
1412
+
1413
+
1414
+
1415
+ ),
1416
+
1417
+
1418
+
1419
+
1420
+
1421
+
1422
+
1423
+ 'Facebook Counter' => array(
1424
+
1425
+
1426
+
1427
+ 'counter' =>1,
1428
+
1429
+
1430
+
1431
+ 'favicon' => 'likecounter.png',
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+ 'url' => '<iframe src="//www.facebook.com/plugins/like.php?href=PERMALINKCOUNT&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe>',
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+ 'spriteCoordinates' => Array(
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+ '16' => array("-48px","0px"),
1456
+
1457
+
1458
+
1459
+
1460
+
1461
+
1462
+
1463
+ '32' => array("-96px","0px"),
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+ '48' => array("-144px","0px"),
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+ '64' => array("-192px","0px")
1480
+
1481
+
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+ )
1488
+
1489
+
1490
+
1491
+ ),
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+ 'Myspace' => array(
1500
+
1501
+
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+ 'favicon' => 'myspace.png',
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+
1515
+ 'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&amp;t=TITLE',
1516
+
1517
+
1518
+
1519
+
1520
+
1521
+
1522
+
1523
+ 'spriteCoordinates' => Array(
1524
+
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+ '16' => array("0px","-16px"),
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+ '32' => array("0px","-32px"),
1540
+
1541
+
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+ '48' => array("0px","-48px"),
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+ '64' => array("0px","-64px")
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+ )
1564
+
1565
+
1566
+
1567
+
1568
+
1569
+
1570
+
1571
+ ),
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+
1578
+
1579
+ 'Twitter' => array(
1580
+
1581
+
1582
+
1583
+
1584
+
1585
+
1586
+
1587
+ 'favicon' => 'twitter.png',
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+ 'url' => 'http://twitter.com/intent/tweet?text=TITLE%20-%20PERMALINK%20(via%20@sociablesite)',
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+ 'spriteCoordinates' => Array(
1604
+
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+
1611
+ '16' => array("-144px","-16px"),
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+ '32' => array("-288px","-32px"),
1620
+
1621
+
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+ '48' => array("-432px","-48px"),
1628
+
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+ '64' => array("-576px","-64px")
1636
+
1637
+
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+ )
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+
1651
+ ),
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+ 'Twitter Counter' => array(
1660
+
1661
+
1662
+
1663
+ 'counter' =>1,
1664
+
1665
+
1666
+
1667
+ 'favicon' => 'twitter.png',
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+ 'url' => '<a href="https://twitter.com/share" data-text="TITLECOUNT - PERMALINKCOUNT (via #sociablesite)" data-url="PERMALINKCOUNT" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>',
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+
1682
+
1683
+ 'spriteCoordinates' => Array(
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+ '16' => array("-144px","-16px"),
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+
1699
+ '32' => array("-288px","-32px"),
1700
+
1701
+
1702
+
1703
+
1704
+
1705
+
1706
+
1707
+ '48' => array("-432px","-48px"),
1708
+
1709
+
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+ '64' => array("-576px","-64px")
1716
+
1717
+
1718
+
1719
+
1720
+
1721
+
1722
+
1723
+ )
1724
+
1725
+
1726
+
1727
+
1728
+
1729
+
1730
+
1731
+ ),
1732
+
1733
+
1734
+
1735
+
1736
+
1737
+
1738
+
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+
1745
+
1746
+
1747
+ 'LinkedIn' => array(
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+ 'favicon' => 'linkedin.png',
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+ 'url' => 'http://www.linkedin.com/shareArticle?mini=true&amp;url=PERMALINK&amp;title=TITLE&amp;source=BLOGNAME&amp;summary=EXCERPT',
1764
+
1765
+
1766
+
1767
+
1768
+
1769
+
1770
+
1771
+ 'spriteCoordinates' => Array(
1772
+
1773
+
1774
+
1775
+
1776
+
1777
+
1778
+
1779
+ '16' => array("-144px","0px"),
1780
+
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+ '32' => array("-288px","0px"),
1788
+
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+ '48' => array("-432px","0px"),
1796
+
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+ '64' => array("-576px","0px")
1804
+
1805
+
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+ )
1812
+
1813
+
1814
+
1815
+
1816
+
1817
+
1818
+
1819
+
1820
+
1821
+
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+ ),
1828
+
1829
+
1830
+
1831
+
1832
+
1833
+
1834
+
1835
+ 'LinkedIn Counter' => array(
1836
+
1837
+
1838
+
1839
+ 'counter'=>1,
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+ 'favicon' => 'linkedin.png',
1848
+
1849
+
1850
+
1851
+
1852
+
1853
+
1854
+
1855
+ 'url' => '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="PERMALINKCOUNT" data-counter="right"></script>',
1856
+
1857
+
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+ 'spriteCoordinates' => Array(
1864
+
1865
+
1866
+
1867
+
1868
+
1869
+
1870
+
1871
+ '16' => array("-144px","0px"),
1872
+
1873
+
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+ '32' => array("-288px","0px"),
1880
+
1881
+
1882
+
1883
+
1884
+
1885
+
1886
+
1887
+ '48' => array("-432px","0px"),
1888
+
1889
+
1890
+
1891
+
1892
+
1893
+
1894
+
1895
+ '64' => array("-576px","0px")
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+ )
1904
+
1905
+
1906
+
1907
+
1908
+
1909
+
1910
+
1911
+
1912
+
1913
+
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+ ),
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+
1931
+
1932
+
1933
+
1934
+
1935
+ 'Delicious' => array(
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+ 'favicon' => 'delicious.png',
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+
1950
+
1951
+ 'url' => 'http://delicious.com/post?url=PERMALINK&amp;title=TITLE&amp;notes=EXCERPT',
1952
+
1953
+
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+ 'spriteCoordinates' => Array(
1960
+
1961
+
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+ '16' => array("-16px","0px"),
1968
+
1969
+
1970
+
1971
+
1972
+
1973
+
1974
+
1975
+ '32' => array("-32px","0px"),
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+ '48' => array("-48px","0px"),
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+ '64' => array("-64px","0px")
1992
+
1993
+
1994
+
1995
+
1996
+
1997
+
1998
+
1999
+ )
2000
+
2001
+
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+ ),
2008
+
2009
+
2010
+
2011
+
2012
+
2013
+
2014
+
2015
+ 'Digg' => array(
2016
+
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+ 'favicon' => 'digg.png',
2024
+
2025
+
2026
+
2027
+
2028
+
2029
+
2030
+
2031
+ 'url' => 'http://digg.com/submit?phase=2&amp;url=PERMALINK&amp;title=TITLE&amp;bodytext=EXCERPT',
2032
+
2033
+
2034
+
2035
+
2036
+
2037
+
2038
+
2039
+ 'spriteCoordinates' => Array(
2040
+
2041
+
2042
+
2043
+
2044
+
2045
+
2046
+
2047
+ '16' => array("-32px","0px"),
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+ '32' => array("-64px","0px"),
2056
+
2057
+
2058
+
2059
+
2060
+
2061
+
2062
+
2063
+ '48' => array("-96px","0px"),
2064
+
2065
+
2066
+
2067
+
2068
+
2069
+
2070
+
2071
+ '64' => array("-128px","0px")
2072
+
2073
+
2074
+
2075
+
2076
+
2077
+
2078
+
2079
+ )
2080
+
2081
+
2082
+
2083
+
2084
+
2085
+
2086
+
2087
+ ),
2088
+
2089
+
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+ 'Digg Counter' => array(
2096
+
2097
+
2098
+
2099
+ 'counter' =>1,
2100
+
2101
+
2102
+
2103
+ 'favicon' => 'digg.png',
2104
+
2105
+
2106
+
2107
+
2108
+
2109
+
2110
+
2111
+ 'url' => "<script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=PERMALINK&amp;title=TITLE' class='DiggThisButton DiggCompact'></a>",
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+
2118
+
2119
+ 'spriteCoordinates' => Array(
2120
+
2121
+
2122
+
2123
+
2124
+
2125
+
2126
+
2127
+ '16' => array("-32px","0px"),
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+ '32' => array("-64px","0px"),
2136
+
2137
+
2138
+
2139
+
2140
+
2141
+
2142
+
2143
+ '48' => array("-96px","0px"),
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+
2150
+
2151
+ '64' => array("-128px","0px")
2152
+
2153
+
2154
+
2155
+
2156
+
2157
+
2158
+
2159
+ )
2160
+
2161
+
2162
+
2163
+
2164
+
2165
+
2166
+
2167
+ ),
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+
2174
+
2175
+
2176
+
2177
+
2178
+
2179
+
2180
+
2181
+
2182
+
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+ 'Reddit' => array(
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+
2198
+
2199
+ 'favicon' => 'reddit.png',
2200
+
2201
+
2202
+
2203
+
2204
+
2205
+
2206
+
2207
+ 'url' => 'http://reddit.com/submit?url=PERMALINK&amp;title=TITLE',
2208
+
2209
+
2210
+
2211
+
2212
+
2213
+
2214
+
2215
+ 'spriteCoordinates' => Array(
2216
+
2217
+
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+ '16' => array("-64px","-16px"),
2224
+
2225
+
2226
+
2227
+
2228
+
2229
+
2230
+
2231
+ '32' => array("-128px","-32px"),
2232
+
2233
+
2234
+
2235
+
2236
+
2237
+
2238
+
2239
+ '48' => array("-192px","-48px"),
2240
+
2241
+
2242
+
2243
+
2244
+
2245
+
2246
+
2247
+ '64' => array("-256px","-64px")
2248
+
2249
+
2250
+
2251
+
2252
+
2253
+
2254
+
2255
+ )
2256
+
2257
+
2258
+
2259
+
2260
+
2261
+
2262
+
2263
+ ),
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+
2275
+
2276
+
2277
+
2278
+
2279
+ 'StumbleUpon' => array(
2280
+
2281
+
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+ 'favicon' => 'stumbleupon.png',
2288
+
2289
+
2290
+
2291
+
2292
+
2293
+
2294
+
2295
+ 'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE',
2296
+
2297
+
2298
+
2299
+
2300
+
2301
+
2302
+
2303
+ 'spriteCoordinates' => Array(
2304
+
2305
+
2306
+
2307
+
2308
+
2309
+
2310
+
2311
+ '16' => array("-112px","-16px"),
2312
+
2313
+
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+ '32' => array("-224px","-32px"),
2320
+
2321
+
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+ '48' => array("-336px","-48px"),
2328
+
2329
+
2330
+
2331
+
2332
+
2333
+
2334
+
2335
+ '64' => array("-448px","-64px")
2336
+
2337
+
2338
+
2339
+
2340
+
2341
+
2342
+
2343
+ )),
2344
+
2345
+
2346
+
2347
+
2348
+
2349
+
2350
+
2351
+ 'StumbleUpon Counter' => array(
2352
+
2353
+
2354
+
2355
+ 'counter' =>1,
2356
+
2357
+
2358
+
2359
+ 'favicon' => 'stumbleupon.png',
2360
+
2361
+
2362
+
2363
+
2364
+
2365
+
2366
+
2367
+ 'url' => '<script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=PERMALINKCOUNT"></script>',
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+
2374
+
2375
+ 'spriteCoordinates' => Array(
2376
+
2377
+
2378
+
2379
+
2380
+
2381
+
2382
+
2383
+ '16' => array("-112px","-16px"),
2384
+
2385
+
2386
+
2387
+
2388
+
2389
+
2390
+
2391
+ '32' => array("-224px","-32px"),
2392
+
2393
+
2394
+
2395
+
2396
+
2397
+
2398
+
2399
+ '48' => array("-336px","-48px"),
2400
+
2401
+
2402
+
2403
+
2404
+
2405
+
2406
+
2407
+ '64' => array("-448px","-64px")
2408
+
2409
+
2410
+
2411
+
2412
+
2413
+
2414
+
2415
+ )
2416
+
2417
+
2418
+
2419
+
2420
+
2421
+
2422
+
2423
+ ),
2424
+
2425
+
2426
+
2427
+ 'Google Bookmarks' => Array (
2428
+
2429
+
2430
+
2431
+
2432
+
2433
+
2434
+
2435
+ 'favicon' => 'google.png',
2436
+
2437
+
2438
+
2439
+
2440
+
2441
+
2442
+
2443
+ 'url' => 'http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=PERMALINK&amp;title=TITLE&amp;annotation=EXCERPT',
2444
+
2445
+
2446
+
2447
+
2448
+
2449
+
2450
+
2451
+ 'description' => 'Google Bookmarks',
2452
+
2453
+
2454
+
2455
+
2456
+
2457
+
2458
+
2459
+ 'spriteCoordinates' => Array(
2460
+
2461
+
2462
+
2463
+
2464
+
2465
+
2466
+
2467
+ '16' => array("-96px","0px"),
2468
+
2469
+
2470
+
2471
+
2472
+
2473
+
2474
+
2475
+ '32' => array("-192px","0px"),
2476
+
2477
+
2478
+
2479
+
2480
+
2481
+
2482
+
2483
+ '48' => array("-288px","0px"),
2484
+
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+
2491
+ '64' => array("-384px","0px")
2492
+
2493
+
2494
+
2495
+
2496
+
2497
+
2498
+
2499
+ )
2500
+
2501
+
2502
+
2503
+
2504
+
2505
+
2506
+
2507
+ ),
2508
+
2509
+
2510
+
2511
+
2512
+
2513
+
2514
+
2515
+ 'Google +' => Array (
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+
2522
+
2523
+ 'counter' =>1,
2524
+
2525
+
2526
+
2527
+
2528
+
2529
+
2530
+
2531
+ 'favicon' => 'google.png',
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+
2539
+ /* 'url' => '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
2540
+
2541
+
2542
+
2543
+ <g:plusone annotation="bubble" size="medium"></g:plusone>',*/
2544
+
2545
+
2546
+
2547
+ 'url' => '<g:plusone annotation="bubble" href="PERMALINKCOUNT" size="medium"></g:plusone>',
2548
+
2549
+
2550
+
2551
+ /*
2552
+
2553
+
2554
+
2555
+ <script type="text/javascript">
2556
+
2557
+
2558
+
2559
+ window.___gcfg = {
2560
+
2561
+
2562
+
2563
+ lang: \'en-US\'
2564
+
2565
+
2566
+
2567
+ };
2568
+
2569
+
2570
+
2571
+
2572
+
2573
+
2574
+
2575
+ (function() {
2576
+
2577
+
2578
+
2579
+ var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
2580
+
2581
+
2582
+
2583
+ po.src = \'https://apis.google.com/js/plusone.js\';
2584
+
2585
+
2586
+
2587
+ var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
2588
+
2589
+
2590
+
2591
+ })();
2592
+
2593
+
2594
+
2595
+ </script>
2596
+
2597
+
2598
+
2599
+ ',*/
2600
+
2601
+
2602
+
2603
+
2604
+
2605
+
2606
+
2607
+ 'description' => 'Google Bookmarks',
2608
+
2609
+
2610
+
2611
+
2612
+
2613
+
2614
+
2615
+ 'spriteCoordinates' => Array(
2616
+
2617
+
2618
+
2619
+
2620
+
2621
+
2622
+
2623
+ '16' => array("-96px","0px"),
2624
+
2625
+
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+ '32' => array("-192px","0px"),
2632
+
2633
+
2634
+
2635
+
2636
+
2637
+
2638
+
2639
+ '48' => array("-288px","0px"),
2640
+
2641
+
2642
+
2643
+
2644
+
2645
+
2646
+
2647
+ '64' => array("-384px","0px")
2648
+
2649
+
2650
+
2651
+
2652
+
2653
+
2654
+
2655
+ )
2656
+
2657
+
2658
+
2659
+
2660
+
2661
+
2662
+
2663
+ ),
2664
+
2665
+
2666
+
2667
+
2668
+
2669
+
2670
+
2671
+ 'HackerNews' => Array(
2672
+
2673
+
2674
+
2675
+
2676
+
2677
+
2678
+
2679
+ 'favicon' => 'hacker_news.png',
2680
+
2681
+
2682
+
2683
+
2684
+
2685
+
2686
+
2687
+ 'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&amp;t=TITLE',
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+ 'spriteCoordinates' => Array(
2696
+
2697
+
2698
+
2699
+
2700
+
2701
+
2702
+
2703
+ '16' => array("-128px","0px"),
2704
+
2705
+
2706
+
2707
+
2708
+
2709
+
2710
+
2711
+ '32' => array("-256px","0px"),
2712
+
2713
+
2714
+
2715
+
2716
+
2717
+
2718
+
2719
+ '48' => array("-384px","0px"),
2720
+
2721
+
2722
+
2723
+
2724
+
2725
+
2726
+
2727
+ '64' => array("-512px","0px")
2728
+
2729
+
2730
+
2731
+
2732
+
2733
+
2734
+
2735
+ )
2736
+
2737
+
2738
+
2739
+
2740
+
2741
+
2742
+
2743
+ ),
2744
+
2745
+
2746
+
2747
+ 'MSNReporter' => Array(
2748
+
2749
+
2750
+
2751
+
2752
+
2753
+
2754
+
2755
+ 'favicon' => 'msn.png',
2756
+
2757
+
2758
+
2759
+
2760
+
2761
+
2762
+
2763
+ 'url' => 'http://reporter.es.msn.com/?fn=contribute&amp;Title=TITLE&amp;URL=PERMALINK&amp;cat_id=6&amp;tag_id=31&amp;Remark=EXCERPT',
2764
+
2765
+
2766
+
2767
+
2768
+
2769
+
2770
+
2771
+ 'description' => 'MSN Reporter',
2772
+
2773
+
2774
+
2775
+
2776
+
2777
+
2778
+
2779
+ 'spriteCoordinates' => Array(
2780
+
2781
+
2782
+
2783
+
2784
+
2785
+
2786
+
2787
+ '16' => array("-176px","0px"),
2788
+
2789
+
2790
+
2791
+
2792
+
2793
+
2794
+
2795
+ '32' => array("-352px","0px"),
2796
+
2797
+
2798
+
2799
+
2800
+
2801
+
2802
+
2803
+ '48' => array("-528px","0px"),
2804
+
2805
+
2806
+
2807
+
2808
+
2809
+
2810
+
2811
+ '64' => array("-704px","0px")
2812
+
2813
+
2814
+
2815
+
2816
+
2817
+
2818
+
2819
+ )
2820
+
2821
+
2822
+
2823
+
2824
+
2825
+
2826
+
2827
+ ),
2828
+
2829
+
2830
+
2831
+
2832
+
2833
+
2834
+
2835
+
2836
+
2837
+
2838
+
2839
+ 'BlinkList' => Array(
2840
+
2841
+
2842
+
2843
+ 'favicon' => 'blinklist.png',
2844
+
2845
+
2846
+
2847
+ 'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=PERMALINK&amp;Title=TITLE',
2848
+
2849
+
2850
+
2851
+ 'spriteCoordinates' => Array(
2852
+
2853
+
2854
+
2855
+
2856
+
2857
+
2858
+
2859
+ '16' => array("0px","0px"),
2860
+
2861
+
2862
+
2863
+
2864
+
2865
+
2866
+
2867
+ '32' => array("0px","0px"),
2868
+
2869
+
2870
+
2871
+
2872
+
2873
+
2874
+
2875
+ '48' => array("0px","0px"),
2876
+
2877
+
2878
+
2879
+
2880
+
2881
+
2882
+
2883
+ '64' => array("0px","0px")
2884
+
2885
+
2886
+
2887
+
2888
+
2889
+
2890
+
2891
+ ),
2892
+
2893
+
2894
+
2895
+ 'supportsIframe' => false,
2896
+
2897
+
2898
+
2899
+ ),
2900
+
2901
+
2902
+
2903
+ 'Sphinn' => Array(
2904
+
2905
+
2906
+
2907
+ 'favicon' => 'sphinn.png',
2908
+
2909
+
2910
+
2911
+ 'url' => 'http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=PERMALINK',
2912
+
2913
+
2914
+
2915
+ 'spriteCoordinates' => Array(
2916
+
2917
+
2918
+
2919
+
2920
+
2921
+
2922
+
2923
+ '16' => array("-96px","-16px"),
2924
+
2925
+
2926
+
2927
+
2928
+
2929
+
2930
+
2931
+ '32' => array("-192px","-32px"),
2932
+
2933
+
2934
+
2935
+
2936
+
2937
+
2938
+
2939
+ '48' => array("-288px","-48px"),
2940
+
2941
+
2942
+
2943
+
2944
+
2945
+
2946
+
2947
+ '64' => array("-384px","-64px")
2948
+
2949
+
2950
+
2951
+
2952
+
2953
+
2954
+
2955
+ )
2956
+
2957
+
2958
+
2959
+ ),
2960
+
2961
+
2962
+
2963
+
2964
+
2965
+
2966
+
2967
+ 'Posterous' => Array(
2968
+
2969
+
2970
+
2971
+ 'favicon' => 'posterous.png',
2972
+
2973
+
2974
+
2975
+ 'url' => 'http://posterous.com/share?linkto=PERMALINK&amp;title=TITLE&amp;selection=EXCERPT',
2976
+
2977
+
2978
+
2979
+ 'spriteCoordinates' => Array(
2980
+
2981
+
2982
+
2983
+
2984
+
2985
+
2986
+
2987
+ '16' => array("-32px","-16px"),
2988
+
2989
+
2990
+
2991
+
2992
+
2993
+
2994
+
2995
+ '32' => array("-64px","-32px"),
2996
+
2997
+
2998
+
2999
+
3000
+
3001
+
3002
+
3003
+ '48' => array("-96px","-48px"),
3004
+
3005
+
3006
+
3007
+
3008
+
3009
+
3010
+
3011
+ '64' => array("-128px","-64px")
3012
+
3013
+
3014
+
3015
+
3016
+
3017
+
3018
+
3019
+ )
3020
+
3021
+
3022
+
3023
+ ),
3024
+
3025
+
3026
+
3027
+ 'Tumblr' => Array(
3028
+
3029
+
3030
+
3031
+ 'favicon' => 'tumblr.png',
3032
+
3033
+
3034
+
3035
+ 'url' => 'http://www.tumblr.com/share?v=3&amp;u=PERMALINK&amp;t=TITLE&amp;s=EXCERPT',
3036
+
3037
+
3038
+
3039
+ 'spriteCoordinates' => Array(
3040
+
3041
+
3042
+
3043
+
3044
+
3045
+
3046
+
3047
+ '16' => array("-128px","-16px"),
3048
+
3049
+
3050
+
3051
+
3052
+
3053
+
3054
+
3055
+ '32' => array("-256px","-32px"),
3056
+
3057
+
3058
+
3059
+
3060
+
3061
+
3062
+
3063
+ '48' => array("-384px","-48px"),
3064
+
3065
+
3066
+
3067
+
3068
+
3069
+
3070
+
3071
+ '64' => array("-512px","-64px")
3072
+
3073
+
3074
+
3075
+
3076
+
3077
+
3078
+
3079
+ ),
3080
+
3081
+
3082
+
3083
+ 'supportsIframe' => false
3084
+
3085
+
3086
+
3087
+ ),
3088
+
3089
+
3090
+
3091
+ 'email' => Array(
3092
+
3093
+
3094
+
3095
+ 'favicon' => 'gmail.png',
3096
+
3097
+
3098
+
3099
+ 'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su=TITLE&body=PERMALINK&ui=2&tf=1&shva=1',
3100
+
3101
+
3102
+
3103
+ 'spriteCoordinates' => Array(
3104
+
3105
+
3106
+
3107
+
3108
+
3109
+
3110
+
3111
+ '16' => array("-80px","0px"),
3112
+
3113
+
3114
+
3115
+
3116
+
3117
+
3118
+
3119
+ '32' => array("-160px","0px"),
3120
+
3121
+
3122
+
3123
+
3124
+
3125
+
3126
+
3127
+ '48' => array("-240px","0px"),
3128
+
3129
+
3130
+
3131
+
3132
+
3133
+
3134
+
3135
+ '64' => array("-320px","0px")
3136
+
3137
+
3138
+
3139
+
3140
+
3141
+
3142
+
3143
+ ),
3144
+
3145
+
3146
+
3147
+ 'supportsIframe' => false
3148
+
3149
+
3150
+
3151
+ ),
3152
+
3153
+
3154
+
3155
+
3156
+
3157
+
3158
+
3159
+ 'Google Reader' => array (
3160
+
3161
+
3162
+
3163
+ 'favicon' => 'googlebuzz.png',
3164
+
3165
+
3166
+
3167
+ 'url' => 'http://www.google.com/reader/link?url=PERMALINK&amp;title=TITLE&amp;srcURL=PERMALINK&amp;srcTitle=BLOGNAME',
3168
+
3169
+
3170
+
3171
+ 'spriteCoordinates' => Array(
3172
+
3173
+
3174
+
3175
+
3176
+
3177
+
3178
+
3179
+ '16' => array("-112px","0px"),
3180
+
3181
+
3182
+
3183
+
3184
+
3185
+
3186
+
3187
+ '32' => array("-224px","0px"),
3188
+
3189
+
3190
+
3191
+
3192
+
3193
+
3194
+
3195
+ '48' => array("-336px","0px"),
3196
+
3197
+
3198
+
3199
+
3200
+
3201
+
3202
+
3203
+ '64' => array("-448px","0px")
3204
+
3205
+
3206
+
3207
+
3208
+
3209
+
3210
+
3211
+ )
3212
+
3213
+
3214
+
3215
+ ),
3216
+
3217
+
3218
+
3219
+ 'Add to favorites' => array(
3220
+
3221
+
3222
+
3223
+ 'favicon' => 'favorites.png',
3224
+
3225
+
3226
+
3227
+ 'url' => 'javascript:AddToFavorites();',
3228
+
3229
+
3230
+
3231
+ 'spriteCoordinates' => Array(
3232
+
3233
+
3234
+
3235
+
3236
+
3237
+
3238
+
3239
+ '16' => array("-64px","0px"),
3240
+
3241
+
3242
+
3243
+
3244
+
3245
+
3246
+
3247
+ '32' => array("-128px","0px"),
3248
+
3249
+
3250
+
3251
+
3252
+
3253
+
3254
+
3255
+ '48' => array("-192px","0px"),
3256
+
3257
+
3258
+
3259
+
3260
+
3261
+
3262
+
3263
+ '64' => array("-256px","0px")
3264
+
3265
+
3266
+
3267
+
3268
+
3269
+
3270
+
3271
+ )
3272
+
3273
+
3274
+
3275
+ ),
3276
+
3277
+
3278
+
3279
+ 'More' => array(
3280
+
3281
+
3282
+
3283
+ 'favicon' => 'more.png',
3284
+
3285
+
3286
+
3287
+ 'url' => 'javascript:more();',
3288
+
3289
+
3290
+
3291
+ 'spriteCoordinates' => Array(
3292
+
3293
+
3294
+
3295
+
3296
+
3297
+
3298
+
3299
+ '16' => array("0px","0px"),
3300
+
3301
+
3302
+
3303
+
3304
+
3305
+
3306
+
3307
+ '32' => array("0px","0px"),
3308
+
3309
+
3310
+
3311
+
3312
+
3313
+
3314
+
3315
+ '48' => array("0px","0px"),
3316
+
3317
+
3318
+
3319
+
3320
+
3321
+
3322
+
3323
+ '64' => array("0px","0px")
3324
+
3325
+
3326
+
3327
+
3328
+
3329
+
3330
+
3331
+ )
3332
+
3333
+
3334
+
3335
+ ),
3336
+
3337
+
3338
+
3339
+ );
3340
+
3341
+
3342
+
3343
+
3344
+
3345
+ //Update will create if it doesn't exist.
3346
+
3347
+
3348
+
3349
+
3350
+
3351
+ update_option( 'sociable_known_sites' , $sociable_known_sites );
3352
+
3353
+ update_option( 'sociable_options' , $sociable_options );
3354
+
3355
+ update_option( 'sociable_helpus' , 1);
3356
+
3357
+ }
3358
+
3359
+
3360
+
3361
+ function skyscraper_reset(){
3362
+
3363
+
3364
+
3365
+ $skyscraper_options = array(
3366
+
3367
+ "version" => "1.0",
3368
+
3369
+ "widget_width" => "60px",
3370
+
3371
+ "widget_position" => "1",
3372
+
3373
+ "background_color" => "#fefefe",
3374
+
3375
+ "labels_color" => "#f7f7f7",
3376
+
3377
+ "text_size" => "10px",
3378
+
3379
+ "counters" => array("check" => "0",
3380
+
3381
+ "folded" => "0"),
3382
+
3383
+ "share" => array("check" => "0",
3384
+
3385
+ "folded" => "0"),
3386
+
3387
+ "num_tweets" => 3,
3388
+
3389
+ "num_rss" =>3,
3390
+
3391
+ "locations" => array("is_front_page" => 1,
3392
+
3393
+ "is_home" => 1,
3394
+
3395
+ "is_single" => 1,
3396
+
3397
+ "is_page" => 1,
3398
+
3399
+ "is_category" => 1,
3400
+
3401
+ "is_date" => 1,
3402
+
3403
+ "is_tag" => 1,
3404
+
3405
+ "is_author" => 1,
3406
+
3407
+ "is_search" => 1,
3408
+
3409
+ "is_rss" => 1 ),
3410
+
3411
+
3412
+
3413
+ "counters" => array("check" => 1,
3414
+
3415
+ "folded" => 1),
3416
+
3417
+ "share" => array("check" => 1,
3418
+
3419
+ "folded" => 1),
3420
+
3421
+ "active" => 1
3422
+
3423
+
3424
+
3425
+ );
3426
+
3427
+
3428
+
3429
+ update_option( 'skyscraper_options' , $skyscraper_options );
3430
+
3431
+
3432
+
3433
+
3434
+
3435
+ $skyscraper_latest = array();
3436
+
3437
+ update_option("skyscraper_latest",$skyscraper_latest );
3438
+
3439
+
3440
+
3441
+ $skyscraper_mentions = array();
3442
+
3443
+ update_option("skyscraper_mentions",$skyscraper_mentions );
3444
+
3445
+ }
3446
+
3447
+
3448
+
3449
+
3450
+
3451
+
3452
+
3453
+
3454
+
3455
+
3456
+
3457
+
3458
+
3459
+
3460
+
3461
+
3462
+
3463
+
3464
+
3465
+ /*
3466
+
3467
+
3468
+
3469
+
3470
+
3471
+
3472
+
3473
+
3474
+
3475
+
3476
+
3477
+ * De-Activate Function
3478
+
3479
+
3480
+
3481
+
3482
+
3483
+
3484
+
3485
+
3486
+
3487
+
3488
+
3489
+ */
3490
+
3491
+
3492
+
3493
+
3494
+
3495
+
3496
+
3497
+
3498
+
3499
+
3500
+
3501
+ function sociable_deactivate(){
3502
+
3503
+
3504
+
3505
+
3506
+
3507
+
3508
+
3509
+
3510
+
3511
+
3512
+
3513
+ // global $wpdb;
3514
+
3515
+
3516
+
3517
+
3518
+
3519
+
3520
+
3521
+
3522
+
3523
+
3524
+
3525
+ // //Delete The Metadata
3526
+
3527
+
3528
+
3529
+
3530
+
3531
+
3532
+
3533
+
3534
+
3535
+
3536
+
3537
+ // $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
3538
+
3539
+
3540
+
3541
+
3542
+
3543
+
3544
+
3545
+
3546
+
3547
+
3548
+
3549
+ // //delete The Options
3550
+
3551
+
3552
+
3553
+
3554
+
3555
+
3556
+
3557
+
3558
+
3559
+
3560
+
3561
+ // return delete_option( 'sociable_options' );
3562
+
3563
+
3564
+
3565
+
3566
+
3567
+
3568
+
3569
+
3570
+
3571
+
3572
+
3573
+ }
3574
+
3575
+
3576
+
3577
+
3578
+
3579
+
3580
+
3581
+
3582
+
3583
+
3584
+
3585
+
3586
+
3587
+
3588
+
3589
+
3590
+
3591
+
3592
+
3593
+
3594
+
3595
+
3596
+
3597
+ /*
3598
+
3599
+
3600
+
3601
+
3602
+
3603
+
3604
+
3605
+
3606
+
3607
+
3608
+
3609
+ * Function To Completely Remove The Options
3610
+
3611
+
3612
+
3613
+
3614
+
3615
+
3616
+
3617
+
3618
+
3619
+
3620
+
3621
+ */
3622
+
3623
+
3624
+
3625
+
3626
+
3627
+
3628
+
3629
+
3630
+
3631
+
3632
+
3633
+ function sociable_2_remove(){
3634
+
3635
+
3636
+
3637
+
3638
+
3639
+
3640
+
3641
+
3642
+
3643
+
3644
+
3645
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
3646
+
3647
+
3648
+
3649
+
3650
+
3651
+
3652
+
3653
+
3654
+
3655
+
3656
+
3657
+
3658
+
3659
+
3660
+
3661
+
3662
+
3663
+
3664
+
3665
+
3666
+
3667
+
3668
+
3669
+ global $wpdb;
3670
+
3671
+
3672
+
3673
+
3674
+
3675
+
3676
+
3677
+
3678
+
3679
+
3680
+
3681
+ //Delete The Metadata
3682
+
3683
+
3684
+
3685
+
3686
+
3687
+
3688
+
3689
+
3690
+
3691
+
3692
+
3693
+ $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
3694
+
3695
+
3696
+
3697
+
3698
+
3699
+
3700
+
3701
+
3702
+
3703
+
3704
+
3705
+ //delete The Options
3706
+
3707
+
3708
+
3709
+
3710
+
3711
+
3712
+
3713
+
3714
+
3715
+
3716
+
3717
+ delete_option( 'sociable_options' );
3718
+
3719
+
3720
+
3721
+
3722
+
3723
+
3724
+
3725
+
3726
+
3727
+
3728
+
3729
+
3730
+
3731
+
3732
+
3733
+
3734
+
3735
+
3736
+
3737
+
3738
+
3739
+
3740
+
3741
+ deactivate_plugins( array( 'sociable-2/sociable-2.php' ) );
3742
+
3743
+
3744
+
3745
+
3746
+
3747
+
3748
+
3749
+
3750
+
3751
+
3752
+
3753
+ wp_redirect( '/wp-admin/plugins.php?deactivate=true' );
3754
+
3755
+
3756
+
3757
+
3758
+
3759
+
3760
+
3761
+
3762
+
3763
+
3764
+
3765
+ }
3766
+
3767
+
3768
+
3769
+
3770
+
3771
+
3772
+
3773
+
3774
+
3775
+
3776
+
3777
+
3778
+
3779
+
3780
+
3781
+
3782
+
3783
+
3784
+
3785
+
3786
+
3787
+
3788
+
3789
+ /*
3790
+
3791
+
3792
+
3793
+
3794
+
3795
+
3796
+
3797
+
3798
+
3799
+
3800
+
3801
+ * Generic Plugin Wide Functions
3802
+
3803
+
3804
+
3805
+
3806
+
3807
+
3808
+
3809
+
3810
+
3811
+
3812
+
3813
+ */
3814
+
3815
+
3816
+
3817
+
3818
+
3819
+
3820
+
3821
+
3822
+
3823
+
3824
+
3825
+
3826
+
3827
+
3828
+
3829
+ function _get_sociable_image_path(){
3830
+
3831
+
3832
+
3833
+
3834
+
3835
+
3836
+
3837
+ global $sociable_options;
3838
+
3839
+
3840
+
3841
+
3842
+
3843
+
3844
+
3845
+
3846
 
 
3847
 
 
3848
 
3849
 
3850
 
 
3851
 
3852
 
3853
+ if( empty( $sociable_options['custom_icons'] )){
3854
 
 
3855
 
3856
 
3857
+ if ($sociable_options['icon_option'] !="option6"){
3858
 
 
3859
 
3860
 
3861
+ $path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/'.$sociable_options['icon_option']."/" . $sociable_options['icon_size'] );
3862
 
 
3863
 
3864
 
3865
+ }else{
3866
 
 
3867
 
 
3868
 
3869
+
3870
 
 
3871
 
 
3872
 
3873
+ $path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/original/');
3874
 
 
3875
 
3876
 
3877
+ }
3878
 
 
3879
 
3880
 
3881
 
 
3882
 
3883
 
3884
 
3885
+ } else {
3886
 
3887
 
3888
 
 
3889
 
3890
 
3891
 
 
3892
 
3893
+ $path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/customIcons/');
3894
 
 
3895
 
 
3896
 
 
3897
 
 
3898
 
3899
 
3900
 
3901
+ }
3902
 
3903
 
3904
 
3905
+
3906
 
3907
 
3908
 
3909
+
3910
 
3911
 
3912
 
 
3913
 
3914
 
3915
 
 
3916
 
3917
+ return $path;
3918
 
 
3919
 
 
3920
 
 
3921
 
 
3922
 
 
3923
 
3924
 
3925
+ }
3926
 
 
3927
 
3928
 
3929
 
 
3930
 
3931
 
3932
 
 
3933
 
3934
 
3935
 
 
3936
 
3937
 
3938
 
 
3939
 
 
3940
 
 
3941
 
 
3942
 
 
3943
 
 
3944
 
 
3945
 
 
3946
 
3947
 
3948
 
 
3949
 
3950
 
3951
 
 
3952
 
3953
+ function _get_sociable_image( $site, $description ){
3954
 
3955
 
 
3956
 
3957
+ global $sociable_options;
3958
 
3959
 
 
3960
 
3961
 
3962
 
 
3963
 
 
3964
 
3965
+ $imageclass = '';
3966
 
 
3967
 
 
3968
 
 
3969
 
3970
 
3971
 
 
3972
 
3973
 
3974
 
 
3975
 
3976
 
3977
+ $imagestyle = '';
3978
 
 
3979
 
3980
 
3981
 
 
3982
 
3983
 
3984
 
 
3985
 
 
3986
 
 
3987
 
 
3988
 
3989
+ $imagepath = _get_sociable_image_path();
3990
 
 
3991
 
3992
 
3993
 
 
3994
 
3995
 
3996
 
 
3997
 
3998
 
3999
 
 
4000
 
4001
+ //Get The Source Of The Image
4002
 
4003
 
 
4004
 
4005
 
4006
 
 
4007
 
 
4008
 
 
 
 
 
4009
 
 
 
 
 
 
4010
 
 
4011
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4012
 
4013
+ if ( ! isset( $site['spriteCoordinates'] ) || ! isset( $sociable_options['use_sprites'] ) || is_feed() ) {
 
 
 
 
 
 
 
 
4014
 
4015
 
4016
 
4020
 
4021
 
4022
 
 
4023
 
4024
 
4025
 
4026
 
4027
 
 
4028
 
4029
 
4030
 
4031
 
4032
 
 
4033
 
4034
 
4035
 
4036
 
4037
+ if ( strpos( $site['favicon'], 'http' ) === 0 ) {
4038
 
 
4039
 
4040
 
4041
 
4042
 
4043
 
 
4044
 
4045
 
4046
 
4047
 
4048
 
4049
+ $imagesource = $site['favicon'];
4050
 
4051
 
4052
 
4053
 
4054
 
 
4055
 
4056
 
4057
 
4058
 
4059
 
 
4060
 
4061
+ } else {
4062
 
4063
 
4064
 
4065
 
 
4066
 
4067
 
4068
 
4069
 
4070
 
 
4071
 
4072
 
4073
+ $imagesource = $imagepath.$site['favicon'];
4074
 
4075
 
4076
 
4080
 
4081
 
4082
 
 
4083
 
4084
 
4085
+ }
4086
 
4087
 
4088
 
 
4089
 
4090
 
4091
 
4092
 
4093
 
 
4094
 
4095
 
4096
 
4097
 
4098
 
 
4099
 
4100
 
4101
 
4102
 
4103
 
 
4104
 
4105
 
4106
 
4107
 
4108
 
4109
+ } else {
4110
 
4111
 
4112
 
4113
 
4114
 
 
4115
 
4116
 
4117
 
4118
 
4119
 
 
4120
 
4121
 
4122
 
4123
 
4124
 
 
4125
 
4126
 
4127
 
4128
 
4129
 
 
4130
 
4131
 
4132
 
4133
+ $imagesource = $imagepath . "services-sprite.gif";
4134
 
4135
 
 
4136
 
4137
 
4138
 
4139
 
4140
 
 
4141
 
4142
 
4143
 
4144
 
4145
+ $services_sprite_url = $imagepath . "sprite.png";
4146
 
 
4147
 
4148
 
4149
 
4150
 
4151
 
 
4152
 
4153
 
4154
 
4155
 
4156
 
 
4157
 
4158
 
4159
 
4165
 
4166
 
4167
 
 
4168
 
4169
+ $spriteCoords = $site['spriteCoordinates'];
4170
 
4171
 
4172
 
4173
 
 
4174
 
4175
 
4176
 
4177
 
4178
 
 
4179
 
4180
 
4181
+
4182
 
4183
 
4184
 
4185
 
4186
 
 
4187
 
4188
 
4189
 
 
4190
 
4191
 
4192
 
4193
+ $size = $sociable_options['icon_size'];
4194
 
4195
 
4196
 
 
4197
 
 
4198
 
 
4199
 
 
4200
 
 
4201
 
 
4202
 
 
4203
 
4204
 
4205
 
 
4206
 
4207
 
4208
 
 
4209
 
4210
 
4211
 
 
4212
 
 
4213
 
 
4214
 
4215
 
4216
 
4217
+ $imagestyle = 'width: ' . $size . 'px; height: ' . $size . 'px; background: transparent url(' . $services_sprite_url . ') no-repeat; background-position:' . $spriteCoords[$size] . 'px 0';
4218
 
4219
 
4220
 
 
4221
 
4222
 
4223
 
4231
 
4232
 
4233
 
 
4234
 
 
4235
 
4236
 
4237
 
 
4238
 
4239
 
4240
 
4241
+ }
4242
 
4243
 
 
4244
 
4245
 
4246
 
4247
 
4248
 
 
4249
 
4250
 
4251
 
4252
 
4253
 
 
4254
 
4255
 
4256
 
4257
+
4258
 
4259
 
 
4260
 
4261
 
4262
 
4263
 
4264
 
4265
+ if( isset( $sociable_options['use_alphamask'] ) ){
4266
 
4267
 
4268
 
4269
 
4270
 
4271
 
 
4272
 
4273
 
4274
 
4275
 
4276
 
4277
+ $imageclass .= 'sociable-hovers';
4278
 
4279
 
4280
 
4281
 
4282
 
 
4283
 
4284
 
4285
 
4286
 
4287
 
 
4288
 
4289
+ }
4290
 
4291
 
4292
 
4293
 
 
4294
 
4295
 
4296
 
4302
 
4303
 
4304
 
 
4305
 
4306
 
4307
 
4310
 
4311
 
4312
 
4313
+ //If A Class Has Been Specified, Ensure It Is Added To The Class Attribute.
4314
 
4315
 
4316
 
 
4317
 
4318
 
4319
 
4320
 
4321
 
 
4322
 
4323
 
4324
 
4325
+ if ( isset( $site['class'] ) ) {
4326
 
4327
 
4328
 
4331
 
4332
 
4333
 
 
4334
 
4335
 
4336
 
4337
+ $imageclass .= 'sociable_' . $site['class'];
4338
 
4339
 
 
4340
 
4341
 
4342
 
4343
 
4344
 
 
4345
 
4346
 
4347
 
4348
 
4349
+ }
4350
 
4351
 
4352
 
4354
 
4355
 
4356
 
 
4357
 
4358
 
4359
 
4365
 
4366
 
4367
 
 
4368
 
4369
 
4370
 
4371
 
4372
 
4373
+ if( $imagestyle != '' ){
4374
 
4375
 
 
4376
 
4377
 
4378
 
 
4379
 
4380
 
4381
 
4382
 
4383
 
 
4384
 
4385
+ $imagestyle = 'style="' . $imagestyle . '"';
4386
 
4387
 
4388
 
4389
 
 
4390
 
4391
 
4392
 
4394
 
4395
 
4396
 
4397
+ }
4398
 
4399
 
4400
 
4401
 
 
4402
 
4403
 
4404
 
4405
 
4406
 
 
4407
 
4408
 
4409
 
4410
 
4411
 
 
4412
 
4413
+ if ($sociable_options['icon_option'] !="option6"){
4414
 
4415
 
4416
 
4417
 
 
4418
 
4419
 
4420
 
4421
+ $image = '<img src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
4422
 
4423
 
4424
 
4425
+ }else{
4426
 
4427
 
4428
 
4429
+ $image = '<img class="' . $imageclass . '" src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
4430
 
4431
 
 
4432
 
4433
+ }
4434
 
4435
 
4436
 
4437
 
 
4438
 
4439
 
4440
 
4441
 
4442
 
 
4443
 
4444
 
4445
+
4446
 
4447
 
4448
 
4449
 
4450
 
 
4451
 
4452
 
4453
 
 
4454
 
 
4455
 
 
4456
 
4457
+ return $image;
4458
 
4459
 
4460
 
4461
 
4462
 
 
4463
 
4464
 
4465
 
4466
 
4467
 
 
4468
 
4469
+ }
4470
 
4471
 
4472
 
4473
 
 
4474
 
4475
 
4476