Login With Ajax - Version 3.0.2

Version Description

  • got rid of (hopefully all) php warnings
Download this release

Release Info

Developer netweblogic
Plugin Icon 128x128 Login With Ajax
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0.1 to 3.0.2

langs/login-with-ajax.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Translation of the WordPress plugin Login With Ajax 2.1.5 by NetWebLogic.
2
  # Copyright (C) 2010 NetWebLogic
3
  # This file is distributed under the same license as the Login With Ajax package.
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
@@ -6,9 +6,9 @@
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: Login With Ajax 2.1.5\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/login-with-ajax\n"
11
- "POT-Creation-Date: 2010-05-11 11:44+0000\n"
12
  "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,37 +16,43 @@ msgstr ""
16
  "Content-Type: text/plain; charset=utf-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
- #: login-with-ajax-admin.php:68
20
- msgid "Changes saved."
 
 
21
  msgstr ""
22
 
23
- #: login-with-ajax-admin.php:72
24
- msgid "There were issues when saving your settings. Please try again."
25
  msgstr ""
26
 
27
- #: login-with-ajax-admin.php:101
28
- msgid "Default Template"
29
  msgstr ""
30
 
31
- #: login-with-ajax-admin.php:105 login-with-ajax-widget.php:34
32
- msgid "default"
33
  msgstr ""
34
 
35
- #: login-with-ajax-admin.php:111
 
 
 
 
36
  msgid ""
37
  "Choose the default theme you'd like to use. This can be overriden in the "
38
  "widget, shortcode and template tags."
39
  msgstr ""
40
 
41
- #: login-with-ajax-admin.php:112
42
  msgid "Further documentation for this feature coming soon..."
43
  msgstr ""
44
 
45
- #: login-with-ajax-admin.php:117
46
  msgid "Disable refresh upon login?"
47
  msgstr ""
48
 
49
- #: login-with-ajax-admin.php:122
50
  msgid ""
51
  "If the user logs in and you check the button above, only the login widget "
52
  "will update itself without refreshing the page. Not a good idea if your site "
@@ -54,68 +60,136 @@ msgid ""
54
  "needed."
55
  msgstr ""
56
 
57
- #: login-with-ajax-admin.php:123
58
  msgid ""
59
  "<strong>Experimental and not fully tested!</strong> please test and report "
60
  "any bugs on our forum."
61
  msgstr ""
62
 
63
- #: login-with-ajax-admin.php:128
 
 
 
 
64
  msgid "Global Login Redirect"
65
  msgstr ""
66
 
67
- #: login-with-ajax-admin.php:132
68
  msgid ""
69
  "If you'd like to send the user to a specific URL after login, enter it here "
70
  "(e.g. http://wordpress.org/)"
71
  msgstr ""
72
 
73
- #: login-with-ajax-admin.php:133 login-with-ajax-admin.php:143
74
  msgid "New!"
75
  msgstr ""
76
 
77
- #: login-with-ajax-admin.php:133
78
  msgid ""
79
  "Use %USERNAME% and it will be replaced with the username of person logging "
80
  "in."
81
  msgstr ""
82
 
83
- #: login-with-ajax-admin.php:138
84
  msgid "Global Logout Redirect"
85
  msgstr ""
86
 
87
- #: login-with-ajax-admin.php:142
88
  msgid ""
89
  "If you'd like to send the user to a specific URL after logout, enter it here "
90
  "(e.g. http://wordpress.org/)"
91
  msgstr ""
92
 
93
- #: login-with-ajax-admin.php:143
94
  msgid ""
95
  "Enter %LASTURL% to send the user back to the page they were previously on."
96
  msgstr ""
97
 
98
- #: login-with-ajax-admin.php:148
99
  msgid "Role-Based Custom Login Redirects"
100
  msgstr ""
101
 
102
- #: login-with-ajax-admin.php:151
103
  msgid ""
104
  "If you would like a specific user role to be redirected to a custom URL upon "
105
  "login, place it here (blank value will default to the global redirect)"
106
  msgstr ""
107
 
108
- #: login-with-ajax-admin.php:171
109
  msgid "Role-Based Custom Logout Redirects"
110
  msgstr ""
111
 
112
- #: login-with-ajax-admin.php:174
113
  msgid ""
114
  "If you would like a specific user role to be redirected to a custom URL upon "
115
  "logout, place it here (blank value will default to the global redirect)"
116
  msgstr ""
117
 
118
- #: login-with-ajax-admin.php:198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  msgid "Save Changes"
120
  msgstr ""
121
 
@@ -128,85 +202,139 @@ msgid "Show profile link?"
128
  msgstr ""
129
 
130
  #: login-with-ajax-widget.php:32
 
 
 
 
131
  msgid "Template"
132
  msgstr ""
133
 
134
- #: login-with-ajax.php:153
135
  msgid "Login Successful, redirecting..."
136
  msgstr ""
137
 
138
- #: login-with-ajax.php:168
139
  msgid "Login successful, updating..."
140
  msgstr ""
141
 
142
- #: login-with-ajax.php:178 login-with-ajax.php:201
143
  msgid "An undefined error has ocurred"
144
  msgstr ""
145
 
146
- #: login-with-ajax.php:192
 
 
 
 
 
 
 
 
147
  msgid "We have sent you an email"
148
  msgstr ""
149
 
150
- #: widget/widget_in.php:11 widget/widget_in.php:14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  msgid "Hi"
152
  msgstr ""
153
 
154
- #: widget/widget_in.php:33
155
  msgid "Profile"
156
  msgstr ""
157
 
158
- #: widget/widget_in.php:38
159
  msgid "Log Out"
160
  msgstr ""
161
 
162
- #: widget/widget_in.php:43
163
  msgid "blog admin"
164
  msgstr ""
165
 
166
- #: widget/widget_out.php:10 widget/widget_out.php:35
167
  msgid "Log In"
168
  msgstr ""
169
 
170
- #: widget/widget_out.php:19
171
  msgid "Username"
172
  msgstr ""
173
 
174
- #: widget/widget_out.php:27
175
  msgid "Password"
176
  msgstr ""
177
 
178
- #: widget/widget_out.php:41
179
  msgid "Remember Me"
180
  msgstr ""
181
 
182
- #: widget/widget_out.php:43
183
  msgid "Password Lost and Found"
184
  msgstr ""
185
 
186
- #: widget/widget_out.php:43
187
  msgid "Lost your password?"
188
  msgstr ""
189
 
190
- #: widget/widget_out.php:56
191
  msgid "Register"
192
  msgstr ""
193
 
194
- #: widget/widget_out.php:68
195
  msgid "Forgotten Password"
196
  msgstr ""
197
 
198
- #: widget/widget_out.php:73
199
  msgid "Enter username or email"
200
  msgstr ""
201
 
202
- #: widget/widget_out.php:79
203
  msgid "Get New Password"
204
  msgstr ""
205
 
206
- #: widget/widget_out.php:80
207
  msgid "Cancel"
208
  msgstr ""
209
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  #. Plugin Name of the plugin/theme
211
  msgid "Login With Ajax"
212
  msgstr ""
1
+ # Translation of the WordPress plugin Login With Ajax 3.0.2 by NetWebLogic.
2
  # Copyright (C) 2010 NetWebLogic
3
  # This file is distributed under the same license as the Login With Ajax package.
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
+ "Project-Id-Version: Login With Ajax 3.0.2\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/login-with-ajax\n"
11
+ "POT-Creation-Date: 2010-11-29 14:04+0000\n"
12
  "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
  "Content-Type: text/plain; charset=utf-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
+ #: login-with-ajax-admin.php:44
20
+ msgid ""
21
+ "New features in Login With AJAX (including registration!), check out the "
22
+ "settings and widget pages!"
23
  msgstr ""
24
 
25
+ #: login-with-ajax-admin.php:46
26
+ msgid "Dismiss"
27
  msgstr ""
28
 
29
+ #: login-with-ajax-admin.php:92
30
+ msgid "Changes saved."
31
  msgstr ""
32
 
33
+ #: login-with-ajax-admin.php:135
34
+ msgid "General Settings"
35
  msgstr ""
36
 
37
+ #: login-with-ajax-admin.php:141
38
+ msgid "Default Template"
39
+ msgstr ""
40
+
41
+ #: login-with-ajax-admin.php:150
42
  msgid ""
43
  "Choose the default theme you'd like to use. This can be overriden in the "
44
  "widget, shortcode and template tags."
45
  msgstr ""
46
 
47
+ #: login-with-ajax-admin.php:151
48
  msgid "Further documentation for this feature coming soon..."
49
  msgstr ""
50
 
51
+ #: login-with-ajax-admin.php:157
52
  msgid "Disable refresh upon login?"
53
  msgstr ""
54
 
55
+ #: login-with-ajax-admin.php:162
56
  msgid ""
57
  "If the user logs in and you check the button above, only the login widget "
58
  "will update itself without refreshing the page. Not a good idea if your site "
60
  "needed."
61
  msgstr ""
62
 
63
+ #: login-with-ajax-admin.php:163
64
  msgid ""
65
  "<strong>Experimental and not fully tested!</strong> please test and report "
66
  "any bugs on our forum."
67
  msgstr ""
68
 
69
+ #: login-with-ajax-admin.php:168
70
+ msgid "Redirection Settings"
71
+ msgstr ""
72
+
73
+ #: login-with-ajax-admin.php:173
74
  msgid "Global Login Redirect"
75
  msgstr ""
76
 
77
+ #: login-with-ajax-admin.php:177
78
  msgid ""
79
  "If you'd like to send the user to a specific URL after login, enter it here "
80
  "(e.g. http://wordpress.org/)"
81
  msgstr ""
82
 
83
+ #: login-with-ajax-admin.php:178 login-with-ajax-admin.php:188
84
  msgid "New!"
85
  msgstr ""
86
 
87
+ #: login-with-ajax-admin.php:178
88
  msgid ""
89
  "Use %USERNAME% and it will be replaced with the username of person logging "
90
  "in."
91
  msgstr ""
92
 
93
+ #: login-with-ajax-admin.php:183
94
  msgid "Global Logout Redirect"
95
  msgstr ""
96
 
97
+ #: login-with-ajax-admin.php:187
98
  msgid ""
99
  "If you'd like to send the user to a specific URL after logout, enter it here "
100
  "(e.g. http://wordpress.org/)"
101
  msgstr ""
102
 
103
+ #: login-with-ajax-admin.php:188
104
  msgid ""
105
  "Enter %LASTURL% to send the user back to the page they were previously on."
106
  msgstr ""
107
 
108
+ #: login-with-ajax-admin.php:193
109
  msgid "Role-Based Custom Login Redirects"
110
  msgstr ""
111
 
112
+ #: login-with-ajax-admin.php:196
113
  msgid ""
114
  "If you would like a specific user role to be redirected to a custom URL upon "
115
  "login, place it here (blank value will default to the global redirect)"
116
  msgstr ""
117
 
118
+ #: login-with-ajax-admin.php:216
119
  msgid "Role-Based Custom Logout Redirects"
120
  msgstr ""
121
 
122
+ #: login-with-ajax-admin.php:219
123
  msgid ""
124
  "If you would like a specific user role to be redirected to a custom URL upon "
125
  "logout, place it here (blank value will default to the global redirect)"
126
  msgstr ""
127
 
128
+ #: login-with-ajax-admin.php:239
129
+ msgid "Notification Settings"
130
+ msgstr ""
131
+
132
+ #: login-with-ajax-admin.php:241
133
+ msgid ""
134
+ "If you'd like to override the default Wordpress email users receive once "
135
+ "registered, make sure you check the box below and enter a new email subject "
136
+ "and message"
137
+ msgstr ""
138
+
139
+ #: login-with-ajax-admin.php:242
140
+ msgid ""
141
+ "If this feature doesn't work, please make sure that you don't have another "
142
+ "plugin installed which also manages user registrations (e.g. BuddyPress and "
143
+ "MU)."
144
+ msgstr ""
145
+
146
+ #: login-with-ajax-admin.php:248
147
+ msgid "Override Default Email?"
148
+ msgstr ""
149
+
150
+ #: login-with-ajax-admin.php:256
151
+ msgid "Subject"
152
+ msgstr ""
153
+
154
+ #: login-with-ajax-admin.php:261
155
+ msgid "Your registration at %BLOGNAME%"
156
+ msgstr ""
157
+
158
+ #: login-with-ajax-admin.php:265
159
+ msgid "<code>%USERNAME%</code> will be replaced with a username."
160
+ msgstr ""
161
+
162
+ #: login-with-ajax-admin.php:266
163
+ msgid "<code>%PASSWORD%</code> will be replaced with the user's password."
164
+ msgstr ""
165
+
166
+ #: login-with-ajax-admin.php:267 login-with-ajax-admin.php:291
167
+ msgid "<code>%BLOGNAME%</code> will be replaced with the name of your blog."
168
+ msgstr ""
169
+
170
+ #: login-with-ajax-admin.php:268 login-with-ajax-admin.php:292
171
+ msgid "<code>%BLOGURL%</code> will be replaced with the url of your blog."
172
+ msgstr ""
173
+
174
+ #: login-with-ajax-admin.php:273
175
+ msgid "Message"
176
+ msgstr ""
177
+
178
+ #: login-with-ajax-admin.php:278
179
+ msgid ""
180
+ "Thanks for signing up to our blog. \r\n"
181
+ "\r\n"
182
+ "You can login with the following credentials by visiting %BLOGURL%\r\n"
183
+ "\r\n"
184
+ "Username : %USERNAME%\r\n"
185
+ "Password : %PASSWORD%\r\n"
186
+ "\r\n"
187
+ "We look forward to your next visit!\r\n"
188
+ "\r\n"
189
+ "The team at %BLOGNAME%"
190
+ msgstr ""
191
+
192
+ #: login-with-ajax-admin.php:301
193
  msgid "Save Changes"
194
  msgstr ""
195
 
202
  msgstr ""
203
 
204
  #: login-with-ajax-widget.php:32
205
+ msgid "AJAX Registration?"
206
+ msgstr ""
207
+
208
+ #: login-with-ajax-widget.php:37
209
  msgid "Template"
210
  msgstr ""
211
 
212
+ #: login-with-ajax.php:177
213
  msgid "Login Successful, redirecting..."
214
  msgstr ""
215
 
216
+ #: login-with-ajax.php:189
217
  msgid "Login successful, updating..."
218
  msgstr ""
219
 
220
+ #: login-with-ajax.php:199 login-with-ajax.php:251
221
  msgid "An undefined error has ocurred"
222
  msgstr ""
223
 
224
+ #: login-with-ajax.php:203
225
+ msgid "Please supply your username and password."
226
+ msgstr ""
227
+
228
+ #: login-with-ajax.php:222
229
+ msgid "Registration complete. Please check your e-mail."
230
+ msgstr ""
231
+
232
+ #: login-with-ajax.php:242
233
  msgid "We have sent you an email"
234
  msgstr ""
235
 
236
+ #: pluggable.php:25
237
+ #, php-format
238
+ msgid "New user registration on your blog %s:"
239
+ msgstr ""
240
+
241
+ #: pluggable.php:26 pluggable.php:40
242
+ #, php-format
243
+ msgid "Username: %s"
244
+ msgstr ""
245
+
246
+ #: pluggable.php:27
247
+ #, php-format
248
+ msgid "E-mail: %s"
249
+ msgstr ""
250
+
251
+ #: pluggable.php:29
252
+ #, php-format
253
+ msgid "[%s] New User Registration"
254
+ msgstr ""
255
+
256
+ #: pluggable.php:41
257
+ #, php-format
258
+ msgid "Password: %s"
259
+ msgstr ""
260
+
261
+ #: pluggable.php:44
262
+ #, php-format
263
+ msgid "[%s] Your username and password"
264
+ msgstr ""
265
+
266
+ #: widget/default/widget_in.php:11 widget/default/widget_in.php:14
267
  msgid "Hi"
268
  msgstr ""
269
 
270
+ #: widget/default/widget_in.php:35 widget/default/widget_in.php:39
271
  msgid "Profile"
272
  msgstr ""
273
 
274
+ #: widget/default/widget_in.php:45
275
  msgid "Log Out"
276
  msgstr ""
277
 
278
+ #: widget/default/widget_in.php:50
279
  msgid "blog admin"
280
  msgstr ""
281
 
282
+ #: widget/default/widget_out.php:10 widget/default/widget_out.php:35
283
  msgid "Log In"
284
  msgstr ""
285
 
286
+ #: widget/default/widget_out.php:19 widget/default/widget_out.php:93
287
  msgid "Username"
288
  msgstr ""
289
 
290
+ #: widget/default/widget_out.php:27
291
  msgid "Password"
292
  msgstr ""
293
 
294
+ #: widget/default/widget_out.php:41
295
  msgid "Remember Me"
296
  msgstr ""
297
 
298
+ #: widget/default/widget_out.php:43
299
  msgid "Password Lost and Found"
300
  msgstr ""
301
 
302
+ #: widget/default/widget_out.php:43
303
  msgid "Lost your password?"
304
  msgstr ""
305
 
306
+ #: widget/default/widget_out.php:56 widget/default/widget_out.php:102
307
  msgid "Register"
308
  msgstr ""
309
 
310
+ #: widget/default/widget_out.php:68
311
  msgid "Forgotten Password"
312
  msgstr ""
313
 
314
+ #: widget/default/widget_out.php:73
315
  msgid "Enter username or email"
316
  msgstr ""
317
 
318
+ #: widget/default/widget_out.php:79
319
  msgid "Get New Password"
320
  msgstr ""
321
 
322
+ #: widget/default/widget_out.php:80
323
  msgid "Cancel"
324
  msgstr ""
325
 
326
+ #: widget/default/widget_out.php:90
327
+ msgid "Register For This Site"
328
+ msgstr ""
329
+
330
+ #: widget/default/widget_out.php:97
331
+ msgid "E-mail"
332
+ msgstr ""
333
+
334
+ #: widget/default/widget_out.php:101
335
+ msgid "A password will be e-mailed to you."
336
+ msgstr ""
337
+
338
  #. Plugin Name of the plugin/theme
339
  msgid "Login With Ajax"
340
  msgstr ""
login-with-ajax-admin.php CHANGED
@@ -22,7 +22,7 @@ class LoginWithAjaxAdmin{
22
  function LoginWithAjaxAdmin() {
23
  global $user_level;
24
  add_action ( 'admin_menu', array (&$this, 'menus') );
25
- if( $_GET['lwa_dismiss_notice'] == '1' ){
26
  update_option('lwa_notice', 1);
27
  }elseif( get_option('lwa_notice') != 1 && $user_level == 10 ){
28
  add_action('admin_notices', array(&$this, 'admin_notices') );
@@ -30,7 +30,7 @@ class LoginWithAjaxAdmin{
30
  }
31
 
32
  function menus(){
33
- $page = add_options_page('Login With Ajax', 'Login With Ajax', 8, 'login-with-ajax', array(&$this,'options'));
34
  add_action('admin_head-'.$page, array(&$this,'options_head'));
35
  }
36
 
@@ -65,7 +65,7 @@ class LoginWithAjaxAdmin{
65
  add_option('lwa_data');
66
  $lwa_data = array();
67
 
68
- if( is_admin() and $_POST['lwasubmitted']==1 ){
69
  //Build the array of options here
70
  foreach ($_POST as $postKey => $postValue){
71
  if( $postValue != '' && preg_match('/lwa_role_log(in|out)_/', $postKey) ){
@@ -85,7 +85,9 @@ class LoginWithAjaxAdmin{
85
  }
86
  }
87
  update_option('lwa_data', $lwa_data);
88
- update_option('lwa_notification_override',$_POST['lwa_notification_override']);
 
 
89
  ?>
90
  <div class="updated"><p><strong><?php _e('Changes saved.'); ?></strong></p></div>
91
  <?php
@@ -141,7 +143,7 @@ class LoginWithAjaxAdmin{
141
  <td>
142
  <select name="lwa_template" style="margin:0px; padding:0px; width:auto;">
143
  <?php foreach( array_keys($LoginWithAjax->templates) as $template ): ?>
144
- <option <?php echo ($lwa_data['template'] == $template) ? 'selected="selected"':""; ?>><?php echo $template ?></option>
145
  <?php endforeach; ?>
146
  </select>
147
  <br />
@@ -155,7 +157,7 @@ class LoginWithAjaxAdmin{
155
  <label><?php _e("Disable refresh upon login?", 'login-with-ajax'); ?></label>
156
  </td>
157
  <td>
158
- <input style="margin:0px; padding:0px; width:auto;" type="checkbox" name="lwa_no_login_refresh" value='1' class='wide' <?php echo ( $lwa_data['no_login_refresh'] == '1' ) ? 'checked="checked"':''; ?> />
159
  <br />
160
  <i><?php _e("If the user logs in and you check the button above, only the login widget will update itself without refreshing the page. Not a good idea if your site shows different content to users once logged in, as a refresh would be needed.", 'login-with-ajax'); ?></i>
161
  <i><?php _e("<strong>Experimental and not fully tested!</strong> please test and report any bugs on our forum.", 'login-with-ajax'); ?></i>
@@ -171,7 +173,7 @@ class LoginWithAjaxAdmin{
171
  <label><?php _e("Global Login Redirect", 'login-with-ajax'); ?></label>
172
  </td>
173
  <td>
174
- <input type="text" name="lwa_login_redirect" value='<?php echo $lwa_data['login_redirect'] ?>' class='wide' />
175
  <i><?php _e("If you'd like to send the user to a specific URL after login, enter it here (e.g. http://wordpress.org/)", 'login-with-ajax'); ?></i>
176
  <br/><i><strong><?php _e("New!", 'login-with-ajax'); ?></strong> <?php _e("Use %USERNAME% and it will be replaced with the username of person logging in.", 'login-with-ajax'); ?></i>
177
  </td>
@@ -181,7 +183,7 @@ class LoginWithAjaxAdmin{
181
  <label><?php _e("Global Logout Redirect", 'login-with-ajax'); ?></label>
182
  </td>
183
  <td>
184
- <input type="text" name="lwa_logout_redirect" value='<?php echo $lwa_data['logout_redirect'] ?>' class='wide' />
185
  <i><?php _e("If you'd like to send the user to a specific URL after logout, enter it here (e.g. http://wordpress.org/)", 'login-with-ajax'); ?></i>
186
  <br /><i><strong><?php _e("New!", 'login-with-ajax'); ?></strong> <?php _e("Enter %LASTURL% to send the user back to the page they were previously on.", 'login-with-ajax'); ?></i>
187
  </td>
@@ -197,7 +199,7 @@ class LoginWithAjaxAdmin{
197
  //Taken from /wp-admin/includes/template.php Line 2715
198
  $editable_roles = get_editable_roles();
199
  foreach( $editable_roles as $role => $details ) {
200
- $role_login = ( is_array($lwa_data['role_login']) && array_key_exists($role, $lwa_data['role_login']) ) ? $lwa_data['role_login'][$role]:''
201
  ?>
202
  <tr>
203
  <td class="col"><?php echo translate_user_role($details['name']) ?></td>
@@ -220,7 +222,7 @@ class LoginWithAjaxAdmin{
220
  //Taken from /wp-admin/includes/template.php Line 2715
221
  $editable_roles = get_editable_roles();
222
  foreach( $editable_roles as $role => $details ) {
223
- $role_logout = ( is_array($lwa_data['role_logout']) && array_key_exists($role, $lwa_data['role_logout']) ) ? $lwa_data['role_logout'][$role]:''
224
  ?>
225
  <tr>
226
  <td class='col'><?php echo translate_user_role($details['name']) ?></td>
@@ -246,7 +248,7 @@ class LoginWithAjaxAdmin{
246
  <label><?php _e("Override Default Email?", 'login-with-ajax'); ?></label>
247
  </td>
248
  <td>
249
- <input style="margin:0px; padding:0px; width:auto;" type="checkbox" name="lwa_notification_override" value='1' class='wide' <?php echo ( $lwa_data['notification_override'] == '1' ) ? 'checked="checked"':''; ?> />
250
  </td>
251
  </tr>
252
  <tr valign="top">
@@ -255,11 +257,11 @@ class LoginWithAjaxAdmin{
255
  </td>
256
  <td>
257
  <?php
258
- if($lwa_data['notification_subject'] == ''){
259
  $lwa_data['notification_subject'] = __('Your registration at %BLOGNAME%', 'login-with-ajax');
260
  }
261
  ?>
262
- <input type="text" name="lwa_notification_subject" value='<?php echo $lwa_data['notification_subject'] ?>' class='wide' />
263
  <i><?php _e("<code>%USERNAME%</code> will be replaced with a username.", 'login-with-ajax'); ?></i><br />
264
  <i><?php _e("<code>%PASSWORD%</code> will be replaced with the user's password.", 'login-with-ajax'); ?></i><br />
265
  <i><?php _e("<code>%BLOGNAME%</code> will be replaced with the name of your blog.", 'login-with-ajax'); ?></i>
@@ -272,7 +274,7 @@ class LoginWithAjaxAdmin{
272
  </td>
273
  <td>
274
  <?php
275
- if($lwa_data['notification_message'] == ''){
276
  $lwa_data['notification_message'] = __('Thanks for signing up to our blog.
277
 
278
  You can login with the following credentials by visiting %BLOGURL%
22
  function LoginWithAjaxAdmin() {
23
  global $user_level;
24
  add_action ( 'admin_menu', array (&$this, 'menus') );
25
+ if( !empty($_GET['lwa_dismiss_notice']) && $_GET['lwa_dismiss_notice'] == '1' ){
26
  update_option('lwa_notice', 1);
27
  }elseif( get_option('lwa_notice') != 1 && $user_level == 10 ){
28
  add_action('admin_notices', array(&$this, 'admin_notices') );
30
  }
31
 
32
  function menus(){
33
+ $page = add_options_page('Login With Ajax', 'Login With Ajax', 'manage_options', 'login-with-ajax', array(&$this,'options'));
34
  add_action('admin_head-'.$page, array(&$this,'options_head'));
35
  }
36
 
65
  add_option('lwa_data');
66
  $lwa_data = array();
67
 
68
+ if( is_admin() && !empty($_POST['lwasubmitted']) ){
69
  //Build the array of options here
70
  foreach ($_POST as $postKey => $postValue){
71
  if( $postValue != '' && preg_match('/lwa_role_log(in|out)_/', $postKey) ){
85
  }
86
  }
87
  update_option('lwa_data', $lwa_data);
88
+ if( !empty($_POST['lwa_notification_override']) ){
89
+ update_option('lwa_notification_override',$_POST['lwa_notification_override']);
90
+ }
91
  ?>
92
  <div class="updated"><p><strong><?php _e('Changes saved.'); ?></strong></p></div>
93
  <?php
143
  <td>
144
  <select name="lwa_template" style="margin:0px; padding:0px; width:auto;">
145
  <?php foreach( array_keys($LoginWithAjax->templates) as $template ): ?>
146
+ <option <?php echo (!empty($lwa_data['template']) && $lwa_data['template'] == $template) ? 'selected="selected"':""; ?>><?php echo $template ?></option>
147
  <?php endforeach; ?>
148
  </select>
149
  <br />
157
  <label><?php _e("Disable refresh upon login?", 'login-with-ajax'); ?></label>
158
  </td>
159
  <td>
160
+ <input style="margin:0px; padding:0px; width:auto;" type="checkbox" name="lwa_no_login_refresh" value='1' class='wide' <?php echo ( !empty($lwa_data['no_login_refresh']) && $lwa_data['no_login_refresh'] == '1' ) ? 'checked="checked"':''; ?> />
161
  <br />
162
  <i><?php _e("If the user logs in and you check the button above, only the login widget will update itself without refreshing the page. Not a good idea if your site shows different content to users once logged in, as a refresh would be needed.", 'login-with-ajax'); ?></i>
163
  <i><?php _e("<strong>Experimental and not fully tested!</strong> please test and report any bugs on our forum.", 'login-with-ajax'); ?></i>
173
  <label><?php _e("Global Login Redirect", 'login-with-ajax'); ?></label>
174
  </td>
175
  <td>
176
+ <input type="text" name="lwa_login_redirect" value='<?php echo (!empty($lwa_data['login_redirect'])) ? $lwa_data['login_redirect']:''; ?>' class='wide' />
177
  <i><?php _e("If you'd like to send the user to a specific URL after login, enter it here (e.g. http://wordpress.org/)", 'login-with-ajax'); ?></i>
178
  <br/><i><strong><?php _e("New!", 'login-with-ajax'); ?></strong> <?php _e("Use %USERNAME% and it will be replaced with the username of person logging in.", 'login-with-ajax'); ?></i>
179
  </td>
183
  <label><?php _e("Global Logout Redirect", 'login-with-ajax'); ?></label>
184
  </td>
185
  <td>
186
+ <input type="text" name="lwa_logout_redirect" value='<?php echo (!empty($lwa_data['logout_redirect'])) ? $lwa_data['logout_redirect']:''; ?>' class='wide' />
187
  <i><?php _e("If you'd like to send the user to a specific URL after logout, enter it here (e.g. http://wordpress.org/)", 'login-with-ajax'); ?></i>
188
  <br /><i><strong><?php _e("New!", 'login-with-ajax'); ?></strong> <?php _e("Enter %LASTURL% to send the user back to the page they were previously on.", 'login-with-ajax'); ?></i>
189
  </td>
199
  //Taken from /wp-admin/includes/template.php Line 2715
200
  $editable_roles = get_editable_roles();
201
  foreach( $editable_roles as $role => $details ) {
202
+ $role_login = ( !empty($lwa_data['role_login']) && is_array($lwa_data['role_login']) && array_key_exists($role, $lwa_data['role_login']) ) ? $lwa_data['role_login'][$role]:''
203
  ?>
204
  <tr>
205
  <td class="col"><?php echo translate_user_role($details['name']) ?></td>
222
  //Taken from /wp-admin/includes/template.php Line 2715
223
  $editable_roles = get_editable_roles();
224
  foreach( $editable_roles as $role => $details ) {
225
+ $role_logout = ( !empty($lwa_data['role_logout']) && is_array($lwa_data['role_logout']) && array_key_exists($role, $lwa_data['role_logout']) ) ? $lwa_data['role_logout'][$role]:''
226
  ?>
227
  <tr>
228
  <td class='col'><?php echo translate_user_role($details['name']) ?></td>
248
  <label><?php _e("Override Default Email?", 'login-with-ajax'); ?></label>
249
  </td>
250
  <td>
251
+ <input style="margin:0px; padding:0px; width:auto;" type="checkbox" name="lwa_notification_override" value='1' class='wide' <?php echo ( !empty($lwa_data['notification_override']) && $lwa_data['notification_override'] == '1' ) ? 'checked="checked"':''; ?> />
252
  </td>
253
  </tr>
254
  <tr valign="top">
257
  </td>
258
  <td>
259
  <?php
260
+ if(empty($lwa_data['notification_subject'])){
261
  $lwa_data['notification_subject'] = __('Your registration at %BLOGNAME%', 'login-with-ajax');
262
  }
263
  ?>
264
+ <input type="text" name="lwa_notification_subject" value='<?php echo (!empty($lwa_data['notification_subject'])) ? $lwa_data['notification_subject'] : ''; ?>' class='wide' />
265
  <i><?php _e("<code>%USERNAME%</code> will be replaced with a username.", 'login-with-ajax'); ?></i><br />
266
  <i><?php _e("<code>%PASSWORD%</code> will be replaced with the user's password.", 'login-with-ajax'); ?></i><br />
267
  <i><?php _e("<code>%BLOGNAME%</code> will be replaced with the name of your blog.", 'login-with-ajax'); ?></i>
274
  </td>
275
  <td>
276
  <?php
277
+ if( empty($lwa_data['notification_message']) ){
278
  $lwa_data['notification_message'] = __('Thanks for signing up to our blog.
279
 
280
  You can login with the following credentials by visiting %BLOGURL%
login-with-ajax.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Login With Ajax
4
  Plugin URI: http://netweblogic.com/wordpress/plugins/login-with-ajax/
5
  Description: Ajax driven login widget. Customisable from within your template folder, and advanced settings from the admin area.
6
  Author: NetWebLogic
7
- Version: 3.0.1
8
  Author URI: http://netweblogic.com/
9
  Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
10
 
@@ -101,9 +101,9 @@ class LoginWithAjax {
101
  if ( isset($_REQUEST["login-with-ajax"]) ) { //AJAX Request
102
  $this->ajax();
103
  }elseif ( isset($_REQUEST["login-with-ajax-widget"]) ) { //Widget Request via AJAX
104
- $instance = ( $_REQUEST["template"] != '' ) ? array('template' => $_REQUEST["template"]) : array();
105
  $instance['is_widget'] = false;
106
- $instance['profile_link'] = $_REQUEST['lwa_profile_link'];
107
  $this->widget( array(), $instance );
108
  exit();
109
  }elseif ( function_exists('register_widget') ){ //WP < 2.8 safety check
@@ -181,7 +181,7 @@ class LoginWithAjax {
181
  $return['redirect'] = $redirect;
182
  }
183
  //If the widget should just update with ajax, then supply the URL here.
184
- if( $this->data['no_login_refresh'] == 1 ){
185
  //Is this coming from a template?
186
  $query_vars = ($_GET['template'] != '') ? "&template={$_GET['template']}" : '';
187
  $query_vars .= ($_REQUEST['lwa_profile_link'] == '1') ? "&lwa_profile_link=1" : '';
@@ -211,7 +211,7 @@ class LoginWithAjax {
211
  * @return string
212
  */
213
  function register(){
214
- if( '1' == $_REQUEST['lwa'] ) {
215
  $return = array();
216
  if ('POST' == $_SERVER['REQUEST_METHOD']) {
217
  require_once( ABSPATH . WPINC . '/registration.php');
@@ -268,14 +268,14 @@ class LoginWithAjax {
268
 
269
  function getLogoutRedirect(){
270
  $data = $this->data;
271
- if($data['logout_redirect'] != ''){
272
  $redirect = $data['logout_redirect'];
273
  }
274
  if( strtolower(get_class($this->current_user)) == "wp_user" ){
275
  //Do a redirect if necessary
276
  $data = $this->data;
277
  $user_role = array_shift($this->current_user->roles); //Checking for role-based redirects
278
- if( isset($data["role_logout"][$user_role]) ){
279
  $redirect = $data["role_logout"][$user_role];
280
  }
281
  }
@@ -326,7 +326,7 @@ class LoginWithAjax {
326
  $lwa_data['profile_link'] = ( $lwa_data['profile_link'] != false && $lwa_data['profile_link'] != "false" );
327
  $is_widget = ( isset($lwa_data['is_widget']) ) ? ($lwa_data['is_widget'] != false && $lwa_data['is_widget'] != "false") : true ;
328
  //Add template logic
329
- $this->template = ( array_key_exists($lwa_data['template'], $this->templates) ) ? $lwa_data['template']:'default';
330
  //Choose the widget content to display.
331
  if(is_user_logged_in()){
332
  //Firstly check for template in theme with no template folder (legacy)
@@ -456,7 +456,7 @@ class LoginWithAjax {
456
  }
457
  }
458
  //Add translation
459
- load_plugin_textdomain('login-with-ajax', "/wp-content/plugins/login-with-ajax/langs/");
460
 
461
  //Include admin file if needed
462
  if(is_admin()){
@@ -467,7 +467,7 @@ include_once('login-with-ajax-widget.php');
467
 
468
  //Include pluggable functions file if user specifies in settings
469
  $lwa_data = get_option('lwa_data');
470
- if( $lwa_data['notification_override'] == '1' ){
471
  include_once('pluggable.php');
472
  }
473
 
4
  Plugin URI: http://netweblogic.com/wordpress/plugins/login-with-ajax/
5
  Description: Ajax driven login widget. Customisable from within your template folder, and advanced settings from the admin area.
6
  Author: NetWebLogic
7
+ Version: 3.0.2
8
  Author URI: http://netweblogic.com/
9
  Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
10
 
101
  if ( isset($_REQUEST["login-with-ajax"]) ) { //AJAX Request
102
  $this->ajax();
103
  }elseif ( isset($_REQUEST["login-with-ajax-widget"]) ) { //Widget Request via AJAX
104
+ $instance = ( !empty($_REQUEST["template"]) ) ? array('template' => $_REQUEST["template"]) : array();
105
  $instance['is_widget'] = false;
106
+ $instance['profile_link'] = ( !empty($_REQUEST["lwa_profile_link"]) ) ? $_REQUEST['lwa_profile_link']:0;
107
  $this->widget( array(), $instance );
108
  exit();
109
  }elseif ( function_exists('register_widget') ){ //WP < 2.8 safety check
181
  $return['redirect'] = $redirect;
182
  }
183
  //If the widget should just update with ajax, then supply the URL here.
184
+ if( !empty($this->data['no_login_refresh']) && $this->data['no_login_refresh'] == 1 ){
185
  //Is this coming from a template?
186
  $query_vars = ($_GET['template'] != '') ? "&template={$_GET['template']}" : '';
187
  $query_vars .= ($_REQUEST['lwa_profile_link'] == '1') ? "&lwa_profile_link=1" : '';
211
  * @return string
212
  */
213
  function register(){
214
+ if( !empty($_REQUEST['lwa']) ) {
215
  $return = array();
216
  if ('POST' == $_SERVER['REQUEST_METHOD']) {
217
  require_once( ABSPATH . WPINC . '/registration.php');
268
 
269
  function getLogoutRedirect(){
270
  $data = $this->data;
271
+ if( !empty($data['logout_redirect']) ){
272
  $redirect = $data['logout_redirect'];
273
  }
274
  if( strtolower(get_class($this->current_user)) == "wp_user" ){
275
  //Do a redirect if necessary
276
  $data = $this->data;
277
  $user_role = array_shift($this->current_user->roles); //Checking for role-based redirects
278
+ if( !empty($data["role_logout"]) && is_array($data["role_logout"]) && isset($data["role_logout"][$user_role]) ){
279
  $redirect = $data["role_logout"][$user_role];
280
  }
281
  }
326
  $lwa_data['profile_link'] = ( $lwa_data['profile_link'] != false && $lwa_data['profile_link'] != "false" );
327
  $is_widget = ( isset($lwa_data['is_widget']) ) ? ($lwa_data['is_widget'] != false && $lwa_data['is_widget'] != "false") : true ;
328
  //Add template logic
329
+ $this->template = ( !empty($lwa_data['template']) && array_key_exists($lwa_data['template'], $this->templates) ) ? $lwa_data['template']:'default';
330
  //Choose the widget content to display.
331
  if(is_user_logged_in()){
332
  //Firstly check for template in theme with no template folder (legacy)
456
  }
457
  }
458
  //Add translation
459
+ load_plugin_textdomain('login-with-ajax', false, "login-with-ajax/langs");
460
 
461
  //Include admin file if needed
462
  if(is_admin()){
467
 
468
  //Include pluggable functions file if user specifies in settings
469
  $lwa_data = get_option('lwa_data');
470
+ if( !empty($lwa_data['notification_override']) && $lwa_data['notification_override'] == '1' ){
471
  include_once('pluggable.php');
472
  }
473
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: netweblogic
3
  Donate link: http://netweblogic.com/wordpress/plugins/login-with-ajax/
4
  Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
5
  Requires at least: 2.8
6
- Tested up to: 3.0.1
7
- Stable tag: 3.0.1
8
 
9
  Add smooth ajax login and registration effects to your blog and choose where users get redirected upon login/logout. Supports SSL, MU, and BuddyPress.
10
 
@@ -181,4 +181,7 @@ For further questions and answers (or to submit one yourself) go to our [http://
181
  * Fixed unexpected #LoginWithAjax_Footer showing up at bottom
182
  * Fixed link problems for sub-directory blogs (using bloginfo('wpurl') now)
183
  * Added Albanian
184
- * Replace Spanish with revised version
 
 
 
3
  Donate link: http://netweblogic.com/wordpress/plugins/login-with-ajax/
4
  Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
5
  Requires at least: 2.8
6
+ Tested up to: 3.0.3
7
+ Stable tag: 3.0.2
8
 
9
  Add smooth ajax login and registration effects to your blog and choose where users get redirected upon login/logout. Supports SSL, MU, and BuddyPress.
10
 
181
  * Fixed unexpected #LoginWithAjax_Footer showing up at bottom
182
  * Fixed link problems for sub-directory blogs (using bloginfo('wpurl') now)
183
  * Added Albanian
184
+ * Replace Spanish with revised version
185
+
186
+ = 3.0.2 =
187
+ * got rid of (hopefully all) php warnings
widget/default/widget_out.php CHANGED
@@ -91,11 +91,11 @@
91
  <form name="registerform" id="registerform" action="<?php echo $this->url_register ?>" method="post">
92
  <p>
93
  <label><?php _e('Username') ?><br />
94
- <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label>
95
  </p>
96
  <p>
97
  <label><?php _e('E-mail') ?><br />
98
- <input type="text" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" tabindex="20" /></label>
99
  </p>
100
  <?php do_action('register_form'); ?>
101
  <p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>
91
  <form name="registerform" id="registerform" action="<?php echo $this->url_register ?>" method="post">
92
  <p>
93
  <label><?php _e('Username') ?><br />
94
+ <input type="text" name="user_login" id="user_login" class="input" size="20" tabindex="10" /></label>
95
  </p>
96
  <p>
97
  <label><?php _e('E-mail') ?><br />
98
+ <input type="text" name="user_email" id="user_email" class="input" size="25" tabindex="20" /></label>
99
  </p>
100
  <?php do_action('register_form'); ?>
101
  <p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>