Social Media Share Buttons - Version 0.0.1

Version Description

Download this release

Release Info

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

Version 0.0.1

css/getsocial-style.css ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .gs-clearfix:after{
2
+ content: '';
3
+ display: table;
4
+ clear: both;
5
+ }
6
+
7
+ header {
8
+ background: #49bdef;
9
+ padding-left: 20px;
10
+ margin: 0 0 -5px -20px;
11
+ position: relative;
12
+ }
13
+
14
+ header h1, header h2 {
15
+ float: left;
16
+ }
17
+
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 {
39
+ width: 49%;
40
+ float: left;
41
+ }
42
+
43
+
44
+ #group-builder {
45
+ background: white;
46
+ height: 290px;
47
+ padding: 18px;
48
+ }
49
+ /* ======================================================================================== CTA & NOTIFICATIONS */
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;
70
+ border-radius: 3px;
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;
82
+ }
83
+ .red-cta a:focus, .red-cta a:hover{
84
+ background: #d63d38;
85
+ }
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;
93
+ }
94
+ .yellow-cta a:focus, .yellow-cta a:hover{
95
+ background: #d19726;
96
+ }
97
+ /* blue */
98
+ .blue-cta{
99
+ background: #2ea2cc;
100
+ text-shadow: 0px -1px 0px #2789ad;
101
+ }
102
+
103
+ .blue-cta:hover {
104
+ background: #2f89bd;
105
+ color: white
106
+ }
107
+
108
+ .blue-cta a, .blue-cta a:visited{
109
+ background: #1a5d76;
110
+ }
111
+
112
+ .blue-cta a:focus, .blue-cta a:hover{
113
+ background: #227ea1;
114
+ }
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;
122
+ }
123
+ .green-cta a:focus, .green-cta a:hover{
124
+ background: #237BA0;
125
+ }
126
+
127
+ .cta.big {
128
+ font-size:
129
+ }
130
+
131
+
132
+ /* ======================================================================================== INFO */
133
+
134
+
135
+ .intro{
136
+ margin: 20px 0 20px;
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
+
279
+ /* ======================================================================================== MEDIA QUERIES */
280
+
281
+
282
+ @media (max-width: 1000px){
283
+ .notification-bar p{
284
+ display: block;
285
+ }
286
+ .notification-bar a{
287
+ margin-top: 10px;
288
+ float: none;
289
+ display: inline-block;
290
+ }
291
+ }
292
+ @media (max-width: 800px){
293
+ #api-key-field{
294
+ padding-right: 0;
295
+ }
296
+ #save-api{
297
+ float: none;
298
+ margin-top: 10px;
299
+ }
300
+ }
301
+ @media (max-width: 600px){
302
+ .notification-bar a, .notification-bar p{
303
+ display: block;
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
+ }
css/group-buttons.css ADDED
@@ -0,0 +1 @@
 
1
+ .gs-group *{font-family:Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font-size:100%;display:inline-block;line-height:initial;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.gs-group>div:after{height:0;content:"";clear:both}.gs-group a{margin-right:5px;overflow:hidden}.gs-group a i{background:url("https://s3.amazonaws.com/getsocial-smb/uploads/icons/social/icons_white.png")}.gs-group a i+span{position:absolute;left:-99999px}.gs-group a+.gs-counter{min-width:10px;text-align:center;position:relative}.gs-group a+.gs-counter:before,.gs-group a+.gs-counter:after{width:0;height:0;border-style:solid;content:"";position:absolute;top:50%}.gs-group a,.gs-group a+.gs-counter{float:left}.gs-group.gs-small a+.gs-counter:before{border-width:6px 6px 6px 0;left:-6px;margin-top:-6px}.gs-group.gs-small a+.gs-counter:after{border-width:5px 5px 5px 0;left:-5px;margin-top:-5px}.gs-group.gs-medium a+.gs-counter:before{border-width:6px 6px 6px 0;left:-6px;margin-top:-6px}.gs-group.gs-medium a+.gs-counter:after{border-width:5px 5px 5px 0;left:-5px;margin-top:-5px}.gs-group.gs-large a+.gs-counter:before{border-width:7px 7px 7px 0;left:-7px;margin-top:-7px}.gs-group.gs-large a+.gs-counter:after{border-width:6px 6px 6px 0;left:-6px;margin-top:-6px}.gs-group.gs-template1.gs-small a{padding:2px 4px 1px}.gs-group.gs-template1.gs-small a+.gs-counter{min-width:20px;padding:1px}.gs-group.gs-template1.gs-small a i{background-size:auto 12px;width:12px;height:12px}.gs-group.gs-template1.gs-small a i,.gs-group.gs-template1.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template1.gs-medium a{padding:4px 4px 1px}.gs-group.gs-template1.gs-medium a+.gs-counter{min-width:26px;padding:3px}.gs-group.gs-template1.gs-medium a i{background-size:auto 18px;width:18px;height:18px;margin-bottom:-1px}.gs-group.gs-template1.gs-medium a i,.gs-group.gs-template1.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template1.gs-large a{padding:4px 4px 3px}.gs-group.gs-template1.gs-large a+.gs-counter{min-width:32px;padding:6px 5px 4px}.gs-group.gs-template1.gs-large a i{background-size:auto 24px;width:24px;height:24px;margin-bottom:-3px}.gs-group.gs-template1.gs-large a i,.gs-group.gs-template1.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template1.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template1.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template1.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template1.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template1.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template1.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template1.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template1.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template1.gs-large a.fb i{background-position:-24px 0}.gs-group.gs-template1.gs-large a.tw i{background-position:-72px 0}.gs-group.gs-template1.gs-large a.pn i{background-position:-120px 0}.gs-group.gs-template1.gs-large a.gp i{background-position:-168px 0}.gs-group.gs-template1 a{color:#fff;border-radius:4px}.gs-group.gs-template1 a+.gs-counter{border:2px solid transparent;border-radius:4px;margin:0 10px 0 2px !important}.gs-group.gs-template1 a.fb{background:#3B5998}.gs-group.gs-template1 a.fb+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.fb+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.fb:hover,.gs-group.gs-template1 a.fb:focus{background:#344e86}.gs-group.gs-template1 a.tw{background:#00ACED}.gs-group.gs-template1 a.tw+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.tw+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.tw:hover,.gs-group.gs-template1 a.tw:focus{background:#0099d3}.gs-group.gs-template1 a.pn{background:#CC2127}.gs-group.gs-template1 a.pn+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.pn+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.pn:hover,.gs-group.gs-template1 a.pn:focus{background:#b61d23}.gs-group.gs-template1 a.gp{background:#CC3732}.gs-group.gs-template1 a.gp+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.gp+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.gp:hover,.gs-group.gs-template1 a.gp:focus{background:#b8312d}.gs-group.gs-template2.gs-small a{padding:1px 4px}.gs-group.gs-template2.gs-small a+.gs-counter{min-width:20px;padding:4px 4px 3px}.gs-group.gs-template2.gs-small a i{background-size:auto 12px;width:12px;height:12px;margin-bottom:-1px;position:relative;z-index:1}.gs-group.gs-template2.gs-small a i,.gs-group.gs-template2.gs-small a+.gs-counter{font-size:11px;font-weight:bold}.gs-group.gs-template2.gs-medium a{padding:5px 5px 1px}.gs-group.gs-template2.gs-medium a+.gs-counter{min-width:26px;padding:5px 6px 6px}.gs-group.gs-template2.gs-medium a i{background-size:auto 16px;width:16px;height:16px;position:relative;z-index:1}.gs-group.gs-template2.gs-medium a i,.gs-group.gs-template2.gs-medium a+.gs-counter{font-size:13px;font-weight:bold}.gs-group.gs-template2.gs-large a{padding:5px 5px 1px}.gs-group.gs-template2.gs-large a+.gs-counter{min-width:32px;padding:8px}.gs-group.gs-template2.gs-large a i{background-size:auto 22px;width:22px;height:22px;position:relative;z-index:1}.gs-group.gs-template2.gs-large a i,.gs-group.gs-template2.gs-large a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template2.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template2.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template2.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template2.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template2.gs-medium a.fb i{background-position:-16px 0}.gs-group.gs-template2.gs-medium a.tw i{background-position:-48px 0}.gs-group.gs-template2.gs-medium a.pn i{background-position:-80px 0}.gs-group.gs-template2.gs-medium a.gp i{background-position:-112px 0}.gs-group.gs-template2.gs-large a.fb i{background-position:-22px 0}.gs-group.gs-template2.gs-large a.tw i{background-position:-66px 0}.gs-group.gs-template2.gs-large a.pn i{background-position:-110px 0}.gs-group.gs-template2.gs-large a.gp i{background-position:-154px 0}.gs-group.gs-template2>div{margin-right:5px;border-radius:100px;overflow:hidden}.gs-group.gs-template2 a{color:#fff;margin-right:0}.gs-group.gs-template2 a+.gs-counter{border:0 solid transparent;border-radius:100px;margin:0 !important;pointer-events:none}.gs-group.gs-template2 a.fb{background:#3B5998}.gs-group.gs-template2 a.fb+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #3B5998}.gs-group.gs-template2 a.fb+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.fb:hover,.gs-group.gs-template2 a.fb:focus{background:#344e86}.gs-group.gs-template2 a.tw{background:#00ACED}.gs-group.gs-template2 a.tw+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #00ACED}.gs-group.gs-template2 a.tw+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.tw:hover,.gs-group.gs-template2 a.tw:focus{background:#0099d3}.gs-group.gs-template2 a.pn{background:#CC2127}.gs-group.gs-template2 a.pn+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #CC2127}.gs-group.gs-template2 a.pn+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.pn:hover,.gs-group.gs-template2 a.pn:focus{background:#b61d23}.gs-group.gs-template2 a.gp{background:#CC3732}.gs-group.gs-template2 a.gp+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #CC3732}.gs-group.gs-template2 a.gp+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.gp:hover,.gs-group.gs-template2 a.gp:focus{background:#b8312d}.gs-group.gs-template3.gs-small a{padding:2px 30px 0 3px}.gs-group.gs-template3.gs-small a+.gs-counter{min-width:20px;padding:1px 0 1px 1px}.gs-group.gs-template3.gs-small a i{background-size:auto 13px;width:13px;height:13px}.gs-group.gs-template3.gs-small a i,.gs-group.gs-template3.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template3.gs-medium a{padding:4px 3px 2px}.gs-group.gs-template3.gs-medium a+.gs-counter{min-width:26px;padding:2px 2px 1px}.gs-group.gs-template3.gs-medium a i{background-size:auto 18px;width:18px;height:18px;margin-bottom:-2px}.gs-group.gs-template3.gs-medium a i,.gs-group.gs-template3.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template3.gs-large a{padding:5px 4px 1px}.gs-group.gs-template3.gs-large a+.gs-counter{min-width:32px;padding:5px}.gs-group.gs-template3.gs-large a i{background-size:auto 22px;width:22px;height:22px}.gs-group.gs-template3.gs-large a i,.gs-group.gs-template3.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template3.gs-small a.fb i{background-position:-13px 0}.gs-group.gs-template3.gs-small a.tw i{background-position:-39px 0}.gs-group.gs-template3.gs-small a.pn i{background-position:-65px 0}.gs-group.gs-template3.gs-small a.gp i{background-position:-91px 0}.gs-group.gs-template3.gs-small>div{min-width:20px;height:20px;padding:0 2px 0 18px}.gs-group.gs-template3.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template3.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template3.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template3.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template3.gs-medium>div{min-width:26px;height:26px;padding:0 2px 0 24px}.gs-group.gs-template3.gs-large a.fb i{background-position:-22px 0}.gs-group.gs-template3.gs-large a.tw i{background-position:-66px 0}.gs-group.gs-template3.gs-large a.pn i{background-position:-110px 0}.gs-group.gs-template3.gs-large a.gp i{background-position:-154px 0}.gs-group.gs-template3.gs-large>div{min-width:32px;height:32px;padding:0 2px 0 30px}.gs-group.gs-template3>div{margin-right:5px;position:relative;overflow:hidden}.gs-group.gs-template3 a{width:100%;color:#fff;text-align:left;margin-right:0;position:absolute;top:0;left:0}.gs-group.gs-template3 a+.gs-counter{border:2px solid transparent;margin:0 !important;pointer-events:none}.gs-group.gs-template3 a.fb{background:#3B5998;background:-moz-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #3B5998), color-stop(100%, #5476bd));background:-webkit-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:-o-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:-ms-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:linear-gradient(to bottom, #3B5998 0%, #5476bd 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.fb+.gs-counter{color:#fff}.gs-group.gs-template3 a.fb+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.fb:hover,.gs-group.gs-template3 a.fb:focus{background:#2d4373}.gs-group.gs-template3 a.tw{background:#00ACED;background:-moz-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #00ACED), color-stop(100%, #2bc5ff));background:-webkit-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:-o-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:-ms-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:linear-gradient(to bottom, #00ACED 0%, #2bc5ff 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.tw+.gs-counter{color:#fff}.gs-group.gs-template3 a.tw+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.tw:hover,.gs-group.gs-template3 a.tw:focus{background:#0087ba}.gs-group.gs-template3 a.pn{background:#CC2127;background:-moz-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #CC2127), color-stop(100%, #e2494e));background:-webkit-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:-o-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:-ms-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:linear-gradient(to bottom, #CC2127 0%, #e2494e 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.pn+.gs-counter{color:#fff}.gs-group.gs-template3 a.pn+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.pn:hover,.gs-group.gs-template3 a.pn:focus{background:#a01a1f}.gs-group.gs-template3 a.gp{background:#CC3732;background:-moz-linear-gradient(top, #CC3732 0%, #d96663 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #CC3732), color-stop(100%, #d96663));background:-webkit-linear-gradient(top, #CC3732 0%, #d96663 100%);background:-o-linear-gradient(top, #CC3732 0%, #d96663 100%);background:-ms-linear-gradient(top, #CC3732 0%, #d96663 100%);background:linear-gradient(to bottom, #CC3732 0%, #d96663 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.gp+.gs-counter{color:#fff}.gs-group.gs-template3 a.gp+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.gp:hover,.gs-group.gs-template3 a.gp:focus{background:#a32c28}.gs-group.gs-template4.gs-small a{padding:2px 4px 0px}.gs-group.gs-template4.gs-small a+.gs-counter{min-width:20px;padding:1px}.gs-group.gs-template4.gs-small a i{background-size:auto 12px;width:12px;height:12px}.gs-group.gs-template4.gs-small a i,.gs-group.gs-template4.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template4.gs-medium a{padding:4px 4px 0}.gs-group.gs-template4.gs-medium a+.gs-counter{min-width:26px;padding:3px}.gs-group.gs-template4.gs-medium a i{background-size:auto 18px;width:18px;height:18px}.gs-group.gs-template4.gs-medium a i,.gs-group.gs-template4.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template4.gs-large a{padding:4px 4px 3px}.gs-group.gs-template4.gs-large a+.gs-counter{min-width:32px;padding:6px 5px 4px}.gs-group.gs-template4.gs-large a i{background-size:auto 24px;width:24px;height:24px;margin-bottom:-3px}.gs-group.gs-template4.gs-large a i,.gs-group.gs-template4.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template4.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template4.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template4.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template4.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template4.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template4.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template4.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template4.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template4.gs-large a.fb i{background-position:-24px 0}.gs-group.gs-template4.gs-large a.tw i{background-position:-72px 0}.gs-group.gs-template4.gs-large a.pn i{background-position:-120px 0}.gs-group.gs-template4.gs-large a.gp i{background-position:-168px 0}.gs-group.gs-template4 a{color:#fff;background:#aaa}.gs-group.gs-template4 a+.gs-counter{border:2px solid transparent;margin:0 10px 0 2px !important}.gs-group.gs-template4 a.fb+.gs-counter{color:#999}.gs-group.gs-template4 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.fb+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.fb:hover,.gs-group.gs-template4 a.fb:focus{background:#344e86}.gs-group.gs-template4 a.tw+.gs-counter{color:#999}.gs-group.gs-template4 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.tw+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.tw:hover,.gs-group.gs-template4 a.tw:focus{background:#0099d3}.gs-group.gs-template4 a.pn+.gs-counter{color:#999}.gs-group.gs-template4 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.pn+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.pn:hover,.gs-group.gs-template4 a.pn:focus{background:#b61d23}.gs-group.gs-template4 a.gp+.gs-counter{color:#999}.gs-group.gs-template4 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.gp+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.gp:hover,.gs-group.gs-template4 a.gp:focus{background:#b8312d}.gs-group.gs-template5.gs-small a{padding:2px 4px 0px}.gs-group.gs-template5.gs-small a+.gs-counter{min-width:20px;padding:1px}.gs-group.gs-template5.gs-small a i{background-size:auto 12px;width:12px;height:12px}.gs-group.gs-template5.gs-small a i,.gs-group.gs-template5.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template5.gs-medium a{padding:4px 4px 0}.gs-group.gs-template5.gs-medium a+.gs-counter{min-width:26px;padding:3px}.gs-group.gs-template5.gs-medium a i{background-size:auto 18px;width:18px;height:18px}.gs-group.gs-template5.gs-medium a i,.gs-group.gs-template5.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template5.gs-large a{padding:4px 4px 3px}.gs-group.gs-template5.gs-large a+.gs-counter{min-width:32px;padding:6px 5px 4px}.gs-group.gs-template5.gs-large a i{background-size:auto 24px;width:24px;height:24px;margin-bottom:-3px}.gs-group.gs-template5.gs-large a i,.gs-group.gs-template5.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template5.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template5.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template5.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template5.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template5.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template5.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template5.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template5.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template5.gs-large a.fb i{background-position:-24px 0}.gs-group.gs-template5.gs-large a.tw i{background-position:-72px 0}.gs-group.gs-template5.gs-large a.pn i{background-position:-120px 0}.gs-group.gs-template5.gs-large a.gp i{background-position:-168px 0}.gs-group.gs-template5 a{color:#fff;background:#000}.gs-group.gs-template5 a+.gs-counter{border:2px solid transparent;margin:0 10px 0 2px !important}.gs-group.gs-template5 a.fb+.gs-counter{color:#999}.gs-group.gs-template5 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.fb+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.fb:hover,.gs-group.gs-template5 a.fb:focus{background:#344e86}.gs-group.gs-template5 a.tw+.gs-counter{color:#999}.gs-group.gs-template5 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.tw+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.tw:hover,.gs-group.gs-template5 a.tw:focus{background:#0099d3}.gs-group.gs-template5 a.pn+.gs-counter{color:#999}.gs-group.gs-template5 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.pn+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.pn:hover,.gs-group.gs-template5 a.pn:focus{background:#b61d23}.gs-group.gs-template5 a.gp+.gs-counter{color:#999}.gs-group.gs-template5 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.gp+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.gp:hover,.gs-group.gs-template5 a.gp:focus{background:#b8312d}
css/jquery.onoff.css ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/bottom.png ADDED
Binary file
images/done.png ADDED
Binary file
images/logo.png ADDED
Binary file
images/off.png ADDED
Binary file
images/on.png ADDED
Binary file
images/top.png ADDED
Binary file
init.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <? include('tmpl/header.php'); ?>
2
+ <? include('tmpl/alerts.php'); ?>
3
+
4
+ <div class="wrap">
5
+ <?php if( isset($_GET['settings-updated']) && $_GET['settings-updated'] == true): ?>
6
+ <div id="message" class="updated below-h2">
7
+ <p>Preferences updated with success</p>
8
+ </div>
9
+ <?php endif; ?>
10
+
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>
js/builder.js ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var groupBuilder = {
2
+
3
+ updateCode: function(options){
4
+ var code_template = '&lt;div class="gs-group"\n \t\tdata-template="TEMPLATE:SIZE"\n \t\tdata-networks="NETWORKS"\n \t\tdata-counter="COUNTER"\n \t\tdata-url="[URL_TO_SHARE]">&lt;/div>';
5
+
6
+ code_template = code_template.replace('TEMPLATE', options.template);
7
+ code_template = code_template.replace('NETWORKS', options.networks);
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){
15
+ var template = options.template,
16
+ size = options.size,
17
+ networks = options.networks,
18
+ has_counter = options.counter,
19
+ has_counter = has_counter == '' || has_counter == 'false' ? 0 : 1,
20
+ $elem = jQuery('#reaction-preview .gs-group');
21
+
22
+ $elem.html('');
23
+
24
+ if($elem.attr('class').match(/gs-template\d/) != null) {
25
+ template_to_remove = $elem.attr('class').match(/gs-template\d/)[0]
26
+ $elem.removeClass(template_to_remove);
27
+ }
28
+
29
+ $elem.addClass(template);
30
+ $elem.removeClass('gs-small gs-medium gs-large').addClass(size);
31
+
32
+ jQuery.each(networks.split(','), function(i,netw){
33
+ if(netw == ''){ return; }
34
+
35
+ providers = {
36
+ 'fb': ['facebook', 'share', false],
37
+ 'tw': ['twitter', 'tweet', true],
38
+ 'pn': ['pinterest', 'pin', true],
39
+ 'gp': ['google-plus', 'share', true]
40
+ }
41
+
42
+ d = document.createElement('div');
43
+ b = document.createElement('a');
44
+ i = document.createElement('i');
45
+
46
+ pre_tracking = providers[netw][2];
47
+ provider = providers[netw][0];
48
+ paction = providers[netw][1];
49
+
50
+ b.setAttribute('class', netw+' gs-tracking '+'gs-'+provider+'-'+paction+' '+(pre_tracking ? '' : 'gs-post-tracking'));
51
+ b.setAttribute('data-provider', provider);
52
+ b.setAttribute('data-action', paction);
53
+ b.setAttribute('href', '#');
54
+
55
+ b.innerHTML = i.outerHTML+'<span>'+provider+'</span>';
56
+
57
+ d.innerHTML = b.outerHTML;
58
+
59
+ if(has_counter){
60
+ counter = document.createElement('span');
61
+ counter.setAttribute('class', 'gs-counter');
62
+ counter.innerHTML = parseInt(Math.random()*100);
63
+
64
+ d.innerHTML += counter.outerHTML;
65
+ }
66
+
67
+ $elem.append(d);
68
+ });
69
+
70
+ },
71
+
72
+ refresh: function(){
73
+ // var $form = jQuery('#group-builder'),
74
+ options = {
75
+ template: jQuery('#group_template').val(),
76
+ networks: jQuery.map(jQuery('.group-network'), function(val, i){
77
+ if(jQuery(val).is(':checked')){
78
+ return jQuery(val).attr('rel');
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);
86
+ this.updateCode(options);
87
+ }
88
+
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
+
101
+ jQuery('input.ntw').on('change', function(event){
102
+ groupBuilder.refresh();
103
+ });
104
+ }
105
+
106
+
107
+ });
js/jquery.onoff.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
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 ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ jQuery(function($) {
2
+ $('input.onoff[type="checkbox"]').onoff();
3
+ });
lib/gs.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class GS {
4
+ private $gs_url = "http://api.at.getsocial.io/";
5
+ private $api_url = "http://getsocial.io/api/v1/";
6
+
7
+ function __construct($api_key, $identifier, $elements, $lang){
8
+ $this->api_key = $api_key;
9
+ $this->identifier = $identifier;
10
+ $this->elements = $elements;
11
+ $this->lang = $lang == null ? 'en' : $lang;
12
+ }
13
+
14
+ private function api($path) {
15
+ try {
16
+ $r = wp_remote_get($this->api_url.$path, array());
17
+
18
+ if(is_wp_error($r)):
19
+ return null;
20
+ endif;
21
+
22
+ if ($r['response']['code'] == 200) {
23
+ return json_decode($r['body']);
24
+ } else {
25
+ return null;
26
+ }
27
+ } catch (HttpException $ex) {
28
+ echo "Error: ".$ex;
29
+ }
30
+ }
31
+
32
+ function getElements(){
33
+ return json_decode($this->elements,true);
34
+ }
35
+
36
+ function hasElements(){
37
+ return count($this->getElements()) > 0;
38
+ }
39
+
40
+ function getSite(){
41
+ if($this->api_key != ''):
42
+ return $this->api('sites/'.$this->api_key);
43
+ else:
44
+ return '3';
45
+ endif;
46
+ }
47
+
48
+ function refreshSite(){
49
+ $site = $this->getSite();
50
+ if($site != null):
51
+ $this->save($site);
52
+ update_option('gs-needs-update', 0);
53
+ endif;
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
+ }
60
+
61
+ function needs_update(){
62
+ // if(get_option('gs-needs-update') == '1'):
63
+ // return true;
64
+ // endif;
65
+
66
+ $site = $this->getSite();
67
+
68
+ $needs_update = $site == null ? '2' : $site == '3' ? '3' : '0';
69
+
70
+ if($site != null && $needs_update != '3'):
71
+ $needs_update = (json_encode($site->elements) != get_option('gs-elements')) ? '1' : '0';
72
+
73
+ update_option('gs-needs-update', $needs_update);
74
+ endif;
75
+
76
+ return $needs_update;
77
+ }
78
+
79
+ function getLib(){
80
+ $code = <<<EOF
81
+ <script type="text/javascript">
82
+ var GETSOCIAL_ID = "$this->identifier";
83
+ var GETSOCIAL_LANG = "$this->lang";
84
+ (function() {
85
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
86
+ po.src = '$this->gs_url/widget/v1/gs_async.js?id='+GETSOCIAL_ID;
87
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
88
+ })();
89
+ </script>
90
+ EOF;
91
+ return $code;
92
+ }
93
+
94
+ function getButton($identifier, $action){
95
+ global $post;
96
+
97
+ $permalink = esc_url( get_permalink() );
98
+ $title = esc_html( get_the_title() );
99
+ $image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
100
+
101
+ $code = <<<EOF
102
+ <div class="getsocial gs-expression gs-$identifier"
103
+ data-action="$action"
104
+ data-identifier="$identifier"
105
+ data-url="$permalink"
106
+ data-image="$image"
107
+ data-title="$title">
108
+ </div>
109
+ EOF;
110
+ return $code;
111
+ }
112
+
113
+ function getGroup(){
114
+ $permalink = esc_url( get_permalink() );
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');
121
+ $ntw_pn = get_option('gs-group-network-pn');
122
+ $ntw_gp = get_option('gs-group-network-gp');
123
+
124
+ $networks = '';
125
+ $networks_available = array('fb', 'tw', 'pn', 'gp');
126
+ foreach($networks_available as $nw):
127
+ if(get_option('gs-group-network-'.$nw) == 'Y'):
128
+ $networks .= ( $networks == '' ? $nw : ','.$nw);
129
+ endif;
130
+ endforeach;
131
+
132
+ $code = <<<EOF
133
+ <div class="gs-group"
134
+ data-template="$template:$size"
135
+ data-networks="$networks"
136
+ data-counter="$counter"
137
+ data-url="$permalink"></div>
138
+ EOF;
139
+
140
+ return $code;
141
+
142
+ }
143
+
144
+ }
readme.txt ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WP Share Buttons & Analytics by GetSocial ===
2
+ 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: 0.0.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Add social media share buttons, track sharing activity from main networks, increase traffic, improve SEO and understand conversions.
12
+
13
+ == Description ==
14
+ <b>WP Share Buttons & Analytics</b> by GetSocial is a free WordPress plugin that enables social sharing on your WordPress site. Not only it allows your visitors to share but also tracks how many shares they’re making and how those shares are generating traffic and conversions to your website. It works with main social networks.
15
+
16
+ <h4>Benefits for your WordPress Site (know more in [Why GetSocial](http://getsocial.io/why-getsocial "Why GetSocial”)):</h4>
17
+
18
+
19
+ <h4>(1) Enable Social Sharing and Increase your SEO ranking</h4>
20
+
21
+ <b>Custom Action Buttons</b>: Create your own sharing buttons, with a customized colorset and the label that fits your needs.
22
+
23
+ <b>Social Sharing Bar</b>: Define which social networks you want your users to share your content and start understanding their behavior.
24
+
25
+ <b>Classic Share Buttons</b>: Upgrade your existing social buttons with a simple snippet that will help you identify your traffic.
26
+
27
+
28
+ <h4>(2) Collect user data through your share buttons</h4>
29
+
30
+ <b>Users Analytics</b>: Get user data such as name, gender, location, and contact information and see how many visits, pageviews, and actions they have made.
31
+
32
+ <b>Posts Analytics</b>: See how many unique visitors, page views, and shares have taken place in each item.
33
+
34
+ <b>Shares Analytics</b>: Understand which social sharing buttons are the most popular and how many leads they are generating.
35
+
36
+
37
+ <h4>(3) Analyze your data: identify opportunities, influencers and conversions</h4>
38
+
39
+ <b>Opportunities</b>: Find out who is most active on each of your product pages and then contact them directly to close the sale.
40
+
41
+ <b>Influencers</b>: See who is your most influential user and how many leads and conversions they generate for your page.
42
+
43
+ <b>Conversions</b>: Identify which users, products, and sharing buttons are most effective for increasing conversions through social sharing.
44
+
45
+
46
+ <h4>(4) Engage: Export the data you collected and use it with your current marketing tools</h4>
47
+
48
+ A <b>comprehensive list of features</b> can be visited our [Feature List](http://getsocial.io/features “Features”) and if you need any help just [Contact us](http://getsocial.io/contacts/stay-in-touch “Contact us”)
49
+
50
+ == Installation ==
51
+
52
+ 1. Extract 'WP-Share-Buttons-Analytics-getsocial.zip' into your WordPress plugins folder.
53
+ 2. Activate the plugin through the 'Plugins' menu in WordPress.
54
+ 3. Access GetSocial on the left navigation column
55
+ 4. Create a GetSocial account or login into your existing account.
56
+ 5. Copy your GetSocial API key and paste into the GetSocial settings page in WordPress
57
+ 6. Select the desired positioning of your new sharing buttons
58
+ 7. Done!
59
+
60
+ <h4>If to want to see the social sharing analytics for your site just go to your [GetSocial account](http://www.getsocial.io)</h4>
61
+
62
+ == Frequently Asked Questions ==
63
+
64
+ <h4> What is a custom action button? </h4>
65
+ Custom action buttons are elements placed in your website that, when clicked, will create and automatically post contextualized facebook stories in your users timelines.
66
+
67
+ <h4> Which data will I get from your analytics? </h4>
68
+ You'll have access to data regarding users, visits, shares and items (this can be products, news articles, blog posts, etc). You can even download the whole data set generated by GetSocial.
69
+
70
+ <h4> What is social influence analysis?</h4>
71
+ Our influence analysis allows our customers to understand how their website is being impacted per user, per item or per share. This means that it's simple to know, for instance, which user brought more new users into your website, which item brought in more pageviews or which share type generated more unique visitors
72
+
73
+ <h4> Why should I use these buttons instead of facebook buttons? </h4>
74
+ Today, facebook buttons are buttons with counters. The data and value you get from them are purely shares. However, you don’t know who’s sharing, what’s their behavior, you just know that 231 people shared something. GetSocial enables your users to express themselves in a unique way (defined by you) in a cramped sharing market and provides you an easy way to create and deploy your own buttons as well as social analytics that give you new info about your business.
75
+
76
+ == Screenshots ==
77
+
78
+ 1. Sharing Buttons
79
+ 2. Custom Actions Creation
80
+ 3. Sharing Dashboard
81
+ 4. User Analytics
82
+ 5. Post Analytics
83
+ 6. Sharing Analytics
84
+
85
+ == Changelog ==
86
+ 0.0.1 - First release
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
screenshot-6.png ADDED
Binary file
tmpl/alerts.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php if($needs_update == '2'): ?>
2
+ <div class="notification-bar red-cta">
3
+ <p>Having some problems getting an answer from Getsocial... Could you try later?</p>
4
+ </div>
5
+ <?php elseif($needs_update == '1'): ?>
6
+ <div class="notification-bar green-cta">
7
+ <p>Changes have been made to your custom action buttons. Please update your changes here!</p>
8
+ <a href="<?= $actual_link ?>&refresh=1">Update now!</a>
9
+ </div>
10
+ <?php endif; ?>
tmpl/custom-expressions.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $has_custom_social_actions = !(get_option('gs-api-key') != '' && get_option('gs-elements') == '{}' );
3
+ if(!$has_custom_social_actions): ?>
4
+ <div class="notification-bar blue-cta">
5
+ <p>You haven’t created any social action yet. Create your first action button now.</p>
6
+ <a href="http://getsocial.io" target="_blank">Create Social Actions</a>
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
+ <? 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
+ <? endif; ?>
tmpl/groups.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 = [
25
+ 'fb' => ['facebook', 'facebook'],
26
+ 'tw' => ['twitter', 'twitter'],
27
+ 'pn' => ['pinterest', 'pinterest'],
28
+ 'gp' => ['google', 'google-plus']
29
+ ];
30
+
31
+ foreach($social as $key => $value):
32
+
33
+ $name = $value[0];
34
+ $icon = $value[1];
35
+ $option_value_exists = !get_option('gs-group-network-'.$key);
36
+ $option_value = get_option('gs-group-network-'.$key);
37
+ ?>
38
+
39
+ <input type="checkbox"
40
+ name="gs-group-network-<?php echo $key ?>"
41
+ id="gs-group-network-<?php echo $key ?>"
42
+ class="ntw group-network"
43
+ value="Y"
44
+ rel="<?php echo $key ?>"
45
+ <?php echo ($option_value == 'Y' || !$option_value_exists ? 'checked' : '') ?>/>
46
+
47
+ <label for="gs-group-network-<?php echo $key ?>" class="no-padding"><? echo $name ?></label>
48
+
49
+ <? endforeach; ?>
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <div class="half">
55
+ <div class="form-group">
56
+ <label class="form-title" for="gs-buttons-position">Choose Template</label>
57
+
58
+ <?php
59
+ $templates = [
60
+ 'Square Rounded' => 'gs-template1',
61
+ 'Rounded' => 'gs-template2',
62
+ 'Special' => 'gs-template3',
63
+ 'Basic Grey' => 'gs-template4',
64
+ 'Basic Black' => 'gs-template5'
65
+ ]
66
+ ?>
67
+
68
+ <select id="group_template" name="gs-group-template">
69
+ <? foreach($templates as $name => $value): ?>
70
+ <option value="<?= $value ?>" <?= get_option('gs-group-template') == $value ? 'selected' : '' ?>><?= $name ?></option>
71
+ <? endforeach; ?>
72
+ </select>
73
+ </div>
74
+ </div>
75
+
76
+ <div class="half gs-clearfix">
77
+ <div class="form-group">
78
+ <label class="form-title" for="gs-buttons-position">Choose Size</label>
79
+
80
+ <?php
81
+ $sizes = [
82
+ 'Small' => 'gs-small',
83
+ 'Medium' => 'gs-medium',
84
+ 'Large' => 'gs-large'
85
+ ]
86
+ ?>
87
+ <select id="group_size" name="gs-group-size">
88
+ <? foreach($sizes as $name => $value): ?>
89
+ <option value="<?= $value ?>" <?= get_option('gs-group-size') == $value || (!get_option('gs-group-size') && $value == 'gs-large') ? 'selected' : '' ?> ><?= $name ?></option>
90
+ <? endforeach; ?>
91
+ </select>
92
+ </div>
93
+ </div>
94
+
95
+ <div class="half">
96
+ <div class="form-group">
97
+ <label class="form-title" for="gs-buttons-position">Include Counter</label>
98
+
99
+ <label>Yes</label>
100
+
101
+ <input type="radio" value="Y" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'Y' || !get_option('gs-group-counter') ? 'checked="checked"' : '') ?> />
102
+ <label>No</label>
103
+ <input type="radio" value="N" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'N' ? 'checked="checked"' : '') ?> />
104
+ </div>
105
+ </div>
106
+
107
+ <div class="half gs-clearfix">
108
+ <div class="form-group">
109
+ <label class="form-title" for="gs-buttons-position">Position on post</label>
110
+
111
+ <label>Top</label>
112
+ <input type="radio" value="1" name="gs-group-position" <?php echo (get_option('gs-group-position') == 1 ? 'checked="checked"' : '') ?> />
113
+ <label>Bottom</label>
114
+ <input type="radio" value="0" name="gs-group-position" <?php echo (get_option('gs-group-position') == 0 ? 'checked="checked"' : '') ?> />
115
+ </div>
116
+ </div>
117
+
118
+ </div>
119
+
120
+ <div class="cl"></div>
121
+ </div>
122
+ </div>
123
+ <div class="postbox-container" style="width: 50%">
124
+ <fieldset>
125
+ <legend>Preview</legend>
126
+ <div id="reaction-preview" class="native-buttons text-center clearfix">
127
+ <div class="gs-group"></div>
128
+ </div>
129
+ </fieldset>
130
+ </div>
131
+
132
+ </div>
133
+ </div>
134
+
135
+ <div class="bar-active">
136
+ <?php submit_button('Save Changes'); ?>
137
+
138
+ <div class="cl"></div>
139
+ </div>
140
+
141
+ </form>
tmpl/header.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !current_user_can( 'manage_options' ) ) {
3
+ wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
4
+ }
5
+
6
+ $GETSOCIAL_URL = 'http://getsocial.io';
7
+
8
+ $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
9
+
10
+ $GS = new GS( get_option('gs-api-key'),
11
+ get_option('gs-identifier'),
12
+ get_option('gs-elements'),
13
+ get_option('gs-lang'));
14
+
15
+ if(isset($_GET["refresh"]) && $GS->needs_update()):
16
+ $site_info = $GS->refreshSite();
17
+ endif;
18
+
19
+ $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);
56
+
57
+ e.style.display = (e.style.display == 'block' ? 'none' : 'block');
58
+ }
59
+ </script>
tmpl/settings.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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; ?>
28
+
29
+ <div class="bar-active">
30
+ <?php submit_button('Save Changes'); ?>
31
+ <div class="cl"></div>
32
+ </div>
33
+ </form>
tmpl/tabs.php ADDED
@@ -0,0 +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=groups') ?>" class="nav-tab <?php echo $_GET['tab'] == 'groups' ? '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>
wp-share-buttons-analytics-getsocial.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
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
10
+ */
11
+
12
+ include('lib/gs.php');
13
+
14
+ /* MENU */
15
+ add_action( 'admin_menu', 'gs_getsocial_menu' );
16
+
17
+ function gs_getsocial_menu(){
18
+ $GS = get_gs();
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
+
26
+ function slug_path($s) {
27
+ $main_slug = 'wp-share-buttons-analytics-getsocial/';
28
+ return ($main_slug.$s);
29
+ }
30
+
31
+ function register_gs_settings(){
32
+ register_setting( 'getsocial-gs-settings' , 'gs-api-key' );
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(){
51
+ return new GS(get_option('gs-api-key'),
52
+ get_option('gs-identifier'),
53
+ get_option('gs-elements'),
54
+ get_option('gs-lang'));
55
+ }
56
+
57
+ add_action('wp_head','add_gs_lib');
58
+
59
+ function add_gs_lib(){
60
+ $GS = get_gs();
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
+ //
75
+ $groups = "";
76
+ $buttons = "";
77
+ //
78
+ if(!is_feed() && !is_home()):
79
+ // exit($GS->getGroup());
80
+ if($groups_active):
81
+ $groups .= $GS->getGroup();
82
+
83
+ $position = get_option('gs-group-position');
84
+
85
+ if($position == 0):
86
+ $custom_content = $content.$groups;
87
+ else:
88
+ $custom_content = $groups.'<br/>'.$content;
89
+ endif;
90
+ endif;
91
+
92
+
93
+ if($custom_active):
94
+ foreach($GS->getElements() as $id => $action):
95
+ $buttons .= $GS->getButton($id, $action);
96
+ endforeach;
97
+
98
+ $custom_content = $custom_content.$buttons;
99
+ endif;
100
+ endif;
101
+
102
+
103
+
104
+ return $custom_content;
105
+ else:
106
+ return $content;
107
+ endif;
108
+ }