Social Media Share Buttons - Version 1.1

Version Description

Download this release

Release Info

Developer joaoromao
Plugin Icon 128x128 Social Media Share Buttons
Version 1.1
Comparing to
See all releases

Code changes from version 1.0.0 to 1.1

css/getsocial-style.css CHANGED
@@ -5,7 +5,7 @@
5
  }
6
 
7
  header {
8
- background: #49bdef;
9
  padding-left: 20px;
10
  margin: 0 0 -5px -20px;
11
  position: relative;
@@ -18,21 +18,57 @@ header h1, header h2 {
18
  header h1 {
19
  display: inline;
20
  border-right: 1px solid rgba(255,255,255,0.7);
21
- padding: 20px 20px 20px 0
 
22
  }
23
 
24
  header h2 {
25
- width: 60%;
26
  color: white;
27
- font-size: 16px;
28
  padding: 20px;
29
  font-weight: 300;
30
  }
31
 
32
- .help {
33
- background: white;
34
- color: #49bdef;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
 
 
 
 
 
 
36
  }
37
 
38
  .half {
@@ -40,6 +76,71 @@ header h2 {
40
  float: left;
41
  }
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  #group-builder {
45
  background: white;
@@ -50,20 +151,16 @@ header h2 {
50
 
51
 
52
  .notification-bar{
53
- font-weight: bold;
54
  padding: 15px 21px;
55
  margin-top: 10px;
56
  /*margin: -6px 0 5px -20px;*/
57
  position: relative;
 
 
 
58
  }
59
- .notification-bar p{
60
- font-size: 15px;
61
- color: #fff;
62
- margin: 0;
63
- padding: 0;
64
- display: inline-block;
65
- }
66
- .notification-bar a, .notification-bar a:visited, header a{
67
  font-size: 13px;
68
  color: #fff;
69
  text-decoration: none;
@@ -71,11 +168,11 @@ header h2 {
71
  padding: 5px 9px;
72
  margin-top: -4px;
73
  float: right;
74
- }
 
75
  /* red */
76
  .red-cta{
77
  background: #EB504C;
78
- text-shadow: 0px -1px 0px #be403c;
79
  }
80
  .red-cta a, .red-cta a:visited{
81
  background: #b53430;
@@ -86,7 +183,6 @@ header h2 {
86
  /* yellow */
87
  .yellow-cta{
88
  background: #edac2c;
89
- text-shadow: 0px -1px 0px #c79024;
90
  }
91
  .yellow-cta a, .yellow-cta a:visited{
92
  background: #a97a1f;
@@ -97,7 +193,6 @@ header h2 {
97
  /* blue */
98
  .blue-cta{
99
  background: #2ea2cc;
100
- text-shadow: 0px -1px 0px #2789ad;
101
  }
102
 
103
  .blue-cta:hover {
@@ -115,7 +210,6 @@ header h2 {
115
  /* green */
116
  .green-cta{
117
  background: #83b93a;
118
- text-shadow: 0px -1px 0px #237BA0;
119
  }
120
  .green-cta a, .green-cta a:visited{
121
  background: #49bdef;
@@ -137,142 +231,61 @@ header h2 {
137
  }
138
  #steps{
139
  width: 100%;
140
- margin-bottom: 25px;
141
- }
142
- #steps thead{
143
- text-align: left;
144
- }
145
- #steps h2{
146
- font-size: 17px;
147
- font-weight: 600;
148
- line-height: 18px;
149
- margin: 0;
150
- padding: 0;
151
- }
152
- .steps-list{
153
- list-style: initial !important;
154
- padding-left: 20px;
155
- }
156
-
157
- /* ======================================================================================== FORM */
158
-
159
-
160
- .form-table{
161
- max-width: 700px;
162
  }
163
- .form-table th{
164
- width: 150px;
165
- text-align: right;
166
- }
167
- .form-table .submit{
168
- padding-left: 10px;
169
- }
170
- #config-form .form-title{
171
- font-size: 14px;
172
- font-weight: bold;
173
- margin: 25px 0 10px -10px;
174
- display: block;
175
- cursor: initial;
176
- pointer-events: none;
177
- }
178
- #config-form label {
179
- padding-left: 10px;
180
- }
181
-
182
- label.onoffswitch-label {
183
- padding-left: 0px !important;
184
- }
185
-
186
- .onoffswitch-inner:before {
187
- background: #49C252 !important;
188
  }
189
 
190
- .no-padding {
191
- padding: 0 !important;
192
- margin-right: 10px;
 
193
  }
194
 
195
- .postbox-container fieldset {
196
- width: 75%;
197
- display: block;
198
  margin: 0 auto;
199
- padding: 20px;
200
- border: 1px solid lightgray;
201
- }
202
-
203
- .postbox-container fieldset legend {
204
- padding: 0 20px;
205
  }
206
 
207
- #reaction-preview {
208
- text-align: center;
 
 
 
 
 
 
 
209
  }
210
 
211
-
212
- /* ======================================================================================== API KEY */
213
-
214
-
215
- #api-key-wrap, #api-key-field{
216
- max-width: 650px;
217
- }
218
- #api-key-field{
219
- box-sizing: border-box;
220
- padding-right: 120px;
221
- }
222
- #api-key{
223
- width: 100%;
224
- box-shadow: 0px 1px 15px #e3e3e3;
225
- padding: 10px 45px 10px 15px;
226
- }
227
- #api-key:hover, #api-key:focus{
228
- border-color: #64a8de;
229
- }
230
- #api-key + .badge{
231
- width: 17px;
232
- height: 17px;
233
- margin-top: -30px;
234
- position: relative;
235
- right: 15px;
236
- float: right;
237
- }
238
- #save-api{
239
- margin-top: -36px;
240
- float: right;
241
  }
242
 
243
-
244
- /* ======================================================================================== BUTTONS POSITION */
245
-
246
-
247
- .radio-position{
248
- font-size: 16px;
249
- float: left;
250
  text-align: center;
251
- margin-right: 20px;
252
- }
253
- .radio-position input{
254
- display: none;
255
- }
256
- .radio-position img{
257
- width: 75px;
258
- margin-bottom: 10px;
259
- display: block;
260
- }
261
- .radio-position > div{
262
- border: 1px solid transparent;
263
- padding: 15px;
264
- }
265
- .radio-position:active > div{
266
- background: #ececec;
267
  }
268
- .radio-position:hover > div{
269
- border-color: #ccc;
 
 
 
 
 
270
  }
271
- .radio-position input:checked + div{
272
- color: #0074a2;
273
- background: #fff;
274
- font-weight: bold;
275
- border-color: #ddd;
276
  }
277
 
278
 
@@ -304,69 +317,101 @@ label.onoffswitch-label {
304
  }
305
  }
306
 
307
- .onoff {
308
- display: none;
 
 
309
  }
310
 
311
- .onoffswitch {
312
- display: inline-block
 
 
313
  }
314
 
315
- .bar-active {
316
- /*text-align: right;*/
317
- padding: 0 0 0 0;
 
 
 
318
  }
319
 
320
- .onoff_check {
321
- position: relative;
322
- display: inline-block;
323
- margin-left: 50px;
324
  }
325
 
326
- .onoff_check span.label {
327
- top: 5px;
328
- left: -50px;
 
329
  font-weight: bold;
330
- font-size: 14px;
331
- position: absolute;
332
- margin-right: 10px;
 
333
  }
334
 
335
- .cl {
336
- clear: both;
337
  }
338
 
339
- p.submit {
340
- padding: 0;
341
- margin: 10 0 0 10px;
342
- display: inline-block;
343
- float: left;
344
  }
345
 
346
- a.gsbutton {
347
- font-size: 13px;
348
- color: #fff;
349
- text-decoration: none;
350
- border-radius: 3px;
351
- padding: 4px 10px;
352
- float: right;
353
- background: #83b93a;
354
- border: 1px solid #719b2e;
355
- text-shadow: 0px -1px 0px #66922b;
356
- margin-top: 5px;
357
  }
358
 
359
- .custom-expressions {
360
- width: 100%
 
361
  }
362
 
363
- .custom-expressions tr {
364
- width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
  background: white;
366
- border: 1px solid #dbd5d9;
367
  }
368
 
369
- .custom-expressions td {
370
- padding: 5px 10px;
371
- font-size: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
372
  }
5
  }
6
 
7
  header {
8
+ background: #2481b1;
9
  padding-left: 20px;
10
  margin: 0 0 -5px -20px;
11
  position: relative;
18
  header h1 {
19
  display: inline;
20
  border-right: 1px solid rgba(255,255,255,0.7);
21
+ padding: 20px 0px;
22
+ width: 170px;
23
  }
24
 
25
  header h2 {
26
+ width: 680px;
27
  color: white;
28
+ font-size: 16px !important;
29
  padding: 20px;
30
  font-weight: 300;
31
  }
32
 
33
+ .wrap h2 {
34
+ color: #999999;
35
+ padding: 20px 0px;
36
+ border-bottom: 1px solid #e1e1e1;
37
+ }
38
+
39
+ .wrap h2 i {
40
+ margin-right: 8px;
41
+ }
42
+
43
+ /***************** TOP NAV **********************/
44
+
45
+ .top-nav {
46
+ padding: 12px 0;
47
+ margin-left: -20px;
48
+ background: #444;
49
+ text-align: right;
50
+ }
51
+
52
+ .top-nav a {
53
+ text-decoration: none;
54
+ margin-left: 15px;
55
+ color: white;
56
+ display: inline-block;
57
+ }
58
+
59
+ .top-nav a:focus {
60
+ outline: none;
61
+ border: 0;
62
+ box-shadow: none;
63
+ }
64
+
65
 
66
+
67
+ /***********************************************/
68
+
69
+ .wrap, .wrap-header {
70
+ width: 900px;
71
+ margin: 0 auto;
72
  }
73
 
74
  .half {
76
  float: left;
77
  }
78
 
79
+ /*************** APP LIST *****************/
80
+
81
+ .app-list {
82
+ margin-top: 20px
83
+ }
84
+
85
+ .app-wrapper {
86
+ width: 290px;
87
+ margin: 20px 12px 0 0;
88
+ display: inline-block;
89
+ float: left;
90
+ position: relative;
91
+ }
92
+
93
+ .app-wrapper img {
94
+ height: 230px;
95
+ }
96
+
97
+ .app-wrapper:nth-child(3n) {
98
+ margin-rigth: 0px;
99
+ }
100
+
101
+ .app-link {
102
+ background: #fff;
103
+ text-align: center;
104
+ overflow: hidden;
105
+ position: relative;
106
+ border-radius: 4px;
107
+ border: 1px solid #e1e1e1;
108
+ }
109
+
110
+ .app-link-buttons a {
111
+ color: #fff;
112
+ background: #8db13d;
113
+ text-decoration: none;
114
+ padding: 10px 0px;
115
+ margin-top: -4px;
116
+ width: 290px;
117
+ display: inline-block;
118
+ text-align: center;
119
+ }
120
+
121
+ .app-status {
122
+ font-size: 30px;
123
+ border-style: solid;
124
+ position: absolute;
125
+ color: white;
126
+ font-style: normal;
127
+ position: absolute;
128
+ top: 20px;
129
+ right: 20px;
130
+ padding: 6px 2px 4px 6px;
131
+ border-radius: 100%;
132
+ -webkit-animation: rotate-in 750ms ease-in-out;
133
+ animation: rotate-in 750ms ease-in-out;
134
+ text-align: center;
135
+ }
136
+
137
+ .app-status.done {
138
+ background: rgba(160, 200, 72, 0.65);
139
+ border-color: #9bc048;
140
+ }
141
+
142
+ /***********************************************/
143
+
144
 
145
  #group-builder {
146
  background: white;
151
 
152
 
153
  .notification-bar{
154
+ font-weight: normal;
155
  padding: 15px 21px;
156
  margin-top: 10px;
157
  /*margin: -6px 0 5px -20px;*/
158
  position: relative;
159
+ font-size: 16px;
160
+ color: white;
161
+ text-align: center;
162
  }
163
+ /*.notification-bar a, .notification-bar a:visited, header a{
 
 
 
 
 
 
 
164
  font-size: 13px;
165
  color: #fff;
166
  text-decoration: none;
168
  padding: 5px 9px;
169
  margin-top: -4px;
170
  float: right;
171
+ }*/
172
+
173
  /* red */
174
  .red-cta{
175
  background: #EB504C;
 
176
  }
177
  .red-cta a, .red-cta a:visited{
178
  background: #b53430;
183
  /* yellow */
184
  .yellow-cta{
185
  background: #edac2c;
 
186
  }
187
  .yellow-cta a, .yellow-cta a:visited{
188
  background: #a97a1f;
193
  /* blue */
194
  .blue-cta{
195
  background: #2ea2cc;
 
196
  }
197
 
198
  .blue-cta:hover {
210
  /* green */
211
  .green-cta{
212
  background: #83b93a;
 
213
  }
214
  .green-cta a, .green-cta a:visited{
215
  background: #49bdef;
231
  }
232
  #steps{
233
  width: 100%;
234
+ margin: 25px 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  }
236
+ #steps .step {
237
+ background: white;
238
+ padding: 20px;
239
+ margin-bottom: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  }
241
 
242
+ #steps .info {
243
+ width: 600px;
244
+ margin: 50px auto 0px;
245
+ /*border: 1px solid lightgray;*/
246
  }
247
 
248
+ #steps .info dl {
 
 
249
  margin: 0 auto;
250
+ font-size: 16px
 
 
 
 
 
251
  }
252
 
253
+ #steps .info dt {
254
+ width: 108px;
255
+ display: inline-block;
256
+ background: #f0f0f0;
257
+ border: 1px solid #f0f0f0;
258
+ border-right: 0px solid white;
259
+ text-align: right;
260
+ padding: 10px 20px 10px 10px;
261
+ float: left;
262
  }
263
 
264
+ #steps .info dd {
265
+ width: 440px;
266
+ display: inline-block;
267
+ border: 1px solid #f0f0f0;
268
+ border-left: 0px solid white;
269
+ padding: 10px;
270
+ float: left;
271
+ margin: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  }
273
 
274
+ #steps .create-account {
275
+ margin-top: 50px;
 
 
 
 
 
276
  text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  }
278
+
279
+ #steps h2{
280
+ font-size: 17px;
281
+ font-weight: 600;
282
+ line-height: 18px;
283
+ margin: 0;
284
+ padding: 0;
285
  }
286
+ .steps-list{
287
+ list-style: initial !important;
288
+ padding-left: 20px;
 
 
289
  }
290
 
291
 
317
  }
318
  }
319
 
320
+ /*********************************************/
321
+
322
+ .cl {
323
+ clear: both;
324
  }
325
 
326
+ /************************ FORMS ******************/
327
+
328
+ form {
329
+ margin-top: 30px;
330
  }
331
 
332
+ .form-content {
333
+ background: #fff;
334
+ border: 1px solid #e1e1e1;
335
+ overflow: hidden;
336
+ border-radius: 4px;
337
+ margin-bottom: 20px;
338
  }
339
 
340
+ .form-content > * {
341
+ padding: 20px 15px;
 
 
342
  }
343
 
344
+ .form-content label.control {
345
+ width: 15%;
346
+ padding-right: 2%;
347
+ margin-right: 5%;
348
  font-weight: bold;
349
+ text-align: right;
350
+ float: left;
351
+ border-right: 1px solid #e1e1e1;
352
+ min-height: 34px;
353
  }
354
 
355
+ .form-content label.control.active {
356
+ background-color: #c6e7ce;
357
  }
358
 
359
+ .form-content .with-inputs-label label {
360
+ margin-right: 15px;
 
 
 
361
  }
362
 
363
+ .form-content input[type=text] {
364
+ width: 70%;
365
+ padding: 5px 10px;
366
+ border-radius: 5px;
 
 
 
 
 
 
 
367
  }
368
 
369
+ .editor-preview {
370
+ padding: 50px 30px;
371
+ text-align: center;
372
  }
373
 
374
+ /************************ SOCIAL BAR ******************/
375
+
376
+
377
+
378
+ /************************ ICONS ***********************/
379
+
380
+ i.fa {
381
+ margin-right: 4px
382
+ }
383
+
384
+ /************************ GRAPHS **********************/
385
+
386
+ .graphs {
387
+ margin-bottom: 40px;
388
+ }
389
+
390
+ .graph:last-child {
391
+ margin-right: 0px;
392
+ }
393
+
394
+ .graph {
395
+ width: 290px;
396
+ margin: 20px 12px 0 0;
397
+ float: left;
398
  background: white;
399
+ border: 1px solid #e1e1e1;
400
  }
401
 
402
+ .graph h3 {
403
+ text-align: center;
404
+ font-size: 50px;
405
+ color: #808080;
406
+ }
407
+
408
+ .graph h4 {
409
+ padding-left: 10px;
410
+ font-size: 20px;
411
+ color: #b3b3b3;
412
+ text-align: left;
413
+ }
414
+
415
+ .graph h4 i {
416
+ margin-right: 12px;
417
  }
css/jquery.onoff.css DELETED
@@ -1,81 +0,0 @@
1
- /**
2
- * onoff.css
3
- * Author: http://proto.io/freebies/onoff/
4
- * Author: Timmy Willison
5
- */
6
- .onoffswitch {
7
- position: relative;
8
- width: 70px;
9
- -webkit-user-select: none;
10
- -moz-user-select: none;
11
- -ms-user-select: none;
12
- user-select: none;
13
- }
14
-
15
- .onoffswitch-checkbox {
16
- display: none;
17
- }
18
-
19
- .onoffswitch-label {
20
- display: block;
21
- overflow: hidden;
22
- cursor: pointer;
23
- border: 2px solid #999999;
24
- border-radius: 20px;
25
- }
26
-
27
- .onoffswitch-inner {
28
- width: 200%;
29
- margin-left: -100%;
30
- -webkit-transition: margin 0.2s ease-in;
31
- transition: margin 0.2s ease-in;
32
- }
33
-
34
- .onoffswitch-inner:before, .onoffswitch-inner:after {
35
- float: left;
36
- padding: 0;
37
- width: 50%;
38
- height: 26px;
39
- color: white;
40
- font: bold 14px/26px Trebuchet, Arial, sans-serif;
41
- -webkit-box-sizing: border-box;
42
- -moz-box-sizing: border-box;
43
- box-sizing: border-box;
44
- }
45
-
46
- .onoffswitch-inner:before {
47
- content: "YES";
48
- padding-left: 10px;
49
- color: #FFFFFF;
50
- background-color: #2FCCFF;
51
- }
52
-
53
- .onoffswitch-inner:after {
54
- content: "NO";
55
- padding-right: 10px;
56
- color: #999999;
57
- background-color: #EEEEEE;
58
- text-align: right;
59
- }
60
-
61
- .onoffswitch-switch {
62
- position: absolute;
63
- top: 0;
64
- bottom: 0;
65
- right: 40px;
66
- width: 18px;
67
- margin: 4px;
68
- background: white;
69
- border: 2px solid #999999;
70
- border-radius: 20px;
71
- -webkit-transition: right 0.2s ease-in, -webkit-box-shadow 0.2s ease-in;
72
- transition: right 0.2s ease-in, box-shadow 0.2s ease-in;
73
- }
74
-
75
- .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
76
- margin-left: 0;
77
- }
78
-
79
- .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
80
- right: 0;
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
images/custom-bar.png ADDED
Binary file
images/floating-bar.png ADDED
Binary file
images/social-bar.png ADDED
Binary file
init.php CHANGED
@@ -11,46 +11,63 @@
11
 
12
  <?php if(get_option('gs-api-key') == ''): ?>
13
 
14
- <table id="steps">
15
- <thead>
16
- <tr valign="top">
17
- <th>
18
- <h1>Step 1 - Create a GetSocial account</h1>
19
- <p>To get started, register your GetSocial account and <strong>find your API key in the site settings. If you already have an account, log in.</strong></p>
20
- </th>
21
- </tr>
22
- </thead>
23
- <tbody>
24
-
25
- </tbody>
26
- <tfoot>
27
- <tr valign="top">
28
- <td>
29
- <a href="<?php echo $GETSOCIAL_URL ?>?source=wordpress" target="_blank" class="button button-primary">Create GetSocial account</a> ___
30
- <a href="<?php echo $GETSOCIAL_URL ?>?source=wordpress" target="_blank" class="button button-primary">Login in your account</a></p>
31
- </td>
32
- </tr>
33
- <tr valign="top" align="left">
34
- <th>
35
- <h1>Step 2 - Insert your API Key</h1>
36
- <p>Visit your <a href="http://www.getsocial.io/redirect/profile">GetSocial profile settings</a> , find, copy and paste your API key in the form below.</p>
37
- </th>
38
- </tr>
39
- </tfoot>
40
- </table>
41
- <?php else: ?>
 
 
 
 
 
 
 
 
42
 
43
- <?php include 'tmpl/tabs.php' ?>
44
 
45
- <?php endif; ?>
46
 
47
- <?php if( !isset($_GET['tab']) ): ?>
48
 
49
- <?php include('tmpl/settings.php') ?>
 
 
 
50
 
51
  <?php else: ?>
52
 
53
- <?php include('tmpl/'.$_GET['tab'].'.php') ?>
 
 
 
 
 
 
 
 
54
 
 
55
  <?php endif; ?>
56
  </div>
11
 
12
  <?php if(get_option('gs-api-key') == ''): ?>
13
 
14
+ <div id="steps" class="form-content">
15
+ <div class="step">
16
+ <h1>Thanks for downloading the GetSocial Plugin!</h1>
17
+ <p>Just one more thing... To get started, you will need an API KEY.</strong></p>
18
+
19
+ <div class="info gs-clearfix">
20
+ <dl class="gs-clearfix">
21
+ <dt>URL</dt>
22
+ <dd><?= get_option('siteurl') ?></dd>
23
+ <dt>Email</dt>
24
+ <dd><?= get_option('admin_email') ?></dd>
25
+ </dl>
26
+
27
+ <p class="create-account">
28
+ <a href="<?php echo $GETSOCIAL_URL ?>/api/v1/sites/create?source=wordpress&amp;email=<?php echo get_option('admin_email') ?>&amp;url=<?php echo get_option('siteurl') ?>" class="button button-primary create-gs-account">
29
+ Get my API KEY!
30
+ </a>
31
+ </p>
32
+
33
+ <div class="notification-bar success green-cta hidden">
34
+ Congratulations! You are ready to start in 3..2..1..
35
+ </div>
36
+
37
+ <div class="notification-bar errors red-cta hidden">
38
+ </div>
39
+
40
+ <div class="api-key hidden">
41
+ <form id="api-key-form" method="post" action="options.php">
42
+ <?php settings_fields( 'getsocial-gs-settings' ); ?>
43
+ <?php do_settings_sections( 'getsocial-gs-settings' ); ?>
44
+ <p>Please go to your Getsocial Account and get your API KEY in the site options page.</p>
45
+ <input id="api-key" type="text" name="gs-api-key" size="60" value="" />
46
+ <?php submit_button('Save Changes'); ?>
47
+ </form>
48
+ </div>
49
+ </div>
50
 
 
51
 
 
52
 
 
53
 
54
+
55
+ </div>
56
+
57
+ </div>
58
 
59
  <?php else: ?>
60
 
61
+ <?php if( !isset($_GET['tab']) ): ?>
62
+
63
+ <?php include('tmpl/basic_stats.php') ?>
64
+
65
+ <?php include('tmpl/apps.php') ?>
66
+
67
+ <?php else: ?>
68
+
69
+ <?php include('tmpl/'.$_GET['tab'].'.php') ?>
70
 
71
+ <?php endif; ?>
72
  <?php endif; ?>
73
  </div>
js/builder.js CHANGED
@@ -8,7 +8,7 @@ var groupBuilder = {
8
  code_template = code_template.replace('SIZE', options.size);
9
  code_template = code_template.replace('COUNTER', options.counter);
10
 
11
- jQuery('#gs-group-code').html(code_template);
12
  },
13
 
14
  updatePreview: function(options){
@@ -79,7 +79,7 @@ var groupBuilder = {
79
  }
80
  }).join(','),
81
  size: jQuery('#group_size').val(),
82
- counter: jQuery('input[name="gs-group-counter"]:checked').val() == 'Y' ? 'true' : 'false'
83
  };
84
 
85
  this.updatePreview(options);
@@ -89,12 +89,12 @@ var groupBuilder = {
89
  }
90
 
91
  jQuery(function(){
92
- $group_builder = jQuery('#group-builder');
93
  if($group_builder.size() > 0){
94
 
95
  groupBuilder.refresh();
96
 
97
- jQuery('#group-builder input, #group-builder select').on('change', function(){
98
  groupBuilder.refresh();
99
  })
100
 
8
  code_template = code_template.replace('SIZE', options.size);
9
  code_template = code_template.replace('COUNTER', options.counter);
10
 
11
+ // jQuery('#gs-group-code').html(code_template);
12
  },
13
 
14
  updatePreview: function(options){
79
  }
80
  }).join(','),
81
  size: jQuery('#group_size').val(),
82
+ counter: jQuery('input.has_counter:checked').val() == 'Y' ? 'true' : 'false'
83
  };
84
 
85
  this.updatePreview(options);
89
  }
90
 
91
  jQuery(function(){
92
+ $group_builder = jQuery('#social-bar');
93
  if($group_builder.size() > 0){
94
 
95
  groupBuilder.refresh();
96
 
97
+ jQuery('#social-bar input, #social-bar select').on('change', function(){
98
  groupBuilder.refresh();
99
  })
100
 
js/jquery.onoff.min.js DELETED
@@ -1,4 +0,0 @@
1
- /** jquery.onoff - v0.3.6 - 2014-06-23
2
- * https://github.com/timmywil/jquery.onoff
3
- * Copyright (c) 2014 Timmy Willison; Licensed MIT */
4
- !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?b(require("jquery")):b(a.jQuery)}(this,function(a){"use strict";function b(c,d){if(!(this instanceof b))return new b(c,d);if("input"!==c.nodeName.toLowerCase()||"checkbox"!==c.type)return a.error("OnOff should be called on checkboxes");var e=a.data(c,b.datakey);return e?e:(this.options=d=a.extend({},b.defaults,d),this.elem=c,this.$elem=a(c).addClass(d.className),this.$doc=a(c.ownerDocument||document),d.namespace+=a.guid++,c.id||(c.id="onoffswitch"+g++),this.enable(),a.data(c,b.datakey,this),void 0)}var c="over out down up move enter leave cancel".split(" "),d=a.extend({},a.event.mouseHooks),e={};if(window.PointerEvent)a.each(c,function(b,c){a.event.fixHooks[e[c]="pointer"+c]=d});else{var f=d.props;d.props=f.concat(["touches","changedTouches","targetTouches","altKey","ctrlKey","metaKey","shiftKey"]),d.filter=function(a,b){var c,d=f.length;if(!b.pageX&&b.touches&&(c=b.touches[0]))for(;d--;)a[f[d]]=c[f[d]];return a},a.each(c,function(b,c){if(2>b)e[c]="mouse"+c;else{var f="touch"+("down"===c?"start":"up"===c?"end":c);a.event.fixHooks[f]=d,e[c]=f+" mouse"+c}})}a.pointertouch=e;var g=1,h=Array.prototype.slice;return b.datakey="_onoff",b.defaults={namespace:".onoff",className:"onoffswitch-checkbox"},b.prototype={constructor:b,instance:function(){return this},wrap:function(){var b=this.elem,c=this.$elem,d=this.options,e=c.parent(".onoffswitch");e.length||(c.wrap('<div class="onoffswitch"></div>'),e=c.parent().addClass(b.className.replace(d.className,""))),this.$con=e;var f=c.next('label[for="'+b.id+'"]');f.length||(f=a("<label/>").attr("for",b.id).insertAfter(b)),this.$label=f.addClass("onoffswitch-label");var g=f.find(".onoffswitch-inner");g.length||(g=a("<div/>").addClass("onoffswitch-inner").prependTo(f)),this.$inner=g;var h=f.find(".onoffswitch-switch");h.length||(h=a("<div/>").addClass("onoffswitch-switch").appendTo(f)),this.$switch=h},_handleMove:function(a){if(!this.disabled){this.moved=!0,this.lastX=a.pageX;var b=Math.max(Math.min(this.startX-this.lastX,this.maxRight),0);this.$switch.css("right",b),this.$inner.css("marginLeft",100*-(b/this.maxRight)+"%")}},_startMove:function(b){b.preventDefault();var c,d;"pointerdown"===b.type?(c="pointermove",d="pointerup"):"touchstart"===b.type?(c="touchmove",d="touchend"):(c="mousemove",d="mouseup");var e=this.elem,f=this.$elem,g=this.options.namespace,h=this.$switch,i=h[0],j=this.$inner.add(h).css("transition","none");this.maxRight=this.$con.width()-h.width()-a.css(i,"margin-left",!0)-a.css(i,"margin-right",!0)-a.css(i,"border-left-width",!0)-a.css(i,"border-right-width",!0);var k=e.checked;this.moved=!1,this.startX=b.pageX+(k?0:this.maxRight);var l=this,m=this.$doc.on(c+g,a.proxy(this._handleMove,this)).on(d+g,function(){j.css("transition",""),m.off(g),setTimeout(function(){if(l.moved){var a=l.lastX>l.startX-l.maxRight/2;e.checked!==a&&(e.checked=a,f.trigger("change"))}l.$switch.css("right",""),l.$inner.css("marginLeft","")})})},_bind:function(){this._unbind(),this.$switch.on(a.pointertouch.down,a.proxy(this._startMove,this))},enable:function(){this.wrap(),this._bind(),this.disabled=!1},_unbind:function(){this.$doc.add(this.$switch).off(this.options.namespace)},disable:function(){this.disabled=!0,this._unbind()},unwrap:function(){this.disable(),this.$label.remove(),this.$elem.unwrap().removeClass(this.options.className)},isDisabled:function(){return this.disabled},destroy:function(){this.disable(),a.removeData(this.elem,b.datakey)},option:function(b,c){var d,e=this.options;if(!b)return a.extend({},e);if("string"==typeof b){if(1===arguments.length)return void 0!==e[b]?e[b]:null;d={},d[b]=c}else d=b;a.each(d,a.proxy(function(a,b){switch(a){case"namespace":this._unbind();break;case"className":this.$elem.removeClass(e.className)}switch(e[a]=b,a){case"namespace":this._bind();break;case"className":this.$elem.addClass(b)}},this))}},a.fn.onoff=function(c){var d,e,f,g;return"string"==typeof c?(g=[],e=h.call(arguments,1),this.each(function(){d=a.data(this,b.datakey),d?"_"!==c.charAt(0)&&"function"==typeof(f=d[c])&&void 0!==(f=f.apply(d,e))&&g.push(f):g.push(void 0)}),g.length?1===g.length?g[0]:g:this):this.each(function(){new b(this,c)})},a.OnOff=b});
 
 
 
 
js/plugin.js CHANGED
@@ -1,3 +1,41 @@
1
  jQuery(function($) {
2
- $('input.onoff[type="checkbox"]').onoff();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  });
1
  jQuery(function($) {
2
+ jQuery('#api-key-form').submit(function() {
3
+ var data = jQuery(this).serialize();
4
+ jQuery('.notification-bar').hide();
5
+ jQuery('.api-key').hide();
6
+
7
+ jQuery.post( 'options.php', data).success( function(response){
8
+ jQuery('.notification-bar.success').show();
9
+
10
+ setTimeout('window.location.reload();', 3000);
11
+ });
12
+ return false;
13
+ });
14
+
15
+ jQuery('.create-gs-account').on('click', function(e){
16
+ e.preventDefault();
17
+ jQuery('.create-account').hide();
18
+ jQuery.post(jQuery(this).attr('href'), { source: 'wordpress' }, function(data){
19
+ if(data.errors != undefined){
20
+ jQuery('.notification-bar.errors').html(data.errors[0]).show();
21
+ jQuery('.api-key').show();
22
+ } else {
23
+ jQuery('#api-key').attr('value', data.api_key);
24
+ jQuery('#api-key-form').trigger('submit');
25
+ }
26
+ });
27
+ });
28
+
29
+ if(jQuery('.graphs').length > 0){
30
+ var $graphs = jQuery('.graphs'),
31
+ graph_api = $graphs.attr('data-graph-api');
32
+
33
+ $.get(graph_api, function(data){
34
+ $.each(['total_visits', 'total_shares', 'total_leads'], function(i,stat){
35
+ console.log(stat);
36
+ jQuery('.'+stat).html(data[stat]);
37
+ });
38
+
39
+ })
40
+ }
41
  });
lib/gs.php CHANGED
@@ -29,6 +29,10 @@ class GS {
29
  }
30
  }
31
 
 
 
 
 
32
  function getElements(){
33
  return json_decode($this->elements,true);
34
  }
@@ -54,6 +58,7 @@ class GS {
54
  }
55
 
56
  function save($site_info){
 
57
  update_option('gs-identifier', $site_info->identifier);
58
  update_option('gs-elements', json_encode($site_info->elements));
59
  }
@@ -115,6 +120,7 @@ EOF;
115
  $template = get_option('gs-group-template');
116
  $size = get_option('gs-group-size');
117
  $counter = get_option('gs-group-counter') == 'Y' ? 'true' : 'false';
 
118
 
119
  $ntw_fb = get_option('gs-group-network-fb');
120
  $ntw_tw = get_option('gs-group-network-tw');
@@ -141,4 +147,38 @@ EOF;
141
 
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
29
  }
30
  }
31
 
32
+ function api_url($path){
33
+ return $this->api_url.$path;
34
+ }
35
+
36
  function getElements(){
37
  return json_decode($this->elements,true);
38
  }
58
  }
59
 
60
  function save($site_info){
61
+ print_r($site_info);
62
  update_option('gs-identifier', $site_info->identifier);
63
  update_option('gs-elements', json_encode($site_info->elements));
64
  }
120
  $template = get_option('gs-group-template');
121
  $size = get_option('gs-group-size');
122
  $counter = get_option('gs-group-counter') == 'Y' ? 'true' : 'false';
123
+ $position = get_option('gs-group-position');
124
 
125
  $ntw_fb = get_option('gs-group-network-fb');
126
  $ntw_tw = get_option('gs-group-network-tw');
147
 
148
  }
149
 
150
+ function getFloatingBar(){
151
+ $permalink = esc_url( get_permalink() );
152
+ $template = get_option('gs-floating-template');
153
+ $size = get_option('gs-floating-size');
154
+ $counter = get_option('gs-floating-counter') == 'Y' ? 'true' : 'false';
155
+ $position = get_option('gs-floating-position');
156
+ $floating = ($position == '1' ? 'right' : 'left');
157
+
158
+ $ntw_fb = get_option('gs-floating-network-fb');
159
+ $ntw_tw = get_option('gs-floating-network-tw');
160
+ $ntw_pn = get_option('gs-floating-network-pn');
161
+ $ntw_gp = get_option('gs-floating-network-gp');
162
+
163
+ $networks = '';
164
+ $networks_available = array('fb', 'tw', 'pn', 'gp');
165
+ foreach($networks_available as $nw):
166
+ if(get_option('gs-floating-network-'.$nw) == 'Y'):
167
+ $networks .= ( $networks == '' ? $nw : ','.$nw);
168
+ endif;
169
+ endforeach;
170
+
171
+ $code = <<<EOF
172
+ <div class="gs-group"
173
+ data-template="$template:$size"
174
+ data-networks="$networks"
175
+ data-counter="$counter"
176
+ data-floating="$floating"
177
+ data-url="$permalink"></div>
178
+ EOF;
179
+
180
+ return $code;
181
+
182
+ }
183
+
184
  }
readme.txt CHANGED
@@ -3,23 +3,23 @@ Contributors: GetSocial.io
3
  Donate link:
4
  Tags: getsocial, sharing buttons, share button, social buttons, social sharing, ecommerce, social analytics, addthis, sharethis, woocommerce, e-commerce, AddThis, addtoany, admin, bookmark, bookmarking, bookmarks, button, Facebook, Facebook share, facebook like, google, google plus, google plus one, Like, linkedin, lockerz, pin, pin it, pinit, pinterest, plugin, plus 1, plus one, Post, posts, Reddit, save, seo, sexybookmarks, share, shareaholic, sharedaddy, sharethis, sharing, sidebar, sociable, social, social bookmarking, social bookmarks, statistics, stats, stumbleupon, tumblr, tweet, twitter, social media, social share, widget
5
  Requires at least: 3.0
6
- Tested up to: 4.0
7
- Stable tag: 1.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Add social media sharing buttons from the most popular networks to track user activity, increase traffic, improve SEO, and follow conversions.
12
 
13
  == Description ==
14
- *GetSocial's* **Social Sharing Buttons & Analytics** is a free WordPress plugin that enables social sharing on your site. These buttons not only allow your visitors to share your content, but they also track your users' actions such as how many shares have been made, how those shares are generating traffic to your site, and how that traffic is converting into more sales or subscriptions.
15
 
16
  <h4>For more information check out <a href="http://getsocial.io/why-getsocial">Why GetSocial</a></h4>
17
 
18
  <h3>GetSocial works in four easy steps</h3>
19
-
20
 
21
  <h4>1. Enable Social Sharing and Increase your SEO ranking</h4>
22
-
23
 
24
  * **Custom Action Buttons**: Create your own sharing buttons, with unique expressions, sizes, and colors.
25
  * **Social Sharing Bar**: Define which social networks you want your users to share your content and start understanding their behavior.
@@ -27,7 +27,7 @@ Add social media sharing buttons from the most popular networks to track user ac
27
 
28
 
29
  <h4>2. Collect user data through your share buttons</h4>
30
-
31
 
32
  * **Users Analytics**: Get user data such as name, gender, location, and contact information and see how many visits, page views, and actions they have made.
33
  * **Posts Analytics**: See how many unique visitors, page views, and shares have taken place in each item.
@@ -35,7 +35,7 @@ Add social media sharing buttons from the most popular networks to track user ac
35
 
36
 
37
  <h4>3. Analyze your data: identify opportunities, influencers, and conversions</h4>
38
-
39
 
40
  * **Opportunities**: Find out who is most active on each of your product pages and then contact them directly to close the sale.
41
  * **Influencers**: See who is your most influential user and how many leads and conversions they generate for your page.
@@ -43,7 +43,7 @@ Add social media sharing buttons from the most popular networks to track user ac
43
 
44
 
45
  <h4>4. Engage: Export the data you collected and use it with your current marketing tools</h4>
46
-
47
 
48
  A comprehensive list of features can be seen <a href="http://getsocial.io/features">here</a> and if you need any help or have any questions please feel free to <a href="http://getsocial.io/contacts/stay-in-touch">contact us</a> at any time.
49
 
@@ -86,10 +86,24 @@ Today, Facebook buttons are simply buttons with counters. The data and value you
86
 
87
  == Changelog ==
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  **0.0.2**
90
 
91
  - This version fixes a bug that prevented the use of the plugin. Please Upgrade.
92
 
93
  **0.0.1**
94
 
95
- - First release
3
  Donate link:
4
  Tags: getsocial, sharing buttons, share button, social buttons, social sharing, ecommerce, social analytics, addthis, sharethis, woocommerce, e-commerce, AddThis, addtoany, admin, bookmark, bookmarking, bookmarks, button, Facebook, Facebook share, facebook like, google, google plus, google plus one, Like, linkedin, lockerz, pin, pin it, pinit, pinterest, plugin, plus 1, plus one, Post, posts, Reddit, save, seo, sexybookmarks, share, shareaholic, sharedaddy, sharethis, sharing, sidebar, sociable, social, social bookmarking, social bookmarks, statistics, stats, stumbleupon, tumblr, tweet, twitter, social media, social share, widget
5
  Requires at least: 3.0
6
+ Tested up to: 4.1
7
+ Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Add social media sharing buttons from the most popular networks to track user activity, increase traffic, improve SEO, and follow conversions.
12
 
13
  == Description ==
14
+ *GetSocial's* **Social Sharing Buttons & Analytics** is a free WordPress plugin that enables social sharing on your site. These buttons not only allow your visitors to share your content, but they also track your users' actions such as how many shares have been made, how those shares are generating traffic to your site, and how that traffic is converting into more sales or subscriptions.
15
 
16
  <h4>For more information check out <a href="http://getsocial.io/why-getsocial">Why GetSocial</a></h4>
17
 
18
  <h3>GetSocial works in four easy steps</h3>
19
+
20
 
21
  <h4>1. Enable Social Sharing and Increase your SEO ranking</h4>
22
+
23
 
24
  * **Custom Action Buttons**: Create your own sharing buttons, with unique expressions, sizes, and colors.
25
  * **Social Sharing Bar**: Define which social networks you want your users to share your content and start understanding their behavior.
27
 
28
 
29
  <h4>2. Collect user data through your share buttons</h4>
30
+
31
 
32
  * **Users Analytics**: Get user data such as name, gender, location, and contact information and see how many visits, page views, and actions they have made.
33
  * **Posts Analytics**: See how many unique visitors, page views, and shares have taken place in each item.
35
 
36
 
37
  <h4>3. Analyze your data: identify opportunities, influencers, and conversions</h4>
38
+
39
 
40
  * **Opportunities**: Find out who is most active on each of your product pages and then contact them directly to close the sale.
41
  * **Influencers**: See who is your most influential user and how many leads and conversions they generate for your page.
43
 
44
 
45
  <h4>4. Engage: Export the data you collected and use it with your current marketing tools</h4>
46
+
47
 
48
  A comprehensive list of features can be seen <a href="http://getsocial.io/features">here</a> and if you need any help or have any questions please feel free to <a href="http://getsocial.io/contacts/stay-in-touch">contact us</a> at any time.
49
 
86
 
87
  == Changelog ==
88
 
89
+ **1.1**
90
+
91
+ - Create account without leaving the plugin
92
+ - Add Floating Sharing Bar
93
+ - Basic Analytics avaliable
94
+
95
+ **1.0.1**
96
+
97
+ - Some bugs solved.
98
+
99
+ **1.0.0**
100
+
101
+ - First stable version released.
102
+
103
  **0.0.2**
104
 
105
  - This version fixes a bug that prevented the use of the plugin. Please Upgrade.
106
 
107
  **0.0.1**
108
 
109
+ - First release
tmpl/apps.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h2><i class="fa fa-list"></i>Apps</h2>
2
+ <div class="app-list">
3
+ <?php
4
+ $apps = array(
5
+ 'social bar' => array(
6
+ 'file' => 'social-bar',
7
+ 'active' => (get_option('gs-group-active') == '1'),
8
+ ),
9
+ 'floating bar' => array(
10
+ 'file' => 'floating-bar',
11
+ 'active' => (get_option('gs-floating-active') == '1'),
12
+ ),
13
+ // 'native bar' => array(
14
+ // 'file' => 'native-bar'
15
+ // ),
16
+ // 'custom expressions' => array(
17
+ // 'file' => 'custom-expressions'
18
+ // ),
19
+ // 'url tracking' => array(
20
+ // 'file' => 'url tracking'
21
+ // ),
22
+ // 'conversions'=> array(
23
+ // 'file' => 'conversions'
24
+ // )
25
+ );
26
+
27
+ foreach($apps as $app => $settings):
28
+ ?>
29
+
30
+ <div class="app-wrapper">
31
+ <div class="app-link">
32
+ <? if($settings['active']): ?>
33
+ <div class="app-status done"><i class="fa fa-check"></i></div>
34
+ <? endif; ?>
35
+ <img src="http://dummyimage.com/290x230/fff/ccc.png&amp;text=<?echo $app ?>" alt="">
36
+ <div class="app-link-buttons app-type-edit">
37
+ <a href="admin.php?page=<? echo slug_path('init.php&tab='.$settings['file']) ?>">
38
+
39
+ <?php echo ($settings['active']) ? '<i class="fa fa-edit"></i>Edit' : '<i class="fa fa-plus"></i>Add' ?>
40
+ </a>
41
+ </div>
42
+ </div>
43
+ </div>
44
+
45
+ <?php endforeach; ?>
46
+ </div>
tmpl/basic_stats.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h2><i class="fa fa-bar-chart"></i>Stats</h2>
2
+
3
+ <div class="graphs gs-clearfix" data-graph-api="<?php echo $GS->api_url('sites/analytics/'.get_option('gs-api-key')) ?>">
4
+ <div class="graph">
5
+ <h4><i class="fa fa-group"></i>Visits</h4>
6
+ <h3 class="total_visits">...</h5>
7
+ </div>
8
+ <div class="graph">
9
+ <h4><i class="fa fa-share-alt"></i>Shares</h4>
10
+ <h3 class="total_shares">...</h5>
11
+ </div>
12
+ <div class="graph">
13
+ <h4><i class="fa fa-sign-in"></i>Leads</h4>
14
+ <h3 class="total_leads">...</h5>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="cl"></div>
tmpl/custom-expressions.php CHANGED
@@ -7,35 +7,50 @@
7
  </div>
8
  <?php endif; ?>
9
 
10
- <form id="config-form" method="post" action="options.php">
11
- <?php settings_fields( 'getsocial-gs-custom-expressions' ); ?>
12
- <?php do_settings_sections( 'getsocial-gs-custom-expressions' ); ?>
13
-
14
- <?php if($has_custom_social_actions): ?>
15
- <div class="bar-active">
16
- <a href="http://getsocial.io?source=wordpress" target="_blank" class="gsbutton" >New Custom Expression</a>
17
-
18
- <div class="cl"></div>
19
- </div>
20
- <hr />
21
-
22
- <div class="onoff_check">
23
- <span class="label">Active</span> <input type="checkbox" class="onoff" name="gs-custom-expression-active" value="1" style="display:none" <?php echo (get_option('gs-custom-expression-active') == '1' ? 'checked' : '') ?>/>
24
- </div>
25
-
26
- <h3>List of created expressions</h3>
27
-
28
- <table class="custom-expressions">
29
- <?php foreach($GS->getElements() as $identifier => $elem): ?>
30
- <tr>
31
- <td><?= $elem ?></td>
32
- </tr>
33
- <?php endforeach; ?>
34
- </table>
35
-
36
- <div class="bar-active">
37
- <?php submit_button('Save Changes'); ?>
38
-
39
- <div class="cl"></div>
40
- </div>
41
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  </div>
8
  <?php endif; ?>
9
 
10
+ <div class="editor">
11
+ <form id="config-form" method="post" action="options.php">
12
+ <?php settings_fields( 'getsocial-gs-custom-expressions' ); ?>
13
+ <?php do_settings_sections( 'getsocial-gs-custom-expressions' ); ?>
14
+
15
+ <?php if($has_custom_social_actions): ?>
16
+
17
+ <div class="half">
18
+ <div class="onoff_check">
19
+ <span class="label">Active</span> <input type="checkbox" class="onoff" name="gs-custom-expression-active" value="1" style="display:none" <?php echo (get_option('gs-custom-expression-active') == '1' ? 'checked' : '') ?>/>
20
+ </div>
21
+
22
+ <div class="tab-content" id="config-form" >
23
+ <div class="half gs-clearfix">
24
+ <div class="form-group">
25
+ <label class="form-title" for="gs-buttons-position">Position on post</label>
26
+
27
+ <label>Top</label>
28
+ <input type="radio" value="1" name="gs-custom-expression-position" <?php echo (get_option('gs-custom-expression-position') == 1 ? 'checked="checked"' : '') ?> />
29
+ <label>Bottom</label>
30
+ <input type="radio" value="0" name="gs-custom-expression-position" <?php echo (get_option('gs-custom-expression-position') == 0 ? 'checked="checked"' : '') ?> />
31
+ </div>
32
+ </div>
33
+ </div>
34
+
35
+ <div class="cl"></div>
36
+
37
+ <?php submit_button('Save Changes'); ?>
38
+ </div>
39
+
40
+ <div class="half">
41
+ <h3>List of created expressions</h3>
42
+
43
+ <table class="custom-expressions">
44
+ <?php foreach($GS->getElements() as $identifier => $elem): ?>
45
+ <tr>
46
+ <td><?= $elem ?></td>
47
+ </tr>
48
+ <?php endforeach; ?>
49
+ </table>
50
+
51
+ <a href="http://getsocial.io?source=wordpress" target="_blank" class="gsbutton" >New Custom Expression</a>
52
+ </div>
53
+
54
+ <?php endif; ?>
55
+ </form>
56
+ </div>
tmpl/floating-bar.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h2><i class="fa fa-cog"></i>Floating Bar</h2>
2
+
3
+ <form id="social-bar" method="post" action="options.php">
4
+ <?php settings_fields( 'getsocial-gs-floating' ); ?>
5
+ <?php do_settings_sections( 'getsocial-gs-floating' ); ?>
6
+
7
+ <div class="form-content editor-preview">
8
+ <div id="reaction-preview" class="native-buttons text-center clearfix">
9
+ <div class="gs-group"></div>
10
+ </div>
11
+ </div>
12
+
13
+ <div class="form-content">
14
+ <label class="control active">Active</label>
15
+ <div class="activate">
16
+ <input type="checkbox" name="gs-floating-active" value="1" <?php echo (get_option('gs-floating-active') == '1' ? 'checked' : '') ?>/>
17
+ </div>
18
+ </div>
19
+
20
+ <div class="form-content">
21
+ <label class="control">Social Networks</label>
22
+
23
+ <div class="networks with-inputs-label">
24
+ <?php
25
+ $social = array(
26
+ 'fb' => array('facebook', 'facebook'),
27
+ 'tw' => array('twitter', 'twitter'),
28
+ 'pn' => array('pinterest', 'pinterest'),
29
+ 'gp' => array('google', 'google-plus')
30
+ ); ?>
31
+
32
+ <?php foreach($social as $key => $value): ?>
33
+
34
+ <?php
35
+ $name = $value[0];
36
+ $icon = $value[1];
37
+ $option_value_exists = !get_option('gs-floating-network-'.$key);
38
+ $option_value = get_option('gs-floating-network-'.$key);
39
+ ?>
40
+
41
+ <input type="checkbox"
42
+ name="gs-floating-network-<?php echo $key ?>"
43
+ id="gs-floating-network-<?php echo $key ?>"
44
+ class="ntw group-network"
45
+ value="Y"
46
+ rel="<?php echo $key ?>"
47
+ <?php echo ($option_value == 'Y' || !$option_value_exists ? 'checked' : '') ?>/>
48
+
49
+ <label for="gs-floating-network-<?php echo $key ?>" class="no-padding"><?php echo $name ?></label>
50
+
51
+ <?php endforeach; ?>
52
+
53
+ </div>
54
+ </div>
55
+
56
+ <div class="form-content">
57
+ <label class="control">Template</label>
58
+
59
+ <div class="templates">
60
+ <?php
61
+ $templates = array(
62
+ 'Square Rounded' => 'gs-template1',
63
+ 'Rounded' => 'gs-template2',
64
+ 'Special' => 'gs-template3',
65
+ 'Basic Grey' => 'gs-template4',
66
+ 'Basic Black' => 'gs-template5'
67
+ )
68
+ ?>
69
+
70
+ <select id="group_template" name="gs-floating-template">
71
+ <?php foreach($templates as $name => $value): ?>
72
+ <option value="<?= $value ?>" <?= get_option('gs-floating-template') == $value ? 'selected' : '' ?>><?= $name ?></option>
73
+ <?php endforeach; ?>
74
+ </select>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="form-content">
79
+ <label class="control">Size</label>
80
+
81
+ <div class="sizes">
82
+ <?php
83
+ $sizes = array(
84
+ 'Small' => 'gs-small',
85
+ 'Medium' => 'gs-medium',
86
+ 'Large' => 'gs-large'
87
+ )
88
+ ?>
89
+ <select id="group_size" name="gs-floating-size">
90
+ <?php foreach($sizes as $name => $value): ?>
91
+ <option value="<?php echo $value ?>" <?php echo get_option('gs-floating-size') == $value || (!get_option('gs-floating-size') && $value == 'gs-large') ? 'selected' : '' ?> ><?php echo $name ?></option>
92
+ <?php endforeach; ?>
93
+ </select>
94
+ </div>
95
+ </div>
96
+
97
+ <div class="form-content">
98
+ <label class="control">Counter</label>
99
+ <div class="counter with-inputs-label">
100
+
101
+ <input type="radio" value="Y" class="has_counter" name="gs-floating-counter" <?php echo (get_option('gs-floating-counter') == 'Y' || !get_option('gs-floating-counter') ? 'checked="checked"' : '') ?> />
102
+ <label>Yes</label>
103
+
104
+ <input type="radio" value="N" class="has_counter" name="gs-floating-counter" <?php echo (get_option('gs-floating-counter') == 'N' ? 'checked="checked"' : '') ?> />
105
+ <label>No</label>
106
+
107
+ </div>
108
+ </div>
109
+
110
+ <div class="form-content">
111
+ <label class="control">Position</label>
112
+
113
+ <div class="position with-inputs-label">
114
+ <input type="radio" value="0" name="gs-floating-position" <?php echo (get_option('gs-floating-position') == 0 ? 'checked="checked"' : '') ?> />
115
+ <label>Left</label>
116
+
117
+ <input type="radio" value="1" name="gs-floating-position" <?php echo (get_option('gs-floating-position') == 1 ? 'checked="checked"' : '') ?> />
118
+ <label>Right</label>
119
+ </div>
120
+
121
+ </div>
122
+
123
+ <div class="bar-active">
124
+ <?php submit_button('Save Changes'); ?>
125
+
126
+ <div class="cl"></div>
127
+ </div>
128
+
129
+ </form>
tmpl/header.php CHANGED
@@ -4,6 +4,7 @@ if ( !current_user_can( 'manage_options' ) ) {
4
  }
5
 
6
  $GETSOCIAL_URL = 'http://getsocial.io';
 
7
 
8
  $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
9
 
@@ -20,36 +21,50 @@ $needs_update = $GS->needs_update();
20
 
21
  wp_register_style( 'getsocial-style', plugins_url('../css/getsocial-style.css', __FILE__) );
22
  wp_register_style( 'group-buttons', plugins_url('../css/group-buttons.css', __FILE__) );
23
- wp_register_style( 'jquery.onoff', plugins_url('../css/jquery.onoff.css', __FILE__) );
24
 
25
  wp_enqueue_style( 'getsocial-style' );
26
  wp_enqueue_style( 'group-buttons' );
27
- wp_enqueue_style( 'jquery.onoff' );
28
 
29
  wp_register_script( 'builder', plugins_url('../js/builder.js', __FILE__) );
30
- wp_register_script( 'jquery.onoff.min', plugins_url('../js/jquery.onoff.min.js', __FILE__) );
31
  wp_register_script( 'plugin', plugins_url('../js/plugin.js', __FILE__) );
32
 
33
  wp_enqueue_script( 'builder' );
34
- wp_enqueue_script( 'jquery.onoff.min' );
35
  wp_enqueue_script( 'plugin' );
36
 
37
  ?>
38
 
 
 
39
  <header class="gs-clearfix">
40
- <h1>
41
- <img src="<?= plugins_url( '../images/logo.png', __FILE__ ) ?>" alt="GetSocial" />
42
- <? if(isset($sub_menu)): ?>
43
- <small>- <?= $sub_menu ?></small>
44
- <? endif; ?>
45
- </h1>
46
-
47
- <h2>
48
- We provide trackable social sharing buttons that identify which visitors are sharing your content. <br/>
49
- We also help you understand how social sharing is contributing to your traffic and conversions.
50
- </h2>
 
 
 
51
  </header>
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  <script type="text/javascript">
54
  function toggle(id) {
55
  var e = document.getElementById(id);
4
  }
5
 
6
  $GETSOCIAL_URL = 'http://getsocial.io';
7
+ // $GETSOCIAL_URL = 'http://localhost:3000';
8
 
9
  $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
10
 
21
 
22
  wp_register_style( 'getsocial-style', plugins_url('../css/getsocial-style.css', __FILE__) );
23
  wp_register_style( 'group-buttons', plugins_url('../css/group-buttons.css', __FILE__) );
 
24
 
25
  wp_enqueue_style( 'getsocial-style' );
26
  wp_enqueue_style( 'group-buttons' );
 
27
 
28
  wp_register_script( 'builder', plugins_url('../js/builder.js', __FILE__) );
 
29
  wp_register_script( 'plugin', plugins_url('../js/plugin.js', __FILE__) );
30
 
31
  wp_enqueue_script( 'builder' );
 
32
  wp_enqueue_script( 'plugin' );
33
 
34
  ?>
35
 
36
+ <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
37
+
38
  <header class="gs-clearfix">
39
+ <div class="wrap-header">
40
+ <h1>
41
+ <img src="<?= plugins_url( '../images/logo.png', __FILE__ ) ?>" alt="GetSocial" />
42
+ <? if(isset($sub_menu)): ?>
43
+ <small>- <?= $sub_menu ?></small>
44
+ <? endif; ?>
45
+ </h1>
46
+
47
+ <h2>
48
+ We provide trackable social sharing buttons that identify which visitors are sharing your content. <br/>
49
+ We also help you understand how social sharing is contributing to your traffic and conversions.
50
+ </h2>
51
+ </div>
52
+
53
  </header>
54
 
55
+ <?php if(get_option('gs-api-key') != ''): ?>
56
+ <div class="cl"></div>
57
+ <div class="top-nav">
58
+ <div class="wrap">
59
+ <a href="admin.php?page=<? echo slug_path('init.php') ?>" class="<?php echo !isset($_GET['tab']) ? 'active' : '' ?>"><i class="fa fa-home"></i>Home</a>
60
+ <a href="admin.php?page=<? echo slug_path('init.php&tab=settings') ?>" class="<?php echo ($_GET['tab'] == 'settings') ? 'active' : '' ?>"><i class="fa fa-cog"></i>Settings</a>
61
+ <a href="mailto:support@getsocial.io"><i class="fa fa-question-circle"></i>Can we help you?</a>
62
+ </div>
63
+ </div>
64
+ <?php endif; ?>
65
+
66
+
67
+
68
  <script type="text/javascript">
69
  function toggle(id) {
70
  var e = document.getElementById(id);
tmpl/settings.php CHANGED
@@ -1,27 +1,28 @@
1
-
 
2
  <form id="config-form" method="post" action="options.php">
3
  <?php settings_fields( 'getsocial-gs-settings' ); ?>
4
  <?php do_settings_sections( 'getsocial-gs-settings' ); ?>
5
- <div class="form-group">
6
- <label class="form-title" for="api-key">Insert/Update GetSocial API key here</label>
7
- <div id="api-key-wrap">
8
- <div id="api-key-field">
9
- <input id="api-key" type="text" name="gs-api-key" size="80" value="<?php echo get_option('gs-api-key'); ?>" />
10
- <!-- <div class="badge"><img src="<?php echo plugins_url('images/done.png', __FILE__); ?>" alt=""></div> -->
11
- </div>
12
  </div>
13
  </div>
14
 
15
  <?php if(get_option('gs-api-key') != ''): ?>
16
 
17
- <div class="form-group">
18
- <label class="form-title" for="gs-buttons-position">Custom Action Button Language</label>
19
- <select name="gs-lang">
20
- <option value="en" <?php echo (get_option('gs-lang') == 'en' ? 'selected="selected"' : '') ?>>English</option>
21
- <option value="es" <?php echo (get_option('gs-lang') == 'es' ? 'selected="selected"' : '') ?>>Spanish</option>
22
- <option value="pt_PT" <?php echo (get_option('gs-lang') == 'pt_PT' ? 'selected="selected"' : '') ?>>Portuguese (Portugal)</option>
23
- <option value="pt_BR" <?php echo (get_option('gs-lang') == 'pt_BR' ? 'selected="selected"' : '') ?>>Portuguese (Brazil)</option>
24
- </select>
 
 
25
  </div>
26
 
27
  <?php endif; ?>
1
+ <h2><i class="fa fa-cog"></i>Settings</h2>
2
+
3
  <form id="config-form" method="post" action="options.php">
4
  <?php settings_fields( 'getsocial-gs-settings' ); ?>
5
  <?php do_settings_sections( 'getsocial-gs-settings' ); ?>
6
+ <div class="form-content">
7
+ <label class="control">GetSocial API KEY</label>
8
+
9
+ <div class="api-key-field">
10
+ <input type="text" name="gs-api-key" size="60" value="<?php echo get_option('gs-api-key'); ?>" />
 
 
11
  </div>
12
  </div>
13
 
14
  <?php if(get_option('gs-api-key') != ''): ?>
15
 
16
+ <div class="form-content">
17
+ <label class="control">Language</label>
18
+ <div class="languages">
19
+ <select name="gs-lang">
20
+ <option value="en" <?php echo (get_option('gs-lang') == 'en' ? 'selected="selected"' : '') ?>>English</option>
21
+ <option value="es" <?php echo (get_option('gs-lang') == 'es' ? 'selected="selected"' : '') ?>>Spanish</option>
22
+ <option value="pt_PT" <?php echo (get_option('gs-lang') == 'pt_PT' ? 'selected="selected"' : '') ?>>Portuguese (Portugal)</option>
23
+ <option value="pt_BR" <?php echo (get_option('gs-lang') == 'pt_BR' ? 'selected="selected"' : '') ?>>Portuguese (Brazil)</option>
24
+ </select>
25
+ </div>
26
  </div>
27
 
28
  <?php endif; ?>
tmpl/sharing-bar.php DELETED
@@ -1,142 +0,0 @@
1
- <form id="config-form" method="post" action="options.php">
2
- <?php settings_fields( 'getsocial-gs-group' ); ?>
3
- <?php do_settings_sections( 'getsocial-gs-group' ); ?>
4
-
5
- <div id="dashboard-widgets-wrap">
6
- <div id="dashboard-widgets" class="metabox-holder">
7
- <div class="postbox-container" style="width: 50%">
8
-
9
- <!--reaction editor start-->
10
- <div id="group-builder" class="native-buttons button-editor-no-nav">
11
- <div class="onoff_check">
12
- <span class="label">Active? </span> <input type="checkbox" class="onoff" name="gs-group-active" value="1" style="display:none" <?php echo (get_option('gs-group-active') == '1' ? 'checked' : '') ?>/>
13
- </div>
14
-
15
- <div class="tab-content" id="config-form" >
16
- <!--tab start-->
17
- <div class="tab-pane clearfix" id="general-tab">
18
- <div class="panel-body inline-editor-opt inline-editor-selector clearfix">
19
- <div class="form-group">
20
- <label class="form-title" for="gs-buttons-position">Choose Social Networks</label>
21
-
22
- <br/>
23
- <?php
24
- $social = array(
25
- 'fb' => array('facebook', 'facebook'),
26
- 'tw' => array('twitter', 'twitter'),
27
- 'pn' => array('pinterest', 'pinterest'),
28
- 'gp' => array('google', 'google-plus')
29
- ); ?>
30
-
31
- <?php foreach($social as $key => $value): ?>
32
-
33
- <?php
34
- $name = $value[0];
35
- $icon = $value[1];
36
- $option_value_exists = !get_option('gs-group-network-'.$key);
37
- $option_value = get_option('gs-group-network-'.$key);
38
- ?>
39
-
40
- <input type="checkbox"
41
- name="gs-group-network-<?php echo $key ?>"
42
- id="gs-group-network-<?php echo $key ?>"
43
- class="ntw group-network"
44
- value="Y"
45
- rel="<?php echo $key ?>"
46
- <?php echo ($option_value == 'Y' || !$option_value_exists ? 'checked' : '') ?>/>
47
-
48
- <label for="gs-group-network-<?php echo $key ?>" class="no-padding"><?php echo $name ?></label>
49
-
50
- <?php endforeach; ?>
51
- </div>
52
- </div>
53
- </div>
54
-
55
- <div class="half">
56
- <div class="form-group">
57
- <label class="form-title" for="gs-buttons-position">Choose Template</label>
58
-
59
- <?php
60
- $templates = array(
61
- 'Square Rounded' => 'gs-template1',
62
- 'Rounded' => 'gs-template2',
63
- 'Special' => 'gs-template3',
64
- 'Basic Grey' => 'gs-template4',
65
- 'Basic Black' => 'gs-template5'
66
- )
67
- ?>
68
-
69
- <select id="group_template" name="gs-group-template">
70
- <?php foreach($templates as $name => $value): ?>
71
- <option value="<?= $value ?>" <?= get_option('gs-group-template') == $value ? 'selected' : '' ?>><?= $name ?></option>
72
- <?php endforeach; ?>
73
- </select>
74
- </div>
75
- </div>
76
-
77
- <div class="half gs-clearfix">
78
- <div class="form-group">
79
- <label class="form-title" for="gs-buttons-position">Choose Size</label>
80
-
81
- <?php
82
- $sizes = array(
83
- 'Small' => 'gs-small',
84
- 'Medium' => 'gs-medium',
85
- 'Large' => 'gs-large'
86
- )
87
- ?>
88
- <select id="group_size" name="gs-group-size">
89
- <?php foreach($sizes as $name => $value): ?>
90
- <option value="<?php echo $value ?>" <?php echo get_option('gs-group-size') == $value || (!get_option('gs-group-size') && $value == 'gs-large') ? 'selected' : '' ?> ><?php echo $name ?></option>
91
- <?php endforeach; ?>
92
- </select>
93
- </div>
94
- </div>
95
-
96
- <div class="half">
97
- <div class="form-group">
98
- <label class="form-title" for="gs-buttons-position">Include Counter</label>
99
-
100
- <label>Yes</label>
101
-
102
- <input type="radio" value="Y" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'Y' || !get_option('gs-group-counter') ? 'checked="checked"' : '') ?> />
103
- <label>No</label>
104
- <input type="radio" value="N" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'N' ? 'checked="checked"' : '') ?> />
105
- </div>
106
- </div>
107
-
108
- <div class="half gs-clearfix">
109
- <div class="form-group">
110
- <label class="form-title" for="gs-buttons-position">Position on post</label>
111
-
112
- <label>Top</label>
113
- <input type="radio" value="1" name="gs-group-position" <?php echo (get_option('gs-group-position') == 1 ? 'checked="checked"' : '') ?> />
114
- <label>Bottom</label>
115
- <input type="radio" value="0" name="gs-group-position" <?php echo (get_option('gs-group-position') == 0 ? 'checked="checked"' : '') ?> />
116
- </div>
117
- </div>
118
-
119
- </div>
120
-
121
- <div class="cl"></div>
122
- </div>
123
- </div>
124
- <div class="postbox-container" style="width: 50%">
125
- <fieldset>
126
- <legend>Preview</legend>
127
- <div id="reaction-preview" class="native-buttons text-center clearfix">
128
- <div class="gs-group"></div>
129
- </div>
130
- </fieldset>
131
- </div>
132
-
133
- </div>
134
- </div>
135
-
136
- <div class="bar-active">
137
- <?php submit_button('Save Changes'); ?>
138
-
139
- <div class="cl"></div>
140
- </div>
141
-
142
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tmpl/social-bar.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h2><i class="fa fa-cog"></i>Social Bar</h2>
2
+
3
+ <form id="social-bar" method="post" action="options.php">
4
+ <?php settings_fields( 'getsocial-gs-group' ); ?>
5
+ <?php do_settings_sections( 'getsocial-gs-group' ); ?>
6
+
7
+ <div class="form-content editor-preview">
8
+ <div id="reaction-preview" class="native-buttons text-center clearfix">
9
+ <div class="gs-group"></div>
10
+ </div>
11
+ </div>
12
+
13
+ <div class="form-content">
14
+ <label class="control active">Active</label>
15
+ <div class="activate">
16
+ <input type="checkbox" name="gs-group-active" value="1" <?php echo (get_option('gs-group-active') == '1' ? 'checked' : '') ?>/>
17
+ </div>
18
+ </div>
19
+ <div class="form-content">
20
+ <label class="control">Social Networks</label>
21
+
22
+ <div class="networks with-inputs-label">
23
+ <?php
24
+ $social = array(
25
+ 'fb' => array('facebook', 'facebook'),
26
+ 'tw' => array('twitter', 'twitter'),
27
+ 'pn' => array('pinterest', 'pinterest'),
28
+ 'gp' => array('google', 'google-plus')
29
+ ); ?>
30
+
31
+ <?php foreach($social as $key => $value): ?>
32
+
33
+ <?php
34
+ $name = $value[0];
35
+ $icon = $value[1];
36
+ $option_value_exists = !get_option('gs-group-network-'.$key);
37
+ $option_value = get_option('gs-group-network-'.$key);
38
+ ?>
39
+
40
+ <input type="checkbox"
41
+ name="gs-group-network-<?php echo $key ?>"
42
+ id="gs-group-network-<?php echo $key ?>"
43
+ class="ntw group-network"
44
+ value="Y"
45
+ rel="<?php echo $key ?>"
46
+ <?php echo ($option_value == 'Y' || !$option_value_exists ? 'checked' : '') ?>/>
47
+
48
+ <label for="gs-group-network-<?php echo $key ?>" class="no-padding"><?php echo $name ?></label>
49
+
50
+ <?php endforeach; ?>
51
+
52
+ </div>
53
+ </div>
54
+
55
+ <div class="form-content">
56
+ <label class="control">Template</label>
57
+
58
+ <div class="templates">
59
+ <?php
60
+ $templates = array(
61
+ 'Square Rounded' => 'gs-template1',
62
+ 'Rounded' => 'gs-template2',
63
+ 'Special' => 'gs-template3',
64
+ 'Basic Grey' => 'gs-template4',
65
+ 'Basic Black' => 'gs-template5'
66
+ )
67
+ ?>
68
+
69
+ <select id="group_template" name="gs-group-template">
70
+ <?php foreach($templates as $name => $value): ?>
71
+ <option value="<?= $value ?>" <?= get_option('gs-group-template') == $value ? 'selected' : '' ?>><?= $name ?></option>
72
+ <?php endforeach; ?>
73
+ </select>
74
+ </div>
75
+ </div>
76
+
77
+ <div class="form-content">
78
+ <label class="control">Size</label>
79
+
80
+ <div class="sizes">
81
+ <?php
82
+ $sizes = array(
83
+ 'Small' => 'gs-small',
84
+ 'Medium' => 'gs-medium',
85
+ 'Large' => 'gs-large'
86
+ )
87
+ ?>
88
+ <select id="group_size" name="gs-group-size">
89
+ <?php foreach($sizes as $name => $value): ?>
90
+ <option value="<?php echo $value ?>" <?php echo get_option('gs-group-size') == $value || (!get_option('gs-group-size') && $value == 'gs-large') ? 'selected' : '' ?> ><?php echo $name ?></option>
91
+ <?php endforeach; ?>
92
+ </select>
93
+ </div>
94
+ </div>
95
+
96
+ <div class="form-content">
97
+ <label class="control">Counter</label>
98
+ <div class="counter with-inputs-label">
99
+
100
+ <input type="radio" value="Y" class="has_counter" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'Y' || !get_option('gs-group-counter') ? 'checked="checked"' : '') ?> />
101
+ <label>Yes</label>
102
+
103
+ <input type="radio" value="N" class="has_counter" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'N' ? 'checked="checked"' : '') ?> />
104
+ <label>No</label>
105
+
106
+ </div>
107
+ </div>
108
+
109
+ <div class="form-content">
110
+ <label class="control">Position</label>
111
+
112
+ <div class="position with-inputs-label">
113
+ <input type="radio" value="1" name="gs-group-position" <?php echo (get_option('gs-group-position') == 1 ? 'checked="checked"' : '') ?> />
114
+ <label>Top</label>
115
+
116
+ <input type="radio" value="0" name="gs-group-position" <?php echo (get_option('gs-group-position') == 0 ? 'checked="checked"' : '') ?> />
117
+ <label>Bottom</label>
118
+
119
+ <input type="radio" value="4" name="gs-group-position" <?php echo (get_option('gs-group-position') == 4 ? 'checked="checked"' : '') ?> />
120
+ <label>Top &amp; Bottom</label>
121
+ </div>
122
+
123
+ <!-- <label>Floating Right</label>
124
+ <input type="radio" value="2" name="gs-group-position" <?php echo (get_option('gs-group-position') == 2 ? 'checked="checked"' : '') ?> />
125
+ <label>Floating Left</label>
126
+ <input type="radio" value="3" name="gs-group-position" <?php echo (get_option('gs-group-position') == 3 ? 'checked="checked"' : '') ?> /> -->
127
+ </div>
128
+
129
+ <div class="bar-active">
130
+ <?php submit_button('Save Changes'); ?>
131
+
132
+ <div class="cl"></div>
133
+ </div>
134
+
135
+ </form>
tmpl/tabs.php CHANGED
@@ -1,6 +1,6 @@
1
  <h2 class="nav-tab-wrapper">
2
- <a href="admin.php?page=<? echo slug_path('init.php') ?>" class="nav-tab <?php echo !isset($_GET['tab']) ? 'nav-tab-active' : '' ?>">GetSocial Settings</a>
3
  <a href="admin.php?page=<? echo slug_path('init.php&tab=sharing-bar') ?>" class="nav-tab <?php echo $_GET['tab'] == 'sharing-bar' ? 'nav-tab-active' : '' ?>">Sharing Bar</a>
4
  <a href="admin.php?page=<? echo slug_path('init.php&tab=custom-expressions') ?>" class="nav-tab <?php echo $_GET['tab'] == 'custom-expressions' ? 'nav-tab-active' : '' ?>">Custom Actions</a>
5
- <a href="mailto:support@getsocial.io" class="nav-tab help">Can we help you?</a>
6
  </h2>
1
  <h2 class="nav-tab-wrapper">
2
+
3
  <a href="admin.php?page=<? echo slug_path('init.php&tab=sharing-bar') ?>" class="nav-tab <?php echo $_GET['tab'] == 'sharing-bar' ? 'nav-tab-active' : '' ?>">Sharing Bar</a>
4
  <a href="admin.php?page=<? echo slug_path('init.php&tab=custom-expressions') ?>" class="nav-tab <?php echo $_GET['tab'] == 'custom-expressions' ? 'nav-tab-active' : '' ?>">Custom Actions</a>
5
+
6
  </h2>
wp-share-buttons-analytics-getsocial.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Share Buttons & Analytics by GetSocial
4
  * Plugin URI: http://getsocial.io
5
  * Description: A brief description of the Plugin.
6
- * Version: 1.0
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: A "Slug" license name e.g. GPL2
@@ -12,6 +12,7 @@
12
  include('lib/gs.php');
13
 
14
  /* MENU */
 
15
  add_action( 'admin_menu', 'gs_getsocial_menu' );
16
 
17
  function gs_getsocial_menu(){
@@ -19,7 +20,7 @@ function gs_getsocial_menu(){
19
 
20
  $needs_update = $GS->needs_update() == '0' ? 'on' : 'off';
21
 
22
- add_menu_page( 'Getsocial', 'Getsocial', 'manage_options', slug_path('init.php'), '', plugins_url( 'images/'.$needs_update.'.png', __FILE__ ) );
23
  add_action( 'admin_init', 'register_gs_settings' );
24
  }
25
 
@@ -33,18 +34,21 @@ function register_gs_settings(){
33
  // register_setting( 'getsocial-gs-settings' , 'gs-buttons-position' );
34
  register_setting( 'getsocial-gs-settings' , 'gs-lang' );
35
 
36
- register_setting( 'getsocial-gs-group' , 'gs-group-active' );
37
- register_setting( 'getsocial-gs-group' , 'gs-group-network-fb' );
38
- register_setting( 'getsocial-gs-group' , 'gs-group-network-tw' );
39
- register_setting( 'getsocial-gs-group' , 'gs-group-network-pn' );
40
- register_setting( 'getsocial-gs-group' , 'gs-group-network-gp' );
41
- register_setting( 'getsocial-gs-group' , 'gs-group-template' );
42
- register_setting( 'getsocial-gs-group' , 'gs-group-size' );
43
- register_setting( 'getsocial-gs-group' , 'gs-group-counter' );
44
- register_setting( 'getsocial-gs-group' , 'gs-group-position' );
 
 
45
 
46
 
47
  register_setting( 'getsocial-gs-custom-expressions' , 'gs-custom-expression-active' );
 
48
  }
49
 
50
  function get_gs(){
@@ -61,14 +65,13 @@ function add_gs_lib(){
61
  echo $GS->getLib();
62
  }
63
 
64
- add_filter('the_content', 'add_gs_elements');
 
65
 
66
- function add_gs_elements($content) {
67
  if ( is_single() ):
68
  $GS = get_gs();
69
 
70
- // $elements = $GS->getElements();
71
-
72
  $groups_active = get_option('gs-group-active') == 1;
73
  $custom_active = get_option('gs-custom-expression-active') == 1;
74
  //
@@ -76,29 +79,39 @@ function add_gs_elements($content) {
76
  $buttons = "";
77
 
78
  $custom_content = $content;
79
-
80
  //
81
  if(!is_feed() && !is_home()):
82
- // exit($GS->getGroup());
83
  if($groups_active):
84
  $groups .= $GS->getGroup();
85
 
86
  $position = get_option('gs-group-position');
87
 
88
- if($position == 0):
89
- $custom_content = $content.$groups;
 
 
 
 
 
 
90
  else:
91
- $custom_content = $groups.'<br/>'.$content;
92
  endif;
93
  endif;
94
 
95
-
96
  if($custom_active):
97
  foreach($GS->getElements() as $id => $action):
98
  $buttons .= $GS->getButton($id, $action);
99
  endforeach;
100
 
101
- $custom_content = $custom_content.$buttons;
 
 
 
 
 
 
102
  endif;
103
  endif;
104
 
@@ -109,3 +122,16 @@ function add_gs_elements($content) {
109
  return $content;
110
  endif;
111
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Plugin Name: WP Share Buttons & Analytics by GetSocial
4
  * Plugin URI: http://getsocial.io
5
  * Description: A brief description of the Plugin.
6
+ * Version: 1.1
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: A "Slug" license name e.g. GPL2
12
  include('lib/gs.php');
13
 
14
  /* MENU */
15
+
16
  add_action( 'admin_menu', 'gs_getsocial_menu' );
17
 
18
  function gs_getsocial_menu(){
20
 
21
  $needs_update = $GS->needs_update() == '0' ? 'on' : 'off';
22
 
23
+ add_menu_page( 'GetSocial', 'GetSocial', 'manage_options', slug_path('init.php'), '', plugins_url( 'images/on.png', __FILE__ ) );
24
  add_action( 'admin_init', 'register_gs_settings' );
25
  }
26
 
34
  // register_setting( 'getsocial-gs-settings' , 'gs-buttons-position' );
35
  register_setting( 'getsocial-gs-settings' , 'gs-lang' );
36
 
37
+ foreach(array('group', 'floating') as $app):
38
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-active' );
39
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-fb' );
40
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-tw' );
41
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-pn' );
42
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-gp' );
43
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-template' );
44
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-size' );
45
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-counter' );
46
+ register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-position' );
47
+ endforeach;
48
 
49
 
50
  register_setting( 'getsocial-gs-custom-expressions' , 'gs-custom-expression-active' );
51
+ register_setting( 'getsocial-gs-custom-expressions' , 'gs-custom-expression-position' );
52
  }
53
 
54
  function get_gs(){
65
  echo $GS->getLib();
66
  }
67
 
68
+ add_filter('the_content', 'on_content');
69
+ add_action('wp_footer', 'on_all_site');
70
 
71
+ function on_content($content) {
72
  if ( is_single() ):
73
  $GS = get_gs();
74
 
 
 
75
  $groups_active = get_option('gs-group-active') == 1;
76
  $custom_active = get_option('gs-custom-expression-active') == 1;
77
  //
79
  $buttons = "";
80
 
81
  $custom_content = $content;
82
+
83
  //
84
  if(!is_feed() && !is_home()):
 
85
  if($groups_active):
86
  $groups .= $GS->getGroup();
87
 
88
  $position = get_option('gs-group-position');
89
 
90
+ if($position != 2 || $position != 3 ):
91
+ if($position == 0 ):
92
+ $custom_content = $custom_content.$groups;
93
+ elseif ( $position == 1 ):
94
+ $custom_content = $groups.'<br/>'.$custom_content;
95
+ elseif ( $position == 4 ):
96
+ $custom_content = $groups.'<br/>'.$custom_content.$groups;
97
+ endif;
98
  else:
99
+ $custom_content = $groups.$content;
100
  endif;
101
  endif;
102
 
 
103
  if($custom_active):
104
  foreach($GS->getElements() as $id => $action):
105
  $buttons .= $GS->getButton($id, $action);
106
  endforeach;
107
 
108
+ $position = get_option('gs-custom-expression-position');
109
+
110
+ if($position == 0):
111
+ $custom_content = $custom_content.$buttons;
112
+ else:
113
+ $custom_content = $buttons.'<br/>'.$custom_content;
114
+ endif;
115
  endif;
116
  endif;
117
 
122
  return $content;
123
  endif;
124
  }
125
+
126
+ function on_all_site(){
127
+ $GS = get_gs();
128
+
129
+ $floating_active = get_option('gs-floating-active') == 1;
130
+ $floatingbar = "";
131
+
132
+ if($floating_active):
133
+ $floatingbar .= $GS->getFloatingBar();
134
+ endif;
135
+
136
+ echo $floatingbar;
137
+ }