Vikinguard - Version 2.0.0

Version Description

  • Added multishop support.
Download this release

Release Info

Developer vikinguard
Plugin Icon 128x128 Vikinguard
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.2.2 to 2.0.0

Files changed (5) hide show
  1. heimdal.js +99 -13
  2. i18n/Vikinguard-es_ES.mo +0 -0
  3. i18n/Vikinguard-es_ES.po +167 -131
  4. readme.txt +6 -2
  5. vikinguard.php +89 -6
heimdal.js CHANGED
@@ -70,8 +70,7 @@ function signupMail(check, error) {
70
  .done();
71
  }
72
 
73
- function remembercallbackajax(uri, data, check, error) {
74
-
75
  var request = {
76
  url : uri,
77
  contentType : "application/json",
@@ -80,30 +79,41 @@ function remembercallbackajax(uri, data, check, error) {
80
  dataType : 'jsonp',
81
  data : 'jsonp',
82
  success : function(json) {
83
- if (typeof json.message != 'undefined') {
84
  alert(check);
85
  } else {
86
-
87
  var email = document.getElementById("signinEmail").value;
88
  var password = document.getElementById("signinPassword").value;
89
 
90
  window.location.replace(window.location.href
91
- + "&action=configured&heimdalapm_email=" + encodeURIComponent(email)
92
  + "&heimdalapm_password=" + encodeURIComponent(password)
93
  + "&heimdalapm_customer=" + encodeURIComponent(json.customerId)
94
- + "&heimdalapm_shop=" + encodeURIComponent(json.shops[0].shopId));
95
 
96
  }
97
  },
98
  error : function(e) {
99
  alert(error);
100
-
101
  }
102
  };
103
 
104
  return jQuery.ajax(request);
105
  };
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  function reconfigured() {
108
  window.location.replace(window.location.href + "&action=reconfigured");
109
  }
@@ -123,7 +133,7 @@ function signup(heimdalapm_email, adviseShort, adviseStart, advisePassword,
123
  var password = document.getElementById("signupPassword").value;
124
  var shopURL = document.getElementById("signupShop").value;
125
  var confirm = document.getElementById("signupConfirm").value;
126
-
127
  var send = true;
128
  var text = "";
129
 
@@ -191,14 +201,13 @@ function signup(heimdalapm_email, adviseShort, adviseStart, advisePassword,
191
  } else {
192
  alert(text);
193
  }
194
-
195
  }
196
 
197
  function strStartsWith(str, prefix) {
198
  return str.indexOf(prefix) === 0;
199
  }
200
 
201
- function signupcallbackajax(uri, data, error) {
202
 
203
  var request = {
204
  url : uri,
@@ -208,10 +217,9 @@ function signupcallbackajax(uri, data, error) {
208
  dataType : 'jsonp',
209
  data : 'jsonp',
210
  success : function(json) {
211
- if (json.autocreation == false) {
212
- alert(json.feedback);
213
  } else {
214
-
215
  var email = document.getElementById("signupEmail").innerHTML;
216
  var password = document.getElementById("signupPassword").value;
217
 
@@ -230,3 +238,81 @@ function signupcallbackajax(uri, data, error) {
230
 
231
  return jQuery.ajax(request);
232
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  .done();
71
  }
72
 
73
+ function remembercallbackajax(uri, check, error) {
 
74
  var request = {
75
  url : uri,
76
  contentType : "application/json",
79
  dataType : 'jsonp',
80
  data : 'jsonp',
81
  success : function(json) {
82
+ if ( json.status != 200) {
83
  alert(check);
84
  } else {
 
85
  var email = document.getElementById("signinEmail").value;
86
  var password = document.getElementById("signinPassword").value;
87
 
88
  window.location.replace(window.location.href
89
+ + "&action=multishop&heimdalapm_email=" + encodeURIComponent(email)
90
  + "&heimdalapm_password=" + encodeURIComponent(password)
91
  + "&heimdalapm_customer=" + encodeURIComponent(json.customerId)
92
+ +"&heimdalapm_customer_info=" + encodeURIComponent(JSON.stringify(json)));
93
 
94
  }
95
  },
96
  error : function(e) {
97
  alert(error);
 
98
  }
99
  };
100
 
101
  return jQuery.ajax(request);
102
  };
103
 
104
+ function shopSelected(customerId,adviseTerms){
105
+ var shopId = document.getElementById("multishop_selector").value;
106
+
107
+ if (!document.getElementById("signupTerms").checked) {
108
+ alert(adviseTerms);
109
+ }else{
110
+ window.location.replace(window.location.href
111
+ + "&action=configured"
112
+ + "&heimdalapm_customer=" + encodeURIComponent(customerId)
113
+ + "&heimdalapm_shop=" + encodeURIComponent(shopId));
114
+ }
115
+ }
116
+
117
  function reconfigured() {
118
  window.location.replace(window.location.href + "&action=reconfigured");
119
  }
133
  var password = document.getElementById("signupPassword").value;
134
  var shopURL = document.getElementById("signupShop").value;
135
  var confirm = document.getElementById("signupConfirm").value;
136
+
137
  var send = true;
138
  var text = "";
139
 
201
  } else {
202
  alert(text);
203
  }
 
204
  }
205
 
206
  function strStartsWith(str, prefix) {
207
  return str.indexOf(prefix) === 0;
208
  }
209
 
210
+ function signupcallbackajax(uri, error) {
211
 
212
  var request = {
213
  url : uri,
217
  dataType : 'jsonp',
218
  data : 'jsonp',
219
  success : function(json) {
220
+ if (json.status != 200) {
221
+ alert(error+" -> "+json.message+"("+json.status+")");
222
  } else {
 
223
  var email = document.getElementById("signupEmail").innerHTML;
224
  var password = document.getElementById("signupPassword").value;
225
 
238
 
239
  return jQuery.ajax(request);
240
  };
241
+
242
+ function addShop(email,customerId, password, adviseShort, adviseStart, adviseLocalhost,adviseTerms, error) {
243
+
244
+ var shopName = document.getElementById("addShopShopName").value;
245
+ var shopURL = document.getElementById("addShopUrl").value;
246
+
247
+ var send = true;
248
+ var text = "";
249
+
250
+ if (shopName.length < 6) {
251
+ text = adviseShort;
252
+ send = false;
253
+
254
+ }
255
+
256
+ if (!strStartsWith(shopURL, 'http')) {
257
+ text = text + adviseStart;
258
+ send = false;
259
+
260
+ }
261
+
262
+ if ((shopURL.indexOf("localhost") > -1) || (shopURL.indexOf("127.0.0.1") > -1)) {
263
+ if (!said) {
264
+ text = aviseLocalhost;
265
+ send = false;
266
+ }
267
+ said = true;
268
+ }
269
+
270
+ if (!document.getElementById("signupTerms").checked) {
271
+ text = text + adviseTerms;
272
+ send = false;
273
+
274
+ }
275
+
276
+ if (send) {
277
+ addShopCallbackajax(
278
+ "https://vikinguard.com/heimdalapp/api/external/customer/"+encodeURIComponent(customerId)+"/shop?"
279
+ + "&mail=" + encodeURIComponent(email) + "&password=" + encodeURIComponent(password)
280
+ + "&shopName=" + encodeURIComponent(shopName) + "&shopUrl=" + encodeURIComponent(shopURL)
281
+ , error).done(
282
+ function(data, statusCode) {
283
+
284
+ });
285
+
286
+ } else {
287
+ alert(text);
288
+ }
289
+ }
290
+
291
+ function addShopCallbackajax(uri, error) {
292
+ var request = {
293
+ url : uri,
294
+ contentType : "application/json",
295
+ accepts : "application/json",
296
+ cache : false,
297
+ dataType : 'jsonp',
298
+ data : 'jsonp',
299
+ success : function(json) {
300
+ if ( json.status != 200) {
301
+ alert(error+" -> "+json.message+"("+json.status+")");
302
+ } else {
303
+
304
+ window.location.replace(window.location.href
305
+ + "&action=configured"
306
+ + "&heimdalapm_customer=" + encodeURIComponent(json.customerId)
307
+ + "&heimdalapm_shop=" + encodeURIComponent(json.id));
308
+ }
309
+ },
310
+ error : function(e) {
311
+ alert(error);
312
+
313
+ }
314
+ };
315
+
316
+ return jQuery.ajax(request);
317
+ };
318
+
i18n/Vikinguard-es_ES.mo CHANGED
Binary file
i18n/Vikinguard-es_ES.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Vikinguard\n"
4
- "POT-Creation-Date: 2015-11-03 12:58+0100\n"
5
- "PO-Revision-Date: 2015-11-03 13:03+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: es_ES\n"
@@ -11,26 +11,116 @@ msgstr ""
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Generator: Poedit 1.8.6\n"
13
  "X-Poedit-Basepath: ..\n"
 
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
- "X-Poedit-KeywordsList: __;_e\n"
 
 
17
  "X-Poedit-SearchPath-0: .\n"
 
18
 
19
- #: vikinguard.php:75
 
 
 
 
20
  msgid "You do not have sufficient permissions to manage options for this blog."
21
  msgstr ""
22
- "Usted no tiene permisos suficientes para gestionar las opciones para este "
23
- "blog."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- #: vikinguard.php:157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  msgid "Please introduce your email to configure Vikinguard"
27
  msgstr "Introduzca su correo electrónico para configurar Vikinguard"
28
 
29
- #: vikinguard.php:160 vikinguard.php:262
30
  msgid "Mail address"
31
  msgstr "Dirección de correo"
32
 
33
- #: vikinguard.php:161
34
  msgid ""
35
  "If you want to sign up, introduce your mail. If you are already registered, "
36
  "use your mail to sign in."
@@ -38,23 +128,27 @@ msgstr ""
38
  "Si desea registrarse, introduzca su correo. Si ya estás registrado, escriba "
39
  "su correo igualmente para iniciar sesión."
40
 
41
- #: vikinguard.php:164 vikinguard.php:453
 
 
 
 
42
  msgid "Send it"
43
  msgstr "Enviar"
44
 
45
- #: vikinguard.php:165
46
  msgid "Introduce your mail"
47
  msgstr "Introduzca tu correo"
48
 
49
- #: vikinguard.php:168
50
  msgid "Do you have any problem? Please click here"
51
- msgstr "¿Tienes algún problema? "
52
 
53
- #: vikinguard.php:172
54
  msgid "We are not going to spam you"
55
- msgstr "No vamos a enviarle Spam"
56
 
57
- #: vikinguard.php:172
58
  msgid ""
59
  "We are committed to keeping your e-mail address confidential. We do not "
60
  "sell, rent, or lease our subscription lists to third parties, and we will "
@@ -66,185 +160,127 @@ msgstr ""
66
  "suscripción a terceros, y no vamos a proporcionar su información personal a "
67
  "cualquier tercera persona a menos que obligados a hacerlo por ley."
68
 
69
- #: vikinguard.php:189
70
- msgid "Check your email"
71
- msgstr "Consulte su correo electrónico"
72
-
73
- #: vikinguard.php:232 vikinguard.php:580
74
- msgid "Communication problem. Please try again later."
75
- msgstr "Problema de comunicación. Por favor vuelva a intentarlo más tarde."
76
-
77
- #: vikinguard.php:251
78
  msgid "Introduce your password to reconfigure the module."
79
  msgstr "Introduzca su password para reconfigurar el módulo"
80
 
81
- #: vikinguard.php:260 vikinguard.php:400
82
- msgid "Mail"
83
- msgstr "Correo"
84
-
85
- #: vikinguard.php:263
86
  msgid "That email address is invalid"
87
- msgstr "La dirección de correo es invalidad"
88
 
89
- #: vikinguard.php:268 vikinguard.php:271 vikinguard.php:409
90
  msgid "Password"
91
  msgstr "Contraseña"
92
 
93
- #: vikinguard.php:272 vikinguard.php:410
94
  msgid "minimum 6 caracters"
95
  msgstr "al menos 6 caracters"
96
 
97
- #: vikinguard.php:276
98
  msgid "Did you forget your password? Click"
99
- msgstr "¿Ha olvidado su contraseña? Clique"
100
 
101
- #: vikinguard.php:278
102
  msgid " here"
103
  msgstr "aquí"
104
 
105
- #: vikinguard.php:282
106
- msgid "Sign in"
107
- msgstr "Acceder"
108
-
109
- #: vikinguard.php:326
110
  msgid "check your password"
111
- msgstr "Consulte su correo electrónico"
112
 
113
- #: vikinguard.php:338
114
  msgid "Communication problem. Please try again later"
115
  msgstr "Problema de comunicación. Por favor vuelva a intentarlo más tarde."
116
 
117
- #: vikinguard.php:367
 
 
 
 
118
  msgid "VIKINGUARD IS CONFIGURED"
119
  msgstr "VIKINGUARD ESTA CONFIGURADO"
120
 
121
- #: vikinguard.php:370
122
  msgid "to reset the configuration"
123
  msgstr "para reconfigurar"
124
 
125
- #: vikinguard.php:394
126
  msgid "1) Select a password:"
127
  msgstr "1) Seleccione una contraseña"
128
 
129
- #: vikinguard.php:407
130
  msgid "Choose a Password"
131
  msgstr "Elija una contraseña"
132
 
133
- #: vikinguard.php:413
134
  msgid "Confirm the Password"
135
  msgstr "Confirma la contraseña"
136
 
137
- #: vikinguard.php:416
138
  msgid "Whoops, these don't match"
139
  msgstr "Upps, No son iguales"
140
 
141
- #: vikinguard.php:417
142
  msgid "Confirm"
143
- msgstr "Confirme"
144
 
145
- #: vikinguard.php:423
146
  msgid "2) Review/Modify:"
147
- msgstr "2) Revise/Modifique"
148
-
149
- #: vikinguard.php:427
150
- msgid "This is just a name to refer to your shop."
151
- msgstr "Es simplemente un nombre para referirnos a su tienda"
152
 
153
- #: vikinguard.php:427
154
  msgid "Your Shop Name"
155
  msgstr "El nombre de tu tienda"
156
 
157
- #: vikinguard.php:429
158
  msgid "Customer name"
159
  msgstr "El nombre de cliente"
160
 
161
- #: vikinguard.php:434
162
- msgid ""
163
- "Vikinguard is going to use this address to monitor the uptime of your shop. "
164
- "Please, check the http and https is correct configured. Do not use private "
165
- "or localhost address, use your public ip or domain to allow Vikinguard to "
166
- "access to your shop."
167
- msgstr ""
168
- "Vikinguard va a usar esta dirección para monitorizar la disponibilidad. Por "
169
- "favor asegurate de que http o https está bien escrito. No uses direcciones "
170
- "privadas o localhost. Usa direcciones publicas para permitir el acceso de "
171
- "Vikinguard a tu tienda."
172
-
173
- #: vikinguard.php:437
174
- msgid "Shop URL"
175
- msgstr "La dirección de la tienda"
176
-
177
- #: vikinguard.php:446
178
- msgid "you must accept Vikinguard's terms"
179
- msgstr "debe aceptar los términos de uso de Vikinguard"
180
-
181
- #: vikinguard.php:447
182
- msgid "I agree to the "
183
- msgstr "Estoy de acuerdo con "
184
-
185
- #: vikinguard.php:448
186
- msgid "Terms of Service."
187
- msgstr "los Términos del Servicio"
188
-
189
- #: vikinguard.php:491
190
  msgid "Customer Name too short"
191
  msgstr "El nombre del nombre de cliente es demasiado corto"
192
 
193
- #: vikinguard.php:497
194
- msgid "Short url must start by http:// or https://"
195
- msgstr "La dirección debe empezar por http:// o https://"
196
-
197
- #: vikinguard.php:503
198
  msgid "Password too short"
199
  msgstr "La contraseña es demasiado corta"
200
 
201
- #: vikinguard.php:509
202
- msgid "Whoops, these passwords don't match"
203
  msgstr "Upps, No son iguales"
204
 
205
- #: vikinguard.php:515
206
  msgid "Check your email configuration"
207
  msgstr "Consulte la dirección de correo electrónico"
208
 
209
- #: vikinguard.php:520
210
  msgid "You must accept the terms\\n"
211
- msgstr "debes aceptar los terminos de Vikinguard"
212
 
213
- #: vikinguard.php:527
214
- msgid ""
215
- "We have noticed that you configured Vikinguard to monitor a demo/test "
216
- "environment (localhost or 127.0.0.1). Please note that without real traffic "
217
- "and no public URL, you will not be able to monitor neither uptime neither "
218
- "real user experience and you will lose some important functionalities of our "
219
- "tool"
220
- msgstr ""
221
- "Nos hemos dado cuenta de que ha configurado Vikinguard para supervisar un "
222
- "entorno de demostración / prueba (localhost o 127.0.0.1). Por favor, tenga "
223
- "en cuenta que sin tráfico real y sin dirección URL pública, usted no será "
224
- "capaz de controlar ni la experiencia ni el tiempo de actividad de usuario "
225
- "real y usted perderá algunas funcionalidades importantes de nuestra "
226
- "herramienta"
227
-
228
- #: vikinguard.php:597
229
  msgid "Vikinguard Settings"
230
  msgstr "Configuración de Vikinguard"
231
 
232
- #: vikinguard.php:598
233
  msgid "Vikinguard Console"
234
  msgstr "Consola de Vikinguard"
235
 
236
- #~ msgid "you must accept Vikinguard\\’s terms"
237
- #~ msgstr "debes aceptar los terminos de Vikinguard"
238
-
239
- #~ msgid ""
240
- #~ "We have noticed that you configured Vikinguard APM to monitor a demo/test "
241
- #~ "environment (localhost or 127.0.0.1). Please note that without real "
242
- #~ "traffic and no public URL, you will not be able to monitor neither uptime "
243
- #~ "neither real user experience and you will lose some important "
244
- #~ "functionalities of our tool"
245
- #~ msgstr ""
246
- #~ "Nos hemos dado cuenta de que ha configurado Vikinguard APM para "
247
- #~ "supervisar un entorno de demostración / prueba. Por favor, tenga en "
248
- #~ "cuenta que sin tráfico real y sin dirección URL pública, no será capaz de "
249
- #~ "controlar ni la experiencia ni el tiempo de actividad de usuario real y "
250
- #~ "perderá algunas funcionalidades importantes de nuestra herramienta"
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Vikinguard for woocommerce\n"
4
+ "POT-Creation-Date: 2016-05-05 17:04+0200\n"
5
+ "PO-Revision-Date: 2016-05-05 17:10+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: es_ES\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Generator: Poedit 1.8.6\n"
13
  "X-Poedit-Basepath: ..\n"
14
+ "X-Poedit-WPHeader: vikinguard.php\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
19
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
+ #: vikinguard.php:71
24
+ msgid "to access, clik on:"
25
+ msgstr "Para acceder, haz click sobre:"
26
+
27
+ #: vikinguard.php:91
28
  msgid "You do not have sufficient permissions to manage options for this blog."
29
  msgstr ""
30
+ "No tiene permisos suficientes para gestionar las opciones para este blog."
31
+
32
+ #: vikinguard.php:160 vikinguard.php:267 vikinguard.php:322
33
+ msgid "Mail"
34
+ msgstr "Correo"
35
+
36
+ #: vikinguard.php:164
37
+ msgid "Select an existing shop ..."
38
+ msgstr "Seleccione una tienda existente…"
39
+
40
+ #: vikinguard.php:185
41
+ msgid "... or add a new one"
42
+ msgstr "… o añada una nueva"
43
+
44
+ #: vikinguard.php:188 vikinguard.php:343
45
+ msgid "This is just a name to refer to your shop."
46
+ msgstr "Es simplemente un nombre para referirnos a su tienda"
47
+
48
+ #: vikinguard.php:188
49
+ msgid "Your New Shop Name"
50
+ msgstr "El nombre de tu tienda"
51
+
52
+ #: vikinguard.php:190
53
+ msgid "Shop name"
54
+ msgstr "Nombre de la tienda"
55
+
56
+ #: vikinguard.php:194 vikinguard.php:349
57
+ msgid ""
58
+ "Vikinguard is going to use this address to monitor the uptime of your shop. "
59
+ "Please, check the http and https is correct configured. Do not use private "
60
+ "or localhost address, use your public ip or domain to allow Vikinguard to "
61
+ "access to your shop."
62
+ msgstr ""
63
+ "Vikinguard va a usar esta dirección para monitorizar la disponibilidad. Por "
64
+ "favor asegurate de que http o https está bien escrito. No uses direcciones "
65
+ "privadas o localhost. Usa direcciones publicas para permitir el acceso de "
66
+ "Vikinguard a tu tienda."
67
+
68
+ #: vikinguard.php:197 vikinguard.php:352
69
+ msgid "Shop URL"
70
+ msgstr "URL de la tienda"
71
+
72
+ #: vikinguard.php:201 vikinguard.php:356
73
+ msgid "you must accept Vikinguard's terms"
74
+ msgstr "debe aceptar los términos de uso de Vikinguard"
75
+
76
+ #: vikinguard.php:202 vikinguard.php:357
77
+ msgid "I agree to the "
78
+ msgstr "He leído y acepto los"
79
 
80
+ #: vikinguard.php:203 vikinguard.php:358
81
+ msgid "Terms of Service."
82
+ msgstr "Términos del servicio"
83
+
84
+ #: vikinguard.php:206
85
+ msgid "Shop Name too short"
86
+ msgstr "Nombre de la tienda demasiado corto"
87
+
88
+ #: vikinguard.php:206 vikinguard.php:361
89
+ msgid "Short url must start by http:// or https://"
90
+ msgstr "La dirección debe empezar por http:// o https://"
91
+
92
+ #: vikinguard.php:206 vikinguard.php:361
93
+ msgid ""
94
+ "We have noticed that you configured Vikinguard to monitor a demo/test "
95
+ "environment (localhost or 127.0.0.1). Please note that without real traffic "
96
+ "and no public URL, you will not be able to monitor neither uptime neither "
97
+ "real user experience and you will lose some important functionalities of our "
98
+ "tool"
99
+ msgstr ""
100
+ "Nos hemos dado cuenta de que ha configurado Vikinguard para supervisar un "
101
+ "entorno de demostración / prueba (localhost o 127.0.0.1). Por favor, tenga "
102
+ "en cuenta que sin tráfico real y sin dirección URL pública, usted no será "
103
+ "capaz de controlar ni la experiencia ni el tiempo de actividad de usuario "
104
+ "real y usted perderá algunas funcionalidades importantes de nuestra "
105
+ "herramienta"
106
+
107
+ #: vikinguard.php:206 vikinguard.php:236 vikinguard.php:361
108
+ msgid "Communication problem. Please try again later."
109
+ msgstr "Problema de comunicación. Por favor vuelva a intentarlo más tarde."
110
+
111
+ #: vikinguard.php:207
112
+ msgid "Add it!"
113
+ msgstr "¡Añadir!"
114
+
115
+ #: vikinguard.php:229
116
  msgid "Please introduce your email to configure Vikinguard"
117
  msgstr "Introduzca su correo electrónico para configurar Vikinguard"
118
 
119
+ #: vikinguard.php:232 vikinguard.php:269
120
  msgid "Mail address"
121
  msgstr "Dirección de correo"
122
 
123
+ #: vikinguard.php:234
124
  msgid ""
125
  "If you want to sign up, introduce your mail. If you are already registered, "
126
  "use your mail to sign in."
128
  "Si desea registrarse, introduzca su correo. Si ya estás registrado, escriba "
129
  "su correo igualmente para iniciar sesión."
130
 
131
+ #: vikinguard.php:236
132
+ msgid "Check your email"
133
+ msgstr "Consulte su correo electrónico"
134
+
135
+ #: vikinguard.php:238 vikinguard.php:362
136
  msgid "Send it"
137
  msgstr "Enviar"
138
 
139
+ #: vikinguard.php:239
140
  msgid "Introduce your mail"
141
  msgstr "Introduzca tu correo"
142
 
143
+ #: vikinguard.php:242
144
  msgid "Do you have any problem? Please click here"
145
+ msgstr "¿Tienes algún problema? Haga clic aquí"
146
 
147
+ #: vikinguard.php:246
148
  msgid "We are not going to spam you"
149
+ msgstr "No vamos a enviarte Spam"
150
 
151
+ #: vikinguard.php:246
152
  msgid ""
153
  "We are committed to keeping your e-mail address confidential. We do not "
154
  "sell, rent, or lease our subscription lists to third parties, and we will "
160
  "suscripción a terceros, y no vamos a proporcionar su información personal a "
161
  "cualquier tercera persona a menos que obligados a hacerlo por ley."
162
 
163
+ #: vikinguard.php:262
 
 
 
 
 
 
 
 
164
  msgid "Introduce your password to reconfigure the module."
165
  msgstr "Introduzca su password para reconfigurar el módulo"
166
 
167
+ #: vikinguard.php:271
 
 
 
 
168
  msgid "That email address is invalid"
169
+ msgstr "dirección email inválida"
170
 
171
+ #: vikinguard.php:275 vikinguard.php:278 vikinguard.php:328
172
  msgid "Password"
173
  msgstr "Contraseña"
174
 
175
+ #: vikinguard.php:280 vikinguard.php:330
176
  msgid "minimum 6 caracters"
177
  msgstr "al menos 6 caracters"
178
 
179
+ #: vikinguard.php:282
180
  msgid "Did you forget your password? Click"
181
+ msgstr "¿Olvidó su contraseña? Haga clic"
182
 
183
+ #: vikinguard.php:284
184
  msgid " here"
185
  msgstr "aquí"
186
 
187
+ #: vikinguard.php:287
 
 
 
 
188
  msgid "check your password"
189
+ msgstr "Consulta tu correo electrónico"
190
 
191
+ #: vikinguard.php:287
192
  msgid "Communication problem. Please try again later"
193
  msgstr "Problema de comunicación. Por favor vuelva a intentarlo más tarde."
194
 
195
+ #: vikinguard.php:289
196
+ msgid "Sign in"
197
+ msgstr "Iniciar sesión"
198
+
199
+ #: vikinguard.php:305
200
  msgid "VIKINGUARD IS CONFIGURED"
201
  msgstr "VIKINGUARD ESTA CONFIGURADO"
202
 
203
+ #: vikinguard.php:308
204
  msgid "to reset the configuration"
205
  msgstr "para reconfigurar"
206
 
207
+ #: vikinguard.php:320
208
  msgid "1) Select a password:"
209
  msgstr "1) Seleccione una contraseña"
210
 
211
+ #: vikinguard.php:325
212
  msgid "Choose a Password"
213
  msgstr "Elija una contraseña"
214
 
215
+ #: vikinguard.php:332
216
  msgid "Confirm the Password"
217
  msgstr "Confirma la contraseña"
218
 
219
+ #: vikinguard.php:335
220
  msgid "Whoops, these don't match"
221
  msgstr "Upps, No son iguales"
222
 
223
+ #: vikinguard.php:336
224
  msgid "Confirm"
225
+ msgstr "Confirma"
226
 
227
+ #: vikinguard.php:339
228
  msgid "2) Review/Modify:"
229
+ msgstr "2) Revisa/Modifica"
 
 
 
 
230
 
231
+ #: vikinguard.php:343
232
  msgid "Your Shop Name"
233
  msgstr "El nombre de tu tienda"
234
 
235
+ #: vikinguard.php:345
236
  msgid "Customer name"
237
  msgstr "El nombre de cliente"
238
 
239
+ #: vikinguard.php:361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  msgid "Customer Name too short"
241
  msgstr "El nombre del nombre de cliente es demasiado corto"
242
 
243
+ #: vikinguard.php:361
 
 
 
 
244
  msgid "Password too short"
245
  msgstr "La contraseña es demasiado corta"
246
 
247
+ #: vikinguard.php:361
248
+ msgid "Whoops, these passwords do not match"
249
  msgstr "Upps, No son iguales"
250
 
251
+ #: vikinguard.php:361
252
  msgid "Check your email configuration"
253
  msgstr "Consulte la dirección de correo electrónico"
254
 
255
+ #: vikinguard.php:361
256
  msgid "You must accept the terms\\n"
257
+ msgstr "Debes aceptar nuestros términos y condiciones"
258
 
259
+ #: vikinguard.php:371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  msgid "Vikinguard Settings"
261
  msgstr "Configuración de Vikinguard"
262
 
263
+ #: vikinguard.php:372
264
  msgid "Vikinguard Console"
265
  msgstr "Consola de Vikinguard"
266
 
267
+ #. Plugin Name of the plugin/theme
268
+ msgid "Vikinguard for woocommerce"
269
+ msgstr "Vikinguard para woocommerce"
270
+
271
+ #. Plugin URI of the plugin/theme
272
+ #. Author URI of the plugin/theme
273
+ msgid "https://www.vikinguard.com"
274
+ msgstr "https://www.vikinguard.com"
275
+
276
+ #. Description of the plugin/theme
277
+ msgid ""
278
+ "it checks your site uptime and real user experience. This module provides "
279
+ "all the infomation about your site\\'s perfomance."
280
+ msgstr ""
281
+ "Comprueba tu disponibilidad y la experiencia de tus usuarios reales. Este "
282
+ "módulo proporciona toda la información sobre el rendimiento de su site\\."
283
+
284
+ #. Author of the plugin/theme
285
+ msgid "Vikinguard. This is not just a software company."
286
+ msgstr "Vikinguard. This is not just a software company."
readme.txt CHANGED
@@ -2,8 +2,9 @@
2
  Contributors: vikinguard
3
  Tags: vikinguard, real user monitoring, rum, web performance, user experience, availability, seo,uptime, availability
4
  Requires at least: 2.1
5
- Tested up to: 4.5
6
- Stable tag: 1.2.2
 
7
 
8
  With Vikinguard you'll know the real user experience of your site and you'll be notified when something is not performing as expected.
9
 
@@ -60,3 +61,6 @@ Vikinguard uses a JavaScript snippet to collect performance data from the users
60
  = 1.2.2 =
61
  * Fixed js escape
62
 
 
 
 
2
  Contributors: vikinguard
3
  Tags: vikinguard, real user monitoring, rum, web performance, user experience, availability, seo,uptime, availability
4
  Requires at least: 2.1
5
+ Tested up to: 4.5.1
6
+ Stable tag: 2.0.0
7
+ Version: 2.0.0
8
 
9
  With Vikinguard you'll know the real user experience of your site and you'll be notified when something is not performing as expected.
10
 
61
  = 1.2.2 =
62
  * Fixed js escape
63
 
64
+ = 2.0.0 =
65
+ * Added multishop support.
66
+
vikinguard.php CHANGED
@@ -4,15 +4,24 @@
4
  * Plugin URI: https://www.vikinguard.com
5
  * Description: it checks your site uptime and real user experience. This module provides all the infomation about your site\'s perfomance.
6
  * Author: Vikinguard. This is not just a software company.
7
- * Version: 1.2.0
8
  * Author URI: https://www.vikinguard.com
9
  */
10
 
 
 
11
  function wpb_adding_heimdal_scripts() {
 
12
  wp_register_script('heimdal', plugins_url ( 'heimdal.js', __FILE__ ));
13
  wp_enqueue_script('heimdal');
 
 
14
  }
15
 
 
 
 
 
16
  // Make sure we don't expose any info if called directly
17
  if (! function_exists ( 'add_action' )) {
18
  echo "Hi there! I'm just a plugin, not much I can do when called directly.";
@@ -34,7 +43,7 @@ function add_Vikinguard_header() {
34
  if (! is_admin () && strlen ( $customer ) > 0 && strlen ( $shop ) > 0) {
35
  ?>
36
 
37
- <script src="https://d27t6aik270las.cloudfront.net/boomerang.js"
38
  type="text/javascript"></script>
39
  <script type="text/javascript">
40
  BOOMR.init({
@@ -105,6 +114,13 @@ function print_Vikinguard_management() {
105
  update_option ( 'HEIMDALAPM_EMAIL_TMP', sanitize_email ( $_GET ['heimdalapm_email'] ) );
106
  return configuration_Vikinguard_Render ();
107
  }
 
 
 
 
 
 
 
108
 
109
  if ($action == "configured" || ($configurationEmail != null || $configurationEmail != "") && ($configurationPassword != null || $configurationPassword != "") && ($customerid != null || $customerid != "") && ($shopid != null || $shopid != "")) {
110
  if ($action == "configured") {
@@ -112,9 +128,10 @@ function print_Vikinguard_management() {
112
  wp_cache_clear_cache ();
113
  }
114
 
115
- if (is_email ( $_GET ['heimdalapm_email'] ) && is_numeric ( $_GET ['heimdalapm_customer'] ) && strlen ( $_GET ['heimdalapm_customer'] ) == 32 && is_numeric ( $_GET ['heimdalapm_shop'] ) && strlen ( $_GET ['heimdalapm_shop'] ) == 32 && strlen ( $_GET ['heimdalapm_password'] ) > 5) {
116
- update_option ( 'HEIMDALAPM_EMAIL', sanitize_email ( $_GET ['heimdalapm_email'] ) );
117
- update_option ( 'HEIMDALAPM_PASSWORD', $_GET ['heimdalapm_password'] );
 
118
  update_option ( 'HEIMDALAPM_CUSTOMER', $_GET ['heimdalapm_customer'] );
119
  update_option ( 'HEIMDALAPM_SHOP', $_GET ['heimdalapm_shop'] );
120
  } else {
@@ -128,6 +145,71 @@ function print_Vikinguard_management() {
128
 
129
  return mail_Vikinguard_Render ();
130
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
 
133
  <?php
@@ -263,7 +345,7 @@ function signup_Vikinguard_Render() {
263
  value="<?php echo bloginfo( 'name' ); ?>"> </input></li>
264
  <li><span class="heimdal-inp-hed"
265
  title="<?php esc_attr_e('Vikinguard is going to use this address to monitor the uptime of your shop. Please, check the http and https is correct configured. Do not use private or localhost address, use your public ip or domain to allow Vikinguard to access to your shop.', 'Vikinguard' );?>">
266
- Your Shop Address</span> <input type="url" id="signupShop"
267
  class="heimdal-inp"
268
  placeholder="<?php esc_attr_e('Shop URL', 'Vikinguard' );?>"
269
  required autofocus data-error="Customer" required name="customer"
@@ -299,6 +381,7 @@ add_action ( 'wp_head', 'add_Vikinguard_header' );
299
  if (is_admin ()) {
300
  load_plugin_textdomain ( 'Vikinguard', false, dirname ( plugin_basename ( __FILE__ ) ) . '/i18n' );
301
  add_action( 'admin_enqueue_scripts', 'wpb_adding_heimdal_scripts' );
 
302
  add_action ( 'admin_menu', 'add_Vikinguard_admin_page' );
303
  add_filter ( 'plugin_action_links_' . plugin_basename ( __FILE__ ), 'add_Vikinguard_action_links' );
304
  }
4
  * Plugin URI: https://www.vikinguard.com
5
  * Description: it checks your site uptime and real user experience. This module provides all the infomation about your site\'s perfomance.
6
  * Author: Vikinguard. This is not just a software company.
7
+ * Version: 2.0.0
8
  * Author URI: https://www.vikinguard.com
9
  */
10
 
11
+
12
+
13
  function wpb_adding_heimdal_scripts() {
14
+
15
  wp_register_script('heimdal', plugins_url ( 'heimdal.js', __FILE__ ));
16
  wp_enqueue_script('heimdal');
17
+
18
+
19
  }
20
 
21
+
22
+
23
+
24
+
25
  // Make sure we don't expose any info if called directly
26
  if (! function_exists ( 'add_action' )) {
27
  echo "Hi there! I'm just a plugin, not much I can do when called directly.";
43
  if (! is_admin () && strlen ( $customer ) > 0 && strlen ( $shop ) > 0) {
44
  ?>
45
 
46
+ <script src="https://d27t6aik270las.cloudfront.net/vikinguard.js"
47
  type="text/javascript"></script>
48
  <script type="text/javascript">
49
  BOOMR.init({
114
  update_option ( 'HEIMDALAPM_EMAIL_TMP', sanitize_email ( $_GET ['heimdalapm_email'] ) );
115
  return configuration_Vikinguard_Render ();
116
  }
117
+ if ($action == "multishop"){
118
+ // update_option ( 'HEIMDALAPM_EMAIL_TMP', sanitize_email ( $_GET ['heimdalapm_email'] ) );
119
+ update_option ( 'HEIMDALAPM_EMAIL', sanitize_email ( $_GET ['heimdalapm_email'] ) );
120
+ update_option ( 'HEIMDALAPM_PASSWORD', $_GET ['heimdalapm_password'] );
121
+ update_option ( 'HEIMDALAPM_CUSTOMER', $_GET ['heimdalapm_customer'] );
122
+ return multishop_render();
123
+ }
124
 
125
  if ($action == "configured" || ($configurationEmail != null || $configurationEmail != "") && ($configurationPassword != null || $configurationPassword != "") && ($customerid != null || $customerid != "") && ($shopid != null || $shopid != "")) {
126
  if ($action == "configured") {
128
  wp_cache_clear_cache ();
129
  }
130
 
131
+ if (is_email ( $_GET ['heimdalapm_email'] ) && is_numeric ( $_GET ['heimdalapm_customer'] ) && strlen ( $_GET ['heimdalapm_customer'] ) == 32 &&
132
+ is_numeric ( $_GET ['heimdalapm_shop'] ) && strlen ( $_GET ['heimdalapm_shop'] ) == 32 /*&& strlen ( $_GET ['heimdalapm_password'] ) > 5*/) {
133
+ // update_option ( 'HEIMDALAPM_EMAIL', sanitize_email ( $_GET ['heimdalapm_email'] ) );
134
+ // update_option ( 'HEIMDALAPM_PASSWORD', $_GET ['heimdalapm_password'] );
135
  update_option ( 'HEIMDALAPM_CUSTOMER', $_GET ['heimdalapm_customer'] );
136
  update_option ( 'HEIMDALAPM_SHOP', $_GET ['heimdalapm_shop'] );
137
  } else {
145
 
146
  return mail_Vikinguard_Render ();
147
  ?>
148
+
149
+ <?php
150
+ }
151
+ function multishop_render() {
152
+ ?>
153
+ <div class="wrap">
154
+ <img src="<?php echo plugins_url( 'heimdal.png', __FILE__ ); ?>"
155
+ alt="Heimdal logo" width="300px" />
156
+ <h2>VIKINGUARD</h2>
157
+ <hr />
158
+ <div id="register" class="form-signin">
159
+ <span class="heimdal-inp-hed"><?php esc_attr_e('Mail', 'Vikinguard' );?></span>
160
+ <span id="signupEmail"><?php echo get_option( 'HEIMDALAPM_EMAIL_TMP' );?></span>
161
+ <br>
162
+ <input type="checkbox" id="signupTerms"
163
+ data-error="<?php esc_attr_e('you must accept Vikinguard\'s terms', 'Vikinguard' );?>"
164
+ required name="agree" class="heimdal-inp-hed" checked="checked"><?php esc_attr_e('I agree to the ', 'Vikinguard' );?> <a
165
+ href="https://vikinguard.com/heimdal/EULA.html"> <?php esc_attr_e('Terms of Service.', 'Vikinguard' );?></a>
166
+ </input>
167
+ <div class="heimdal-form-pereira">
168
+ <h3 class="form-signin-heading"><?php esc_attr_e('Select an existing shop ...', 'Vikinguard' );?></h3>
169
+ <select id="multishop_selector" name="shop" class="heimdal--input">
170
+ <?php
171
+ $customer_info = stripcslashes($_GET ['heimdalapm_customer_info']);
172
+ $customer_info_decoded = json_decode($customer_info);
173
+
174
+ foreach ($customer_info_decoded->shops as $element) {
175
+ $desc = $element->shopName;
176
+ $desc .= " (";
177
+ $desc .= $element->shopURL;
178
+ $desc .= ")";
179
+ echo '<option value="'.$element->shopId.'">'.$desc.'</option>';
180
+ }
181
+
182
+ ?>
183
+ </select>
184
+ <input type="submit" class="heimdal--button" value="<?php esc_attr_e('Use this shop' , 'Vikinguard' );?>"
185
+ onclick='shopSelected("<?php echo get_option ( 'HEIMDALAPM_CUSTOMER' );?>","<?php esc_attr_e('You must accept the terms\n', 'Vikinguard' );?>");'>
186
+ <br><br><br>
187
+ </div>
188
+ <div class="heimdal-form-pereira">
189
+ <h3 class="form-signin-heading"><?php esc_attr_e('... or add a new one', 'Vikinguard' );?></h3>
190
+ <ul>
191
+ <li><span class="heimdal-inp-hed"
192
+ title="<?php esc_attr_e('This is just a name to refer to your shop.', 'Vikinguard' );?>"><?php esc_attr_e('Your New Shop Name', 'Vikinguard' );?></span>
193
+ <input type="text" id="addShopShopName" class="heimdal-inp"
194
+ placeholder="<?php esc_attr_e('Shop name', 'Vikinguard' );?>"
195
+ required autofocus data-error="Customer" required name="customer"
196
+ value="<?php echo bloginfo( 'name' ); ?>"> </input></li>
197
+ <li><span class="heimdal-inp-hed"
198
+ title="<?php esc_attr_e('Vikinguard is going to use this address to monitor the uptime of your shop. Please, check the http and https is correct configured. Do not use private or localhost address, use your public ip or domain to allow Vikinguard to access to your shop.', 'Vikinguard' );?>">
199
+ <?php esc_attr_e('Your new shop address', 'Vikinguard' );?></span>
200
+ <input type="url" id="addShopUrl" class="heimdal-inp"
201
+ placeholder="<?php esc_attr_e('Shop URL', 'Vikinguard' );?>"
202
+ required autofocus data-error="Customer" required name="customer"
203
+ value="<?php echo bloginfo( 'url' ); ?>"> </input></li>
204
+ <li><input id="enviar" class="heimdal--button"
205
+ onclick='addShop("<?php echo get_option( 'HEIMDALAPM_EMAIL_TMP' );?>","<?php echo get_option ( 'HEIMDALAPM_CUSTOMER' );?>","<?php echo get_option ( 'HEIMDALAPM_PASSWORD' );?>","<?php esc_attr_e('Shop Name too short' , 'Vikinguard');?>\n","<?php esc_attr_e('Short url must start by http:// or https://', 'Vikinguard' );?>\n","<?php esc_attr_e('We have noticed that you configured Vikinguard to monitor a demo/test environment (localhost or 127.0.0.1). Please note that without real traffic and no public URL, you will not be able to monitor neither uptime neither real user experience and you will lose some important functionalities of our tool', 'Vikinguard' );?>","<?php esc_attr_e('You must accept the terms\n', 'Vikinguard' );?>","<?php esc_attr_e('Communication problem. Please try again later.', 'Vikinguard' );?>");'
206
+ type="submit" value="<?php esc_attr_e('Add it!','Vikinguard' ) ?>"></input>
207
+
208
+ </li>
209
+ <br><br>
210
+ </ul>
211
+ </div>
212
+ </div>
213
 
214
 
215
  <?php
345
  value="<?php echo bloginfo( 'name' ); ?>"> </input></li>
346
  <li><span class="heimdal-inp-hed"
347
  title="<?php esc_attr_e('Vikinguard is going to use this address to monitor the uptime of your shop. Please, check the http and https is correct configured. Do not use private or localhost address, use your public ip or domain to allow Vikinguard to access to your shop.', 'Vikinguard' );?>">
348
+ <?php esc_attr_e('Your Shop Address', 'Vikinguard' );?></span> <input type="url" id="signupShop"
349
  class="heimdal-inp"
350
  placeholder="<?php esc_attr_e('Shop URL', 'Vikinguard' );?>"
351
  required autofocus data-error="Customer" required name="customer"
381
  if (is_admin ()) {
382
  load_plugin_textdomain ( 'Vikinguard', false, dirname ( plugin_basename ( __FILE__ ) ) . '/i18n' );
383
  add_action( 'admin_enqueue_scripts', 'wpb_adding_heimdal_scripts' );
384
+
385
  add_action ( 'admin_menu', 'add_Vikinguard_admin_page' );
386
  add_filter ( 'plugin_action_links_' . plugin_basename ( __FILE__ ), 'add_Vikinguard_action_links' );
387
  }