Version Description
- Put the project on GitHub
- Added new localisations
- New options panel
- AJAX Login
Download this release
Release Info
Developer | jolley_small |
Plugin | Sidebar Login |
Version | 2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.15 to 2.3
- admin.php +180 -0
- js/blockui.js +17 -0
- js/sidebar-login.js +28 -0
- langs/sblogin-bg_BG.mo +0 -0
- langs/sblogin-bg_BG.po +125 -0
- langs/sblogin-el.mo +0 -0
- langs/sblogin-el.po +155 -0
- langs/sblogin-hi_IN.mo +0 -0
- langs/sblogin-hi_IN.po +126 -0
- langs/sblogin-lv_LV.mo +0 -0
- langs/sblogin-lv_LV.po.txt +158 -0
- readme.txt +19 -5
- sidebar-login.php +235 -471
- style.css +42 -0
admin.php
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
add_action( 'admin_init', 'sidebar_login_options_init' );
|
4 |
+
add_action( 'admin_menu', 'sidebar_login_options_add_page' );
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Define Options
|
8 |
+
*/
|
9 |
+
global $sidebar_login_options;
|
10 |
+
|
11 |
+
$sidebar_login_options = (
|
12 |
+
array(
|
13 |
+
array(
|
14 |
+
'',
|
15 |
+
array(
|
16 |
+
array(
|
17 |
+
'name' => 'sidebarlogin_heading',
|
18 |
+
'std' => __('Login', 'sblogin'),
|
19 |
+
'label' => __('Logged out heading', 'sblogin'),
|
20 |
+
'desc' => __('Heading for the widget when the user is logged out.', 'sblogin')
|
21 |
+
),
|
22 |
+
array(
|
23 |
+
'name' => 'sidebarlogin_welcome_heading',
|
24 |
+
'std' => __('Welcome %username%', 'sblogin'),
|
25 |
+
'label' => __('Logged in heading', 'sblogin'),
|
26 |
+
'desc' => __('Heading for the widget when the user is logged in.', 'sblogin')
|
27 |
+
),
|
28 |
+
)
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
__('Redirects', 'sblogin'),
|
32 |
+
array(
|
33 |
+
array(
|
34 |
+
'name' => 'sidebarlogin_login_redirect',
|
35 |
+
'std' => '',
|
36 |
+
'label' => __('Login redirect', 'sblogin'),
|
37 |
+
'desc' => __('Url to redirect the user to after login. Leave blank to use the current page.', 'sblogin'),
|
38 |
+
'placeholder' => 'http://'
|
39 |
+
),
|
40 |
+
array(
|
41 |
+
'name' => 'sidebarlogin_logout_redirect',
|
42 |
+
'std' => '',
|
43 |
+
'label' => __('Logout redirect', 'sblogin'),
|
44 |
+
'desc' => __('Url to redirect the user to after logout. Leave blank to use the current page.', 'sblogin'),
|
45 |
+
'placeholder' => 'http://'
|
46 |
+
),
|
47 |
+
)
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
__('Links', 'sblogin'),
|
51 |
+
array(
|
52 |
+
array(
|
53 |
+
'name' => 'sidebarlogin_register_link',
|
54 |
+
'std' => '1',
|
55 |
+
'label' => __('Show Register Link', 'sblogin'),
|
56 |
+
'desc' => sprintf( __('The <a href="%s" target="_blank">\'Anyone can register\'</a> setting must be turned on for this option to work.', 'sblogin'), admin_url('options-general.php')),
|
57 |
+
'type' => 'checkbox'
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'name' => 'sidebarlogin_forgotton_link',
|
61 |
+
'std' => '1',
|
62 |
+
'label' => __('Show Lost Password Link', 'sblogin'),
|
63 |
+
'desc' => '',
|
64 |
+
'type' => 'checkbox'
|
65 |
+
),
|
66 |
+
array(
|
67 |
+
'name' => 'sidebar_login_avatar',
|
68 |
+
'std' => '1',
|
69 |
+
'label' => __('Show Logged in Avatar', 'sblogin'),
|
70 |
+
'desc' => '',
|
71 |
+
'type' => 'checkbox'
|
72 |
+
),
|
73 |
+
array(
|
74 |
+
'name' => 'sidebarlogin_logged_in_links',
|
75 |
+
'std' => "<a href=\"".get_bloginfo('wpurl')."/wp-admin/\">".__('Dashboard','sblogin')."</a>\n<a href=\"".get_bloginfo('wpurl')."/wp-admin/profile.php\">".__('Profile','sblogin')."</a>",
|
76 |
+
'label' => __('Logged in links', 'sblogin'),
|
77 |
+
'desc' => sprintf( __('One link per line. Note: Logout link will always show regardless. Tip: Add <code>|true</code> after a link to only show it to admin users or alternatively use a <code>|user_capability</code> and the link will only be shown to users with that capability (see <a href=\'http://codex.wordpress.org/Roles_and_Capabilities\' target=\'_blank\'>Roles and Capabilities</a>).<br/> You can also type <code>%%USERNAME%%</code> and <code>%%USERID%%</code> which will be replaced by the user\'s info. Default: <br/><a href="%s/wp-admin/">Dashboard</a><br/><a href="%s/wp-admin/profile.php">Profile</a>', 'sblogin'), get_bloginfo('wpurl'), get_bloginfo('wpurl') ),
|
78 |
+
'type' => 'textarea'
|
79 |
+
),
|
80 |
+
)
|
81 |
+
)
|
82 |
+
)
|
83 |
+
);
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Init plugin options to white list our options
|
87 |
+
*/
|
88 |
+
function sidebar_login_options_init() {
|
89 |
+
|
90 |
+
global $sidebar_login_options;
|
91 |
+
|
92 |
+
foreach($sidebar_login_options as $section) {
|
93 |
+
foreach($section[1] as $option) {
|
94 |
+
if (isset($option['std'])) add_option($option['name'], $option['std']);
|
95 |
+
register_setting( 'sidebar-login', $option['name'] );
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Load up the menu page
|
104 |
+
*/
|
105 |
+
function sidebar_login_options_add_page() {
|
106 |
+
add_options_page(__('Sidebar Login','sblogin'), __('Sidebar Login','sblogin'), 'manage_options', 'sidebar-login', 'sidebar_login_options');
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Create the options page
|
111 |
+
*/
|
112 |
+
function sidebar_login_options() {
|
113 |
+
global $sidebar_login_options;
|
114 |
+
|
115 |
+
if ( ! isset( $_REQUEST['settings-updated'] ) ) $_REQUEST['settings-updated'] = false;
|
116 |
+
|
117 |
+
?>
|
118 |
+
<div class="wrap">
|
119 |
+
<?php screen_icon(); echo "<h2>" .__( 'Sidebar Login Options','sblogin') . "</h2>"; ?>
|
120 |
+
|
121 |
+
<form method="post" action="options.php">
|
122 |
+
|
123 |
+
<?php settings_fields( 'sidebar-login' ); ?>
|
124 |
+
|
125 |
+
<?php
|
126 |
+
foreach($sidebar_login_options as $section) {
|
127 |
+
|
128 |
+
if ($section[0]) echo '<h3 class="title">'.$section[0].'</h3>';
|
129 |
+
|
130 |
+
echo '<table class="form-table">';
|
131 |
+
|
132 |
+
foreach($section[1] as $option) {
|
133 |
+
|
134 |
+
echo '<tr valign="top"><th scope="row">'.$option['label'].'</th><td>';
|
135 |
+
|
136 |
+
if (!isset($option['type'])) $option['type'] = '';
|
137 |
+
|
138 |
+
switch ($option['type']) {
|
139 |
+
|
140 |
+
case "checkbox" :
|
141 |
+
|
142 |
+
$value = get_option($option['name']);
|
143 |
+
|
144 |
+
?><input id="<?php echo $option['name']; ?>" name="<?php echo $option['name']; ?>" type="checkbox" value="1" <?php checked( '1', $value ); ?> /><?php
|
145 |
+
|
146 |
+
break;
|
147 |
+
case "textarea" :
|
148 |
+
|
149 |
+
$value = get_option($option['name']);
|
150 |
+
|
151 |
+
?><textarea id="<?php echo $option['name']; ?>" class="large-text" cols="50" rows="10" name="<?php echo $option['name']; ?>" placeholder="<?php if (isset($option['placeholder'])) echo $option['placeholder']; ?>"><?php echo esc_textarea( $value ); ?></textarea><?php
|
152 |
+
|
153 |
+
break;
|
154 |
+
default :
|
155 |
+
|
156 |
+
$value = get_option($option['name']);
|
157 |
+
|
158 |
+
?><input id="<?php echo $option['name']; ?>" class="regular-text" type="text" name="<?php echo $option['name']; ?>" value="<?php esc_attr_e( $value ); ?>" placeholder="<?php if (isset($option['placeholder'])) echo $option['placeholder']; ?>" /><?php
|
159 |
+
|
160 |
+
break;
|
161 |
+
|
162 |
+
}
|
163 |
+
|
164 |
+
if ($option['desc']) echo '<span class="description">'.$option['desc'].'</span>';
|
165 |
+
|
166 |
+
echo '</td></tr>';
|
167 |
+
}
|
168 |
+
|
169 |
+
echo '</table>';
|
170 |
+
|
171 |
+
}
|
172 |
+
?>
|
173 |
+
|
174 |
+
<p class="submit">
|
175 |
+
<input type="submit" class="button-primary" value="<?php _e( 'Save Options', 'sblogin'); ?>" />
|
176 |
+
</p>
|
177 |
+
</form>
|
178 |
+
</div>
|
179 |
+
<?php
|
180 |
+
}
|
js/blockui.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
jQuery blockUI plugin
|
3 |
+
Version 2.36 (16-NOV-2010)
|
4 |
+
@requires jQuery v1.2.3 or later
|
5 |
+
|
6 |
+
Examples at: http://malsup.com/jquery/block/
|
7 |
+
Copyright (c) 2007-2008 M. Alsup
|
8 |
+
Dual licensed under the MIT and GPL licenses:
|
9 |
+
http://www.opensource.org/licenses/mit-license.php
|
10 |
+
http://www.gnu.org/licenses/gpl.html
|
11 |
+
|
12 |
+
*/;(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later! You are using v'+$.fn.jquery);return;}$.fn._fadeIn=$.fn.fadeIn;var noOp=function(){};var mode=document.documentMode||0;var setExpr=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout==undefined)timeout=3000;$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,'position')=='static')this.style.position='relative';if($.browser.msie)this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.35;$.blockUI.defaults={message:'<h1>Please wait...</h1>',title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:'30%',top:'40%',left:'35%',textAlign:'center',color:'#000',border:'3px solid #aaa',backgroundColor:'#fff',cursor:'wait'},themedCSS:{width:'30%',top:'40%',left:'35%'},overlayCSS:{backgroundColor:'#000',opacity:0.6,cursor:'wait'},growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:'default',color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px','border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:'blockMsg'};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});var themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)data.parent.removeChild(node);}var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3,s;if(opts.theme&&full){s='<div class="blockUI '+opts.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title||' ')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';}else if(opts.theme){s='<div class="blockUI '+opts.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:absolute">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title||' ')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';}else if(full){s='<div class="blockUI '+opts.blockMsgClass+' blockPage" style="z-index:'+z+';display:none;position:fixed"></div>';}else{s='<div class="blockUI '+opts.blockMsgClass+' blockElement" style="z-index:'+z+';display:none;position:absolute"></div>';}lyr3=$(s);if(msg){if(opts.theme){lyr3.css(themedCSS);lyr3.addClass('ui-widget-content');}else
|
13 |
+
lyr3.css(css);}if(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform)))lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if($.browser.msie||opts.forceIframe)lyr1.css('opacity',0.0);var layers=[lyr1,lyr2,lyr3],$par=full?$('body'):$(el);$.each(layers,function(){this.appendTo($par);});if(opts.theme&&opts.draggable&&$.fn.draggable){lyr3.draggable({handle:'.ui-dialog-titlebar',cancel:'li'});}var expr=setExpr&&(!$.boxModel||$('object,embed',full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.boxModel)$('html,body').css('height','100%');if((ie6||!$.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position='absolute';if(i<2){full?s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression('height','this.parentNode.offsetHeight + "px"');full?s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}if(msg){if(opts.theme)lyr3.find('.ui-widget-content').append(msg);else
|
14 |
+
lyr3.append(msg);if(msg.jquery||msg.nodeType)$(msg).show();}if(($.browser.msie||opts.forceIframe)&&opts.showOverlay)lyr1.show();if(opts.fadeIn){var cb=opts.onBlock?opts.onBlock:noOp;var cb1=(opts.showOverlay&&!msg)?cb:noOp;var cb2=msg?cb:noOp;if(opts.showOverlay)lyr2._fadeIn(opts.fadeIn,cb1);if(msg)lyr3._fadeIn(opts.fadeIn,cb2);}else{if(opts.showOverlay)lyr2.show();if(msg)lyr3.show();if(opts.onBlock)opts.onBlock();}bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(':input:enabled:visible',pageBlock);if(opts.focusInput)setTimeout(focus,20);}else
|
15 |
+
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}};function remove(el,opts){var full=(el==window);var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els;if(full)els=$('body').children().filter('.blockUI').add('body > .blockUI');else
|
16 |
+
els=$('.blockUI',el);if(full)pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}else
|
17 |
+
reset(els,data,opts,el);};function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode)this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent)data.parent.appendChild(data.el);$(el).removeData('blockUI.history');}if(typeof opts.onUnblock=='function')opts.onUnblock(el,opts);};function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))return;if(!full)$el.data('blockUI.isBlocked',b);if(!opts.bindEvents||(b&&!opts.showOverlay))return;var events='mousedown mouseup keydown keypress';b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);};function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target===els[els.length-1];var back=e.shiftKey&&e.target===els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false;}}}var opts=e.data;if($(e.target).parents('div.'+opts.blockMsgClass).length>0)return true;return $(e.target).parents().children().filter('div.blockUI').length==0;};function focus(back){if(!pageBlockEls)return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)e.focus();};function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';};function sz(el,p){return parseInt($.css(el,p))||0;};})(jQuery);
|
js/sidebar-login.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function(){
|
2 |
+
|
3 |
+
// Ajax Login
|
4 |
+
jQuery('.widget_wp_sidebarlogin form').submit(function(){
|
5 |
+
var thisform = this;
|
6 |
+
jQuery(thisform).block({ message: null, overlayCSS: {
|
7 |
+
backgroundColor: '#fff',
|
8 |
+
opacity: 0.6
|
9 |
+
} });
|
10 |
+
jQuery.ajax({
|
11 |
+
type: 'POST',
|
12 |
+
url: jQuery(thisform).attr('action'),
|
13 |
+
data: jQuery(thisform).serialize(),
|
14 |
+
success: function( result ) {
|
15 |
+
jQuery('.login_error').remove();
|
16 |
+
result = jQuery.trim( result );
|
17 |
+
if (result=='SBL_SUCCESS' || result.indexOf( 'SBL_SUCCESS' ) > 0) {
|
18 |
+
window.location = jQuery(thisform).attr('action');
|
19 |
+
} else {
|
20 |
+
jQuery(thisform).prepend('<p class="login_error">' + result + '</p>');
|
21 |
+
jQuery(thisform).unblock();
|
22 |
+
}
|
23 |
+
}
|
24 |
+
});
|
25 |
+
return false;
|
26 |
+
});
|
27 |
+
|
28 |
+
});
|
langs/sblogin-bg_BG.mo
ADDED
Binary file
|
langs/sblogin-bg_BG.po
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: sidebar-login\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2009-06-03 11:43+0100\n"
|
6 |
+
"PO-Revision-Date: 2011-04-21 13:45+0200\n"
|
7 |
+
"Last-Translator: Христо Панджаров <hristo.p@siteground.com>\n"
|
8 |
+
"Language-Team: Bulgarian <hristo.p@siteground.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: Bulgarian\n"
|
13 |
+
"X-Poedit-Country: BULGARIA\n"
|
14 |
+
|
15 |
+
#: sidebar-login.php:14
|
16 |
+
#: sidebar-login.php:57
|
17 |
+
msgid "Sidebar Login"
|
18 |
+
msgstr "Sidebar Login"
|
19 |
+
|
20 |
+
#: sidebar-login.php:46
|
21 |
+
msgid "<p>Changes saved</p>"
|
22 |
+
msgstr "<p>Промените записани</p>"
|
23 |
+
|
24 |
+
#: sidebar-login.php:62
|
25 |
+
msgid "Login redirect URL"
|
26 |
+
msgstr "Адрес за пренасочване след вход"
|
27 |
+
|
28 |
+
#: sidebar-login.php:63
|
29 |
+
msgid "Url to redirect the user to after login. Leave blank to use their current page."
|
30 |
+
msgstr "Адрес за пренасочване след вход. Оставете празно за да използвате същата страница."
|
31 |
+
|
32 |
+
#: sidebar-login.php:66
|
33 |
+
msgid "Logout redirect URL"
|
34 |
+
msgstr "Адрес за пренасочване след изход"
|
35 |
+
|
36 |
+
#: sidebar-login.php:67
|
37 |
+
msgid "Url to redirect the user to after logout. Leave blank to use their current page."
|
38 |
+
msgstr "Адрес за пренасочване след изход. Оставете празно за да използвате същата страница."
|
39 |
+
|
40 |
+
#: sidebar-login.php:70
|
41 |
+
msgid "Show Register Link"
|
42 |
+
msgstr "Покажи връзка за регистрация"
|
43 |
+
|
44 |
+
#: sidebar-login.php:72
|
45 |
+
#: sidebar-login.php:79
|
46 |
+
msgid "Yes"
|
47 |
+
msgstr "Да"
|
48 |
+
|
49 |
+
#: sidebar-login.php:73
|
50 |
+
#: sidebar-login.php:80
|
51 |
+
msgid "No"
|
52 |
+
msgstr "Не"
|
53 |
+
|
54 |
+
#: sidebar-login.php:74
|
55 |
+
msgid "User registrations must also be turned on for this to work ('Anyone can register' checkbox in settings)."
|
56 |
+
msgstr "Регистрациите трябва да бъдат включени преди това да работи ('Всеки може да се регистрира' чекбокса в настройките)."
|
57 |
+
|
58 |
+
#: sidebar-login.php:77
|
59 |
+
msgid "Show Lost Password Link"
|
60 |
+
msgstr "Покажи връзка за Изгубена парола"
|
61 |
+
|
62 |
+
#: sidebar-login.php:84
|
63 |
+
msgid "Logged in links"
|
64 |
+
msgstr "Връзка за успешно влезнали"
|
65 |
+
|
66 |
+
#: sidebar-login.php:85
|
67 |
+
msgid "One link per line. Note: Logout link will always show regardless. Tip: Add <code>|true</code> after a link to only show it to admin users. Default: <br/><a href=\""
|
68 |
+
msgstr "Един линк на ред. Забележка: Линковете за изход ще се показват независимо от тази опция. Подсказка: Добавете <code>|true</code> след линк за да го покажите само на администратори. По подразбиране: <br/><a href=\""
|
69 |
+
|
70 |
+
#: sidebar-login.php:89
|
71 |
+
msgid "Save Changes"
|
72 |
+
msgstr "Запази промените"
|
73 |
+
|
74 |
+
#: sidebar-login.php:120
|
75 |
+
msgid "Login"
|
76 |
+
msgstr "Вход"
|
77 |
+
|
78 |
+
#: sidebar-login.php:121
|
79 |
+
msgid "Welcome"
|
80 |
+
msgstr "Добре дошли"
|
81 |
+
|
82 |
+
#: sidebar-login.php:122
|
83 |
+
msgid "Username:"
|
84 |
+
msgstr "Потребител:"
|
85 |
+
|
86 |
+
#: sidebar-login.php:123
|
87 |
+
msgid "Password:"
|
88 |
+
msgstr "Парола:"
|
89 |
+
|
90 |
+
#: sidebar-login.php:124
|
91 |
+
msgid "Remember me"
|
92 |
+
msgstr "Запомни ме"
|
93 |
+
|
94 |
+
#: sidebar-login.php:125
|
95 |
+
msgid "Register"
|
96 |
+
msgstr "Регистрирай се"
|
97 |
+
|
98 |
+
#: sidebar-login.php:126
|
99 |
+
msgid "Password Lost and Found"
|
100 |
+
msgstr "Изгубена и намерена парола"
|
101 |
+
|
102 |
+
#: sidebar-login.php:127
|
103 |
+
msgid "Lost your password?"
|
104 |
+
msgstr "Загубена парола?"
|
105 |
+
|
106 |
+
#: sidebar-login.php:128
|
107 |
+
msgid "Logout"
|
108 |
+
msgstr "Изход"
|
109 |
+
|
110 |
+
#: sidebar-login.php:246
|
111 |
+
msgid "Dashboard"
|
112 |
+
msgstr "Табло"
|
113 |
+
|
114 |
+
#: sidebar-login.php:246
|
115 |
+
msgid "Profile"
|
116 |
+
msgstr "Профил"
|
117 |
+
|
118 |
+
#: sidebar-login.php:292
|
119 |
+
msgid "<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."
|
120 |
+
msgstr "<strong>ГРЕШКА</strong>: Кукитата са блокирани или не се поддържат от вашия браузър. Трябва да <a href=\"http://www.google.com/support/accounts/bin/answer.py?hl=ca&answer=61416\">вклютите кукитата</a> за да използвате WordPress."
|
121 |
+
|
122 |
+
#: sidebar-login.php:300
|
123 |
+
msgid "<strong>ERROR</strong>: Please enter a username & password."
|
124 |
+
msgstr "<strong>ГРЕШКА</strong>: Моля, въведете потребителско име и парола"
|
125 |
+
|
langs/sblogin-el.mo
ADDED
Binary file
|
langs/sblogin-el.po
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin Sidebar Login 2.2.10 by Mike Jolley.
|
2 |
+
# Copyright (C) 2010 Mike Jolley
|
3 |
+
# This file is distributed under the same license as the Sidebar Login package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: Sidebar Login 2.2.10\n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/sidebar-login\n"
|
10 |
+
"POT-Creation-Date: 2010-05-16 10:55+0000\n"
|
11 |
+
"PO-Revision-Date: 2011-02-12 00:43+0200\n"
|
12 |
+
"Last-Translator: Meet <meet-sos@freemail.gr>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
|
18 |
+
#. #-#-#-#-# plugin.pot (Sidebar Login 2.2.10) #-#-#-#-#
|
19 |
+
#. Plugin Name of the plugin/theme
|
20 |
+
#: sidebar-login.php:22
|
21 |
+
#: sidebar-login.php:51
|
22 |
+
#: sidebar-login.php:289
|
23 |
+
msgid "Sidebar Login"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: sidebar-login.php:40
|
27 |
+
msgid "<p>Changes saved</p>"
|
28 |
+
msgstr "<p>Οι αλλαγές αποθηκεύθηκαν</p>"
|
29 |
+
|
30 |
+
#: sidebar-login.php:56
|
31 |
+
msgid "Login redirect URL"
|
32 |
+
msgstr "URL ανακατέυθυνσης σύνδεσης"
|
33 |
+
|
34 |
+
#: sidebar-login.php:57
|
35 |
+
msgid "Url to redirect the user to after login. Leave blank to use their current page."
|
36 |
+
msgstr "Το Url στο οποίο θα ανακατευθένεται ο χρήστης αφότου συνδεθεί. Αφήστε το κενό άμα θέλετε να παραμείνει στην ίδια σελίδα."
|
37 |
+
|
38 |
+
#: sidebar-login.php:60
|
39 |
+
msgid "Logout redirect URL"
|
40 |
+
msgstr "URL ανακατέυθυνσης αποσύνδεσης"
|
41 |
+
|
42 |
+
#: sidebar-login.php:61
|
43 |
+
msgid "Url to redirect the user to after logout. Leave blank to use their current page."
|
44 |
+
msgstr "Το Url στο οποίο θα ανακατευθένεται ο χρήστης αφότου αποσυνδεθεί. Αφήστε το κενό άμα θέλετε να παραμείνει στην ίδια σελίδα."
|
45 |
+
|
46 |
+
#: sidebar-login.php:64
|
47 |
+
msgid "Show Register Link"
|
48 |
+
msgstr "Να δείχνει το λινκ εγγραφής νέου χρήστη"
|
49 |
+
|
50 |
+
#: sidebar-login.php:66
|
51 |
+
#: sidebar-login.php:73
|
52 |
+
msgid "Yes"
|
53 |
+
msgstr "Ναι"
|
54 |
+
|
55 |
+
#: sidebar-login.php:67
|
56 |
+
#: sidebar-login.php:74
|
57 |
+
msgid "No"
|
58 |
+
msgstr "Όχι"
|
59 |
+
|
60 |
+
#: sidebar-login.php:68
|
61 |
+
msgid "User registrations must also be turned on for this to work ('Anyone can register' checkbox in settings)."
|
62 |
+
msgstr "Οι εγγραφές χρηστών θα πρέπει να είναι ανοικτές για να λειτουργήσει αυτό (η επιλογή \"επιτρέπεται η εγγραφή μελών\" πρέπει να είναι ενεργοποιημένη στις ρυθμίσεις)."
|
63 |
+
|
64 |
+
#: sidebar-login.php:71
|
65 |
+
msgid "Show Lost Password Link"
|
66 |
+
msgstr "Να δείχνει το link επανάκτησης κωδικού"
|
67 |
+
|
68 |
+
#: sidebar-login.php:78
|
69 |
+
msgid "Logged in links"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: sidebar-login.php:79
|
73 |
+
msgid "One link per line. Note: Logout link will always show regardless. Tip: Add <code>|true</code> after a link to only show it to admin users. If you add a further <code>|USER LEVEL</code> the link will only be shown to users with levels equal to or greater than those defined. See <a href='http://codex.wordpress.org/Roles_and_Capabilities' target='_blank'>http://codex.wordpress.org/Roles_and_Capabilities</a> for more info on roles and Capabilities.<br/> You can also type <code>%USERNAME%</code> and <code>%USERID%</code> which will be replaced by the user info. Default:"
|
74 |
+
msgstr "Ενα link ανά γραμμή. Σημείωση: Το link της αποσύνδεσης θα φαίνεται ούτως ή άλλως. Κόλπο: προσθέστε <code>|true</code> έπειτα από κάποιο link για να φαίνεται μόνο στους διαχειριστές.Αν προσθέσετε ένα επιπλέον <code>|USER LEVEL</code> , το link θα φαίνεται μόνον στους χρήστες με αυτόν τον ρόλο ή ανώτερο αυτού. Δείτε στο <a href='http://codex.wordpress.org/Roles_and_Capabilities' target='_blank'>http://codex.wordpress.org/Roles_and_Capabilities</a> για περισσότερες λεπτομέρειες στα θέματα των ρόλων.<br/>Μπορείτε επίσης να γράψετε <code>%USERNAME%</code> και <code>%USERID%</code> τα οποία θα αντικατασταθούν από τις πληροφορίες του χρήστη. Προεπιλογή:"
|
75 |
+
|
76 |
+
#: sidebar-login.php:83
|
77 |
+
msgid "Save Changes"
|
78 |
+
msgstr "Αποθήκευση αλλαγών"
|
79 |
+
|
80 |
+
#: sidebar-login.php:114
|
81 |
+
msgid "Login"
|
82 |
+
msgstr "Σύνδεση"
|
83 |
+
|
84 |
+
#: sidebar-login.php:115
|
85 |
+
msgid "Welcome"
|
86 |
+
msgstr "Καλωσήλθες"
|
87 |
+
|
88 |
+
#: sidebar-login.php:116
|
89 |
+
msgid "Username:"
|
90 |
+
msgstr "Όνομα χρήστη:"
|
91 |
+
|
92 |
+
#: sidebar-login.php:117
|
93 |
+
msgid "Password:"
|
94 |
+
msgstr "Κωδικός:"
|
95 |
+
|
96 |
+
#: sidebar-login.php:118
|
97 |
+
msgid "Remember me"
|
98 |
+
msgstr "Να με θυμάσαι"
|
99 |
+
|
100 |
+
#: sidebar-login.php:119
|
101 |
+
msgid "Register"
|
102 |
+
msgstr "Εγγραφή"
|
103 |
+
|
104 |
+
#: sidebar-login.php:120
|
105 |
+
msgid "Password Lost and Found"
|
106 |
+
msgstr "Κωδικός χάθηκε και βρέθηκε"
|
107 |
+
|
108 |
+
#: sidebar-login.php:121
|
109 |
+
msgid "Lost your password?"
|
110 |
+
msgstr "Χάσατε τον κωδικό σας;"
|
111 |
+
|
112 |
+
#: sidebar-login.php:122
|
113 |
+
msgid "Logout"
|
114 |
+
msgstr "Αποσύνδεση"
|
115 |
+
|
116 |
+
#: sidebar-login.php:188
|
117 |
+
msgid "<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."
|
118 |
+
msgstr "<strong>ΣΦΑΛΜΑ</strong>: Τα Cookies είναι μπλοκαρισμένα ή δεν υποστηρίζονται από τον browser σας. Θα χρειαστεί να <a href='http://www.google.com/cookies.html'>ενεργοποιήσετε τα cookies</a> για να χρησιμοποιήσετε το wordpress."
|
119 |
+
|
120 |
+
#: sidebar-login.php:227
|
121 |
+
msgid "Or login using an <a href=\"http://openid.net/what/\" title=\"Learn about OpenID\">OpenID</a>"
|
122 |
+
msgstr "ή συνδεθείτε μέσω ενός <a href=\"http://openid.net/what/\" title=\"Learn about OpenID\">OpenID</a>"
|
123 |
+
|
124 |
+
#: sidebar-login.php:288
|
125 |
+
msgid "Sidebar Login."
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: sidebar-login.php:318
|
129 |
+
msgid "Dashboard"
|
130 |
+
msgstr "Πίνακας ελέγχου"
|
131 |
+
|
132 |
+
#: sidebar-login.php:318
|
133 |
+
msgid "Profile"
|
134 |
+
msgstr "Προφίλ"
|
135 |
+
|
136 |
+
#: sidebar-login.php:368
|
137 |
+
msgid "<strong>ERROR</strong>: Please enter a username & password."
|
138 |
+
msgstr "<strong>ΣΑΛΜΑ</strong>: Παρακαλώ εισάγετε όνομα χρήστη και κωδικό."
|
139 |
+
|
140 |
+
#. Plugin URI of the plugin/theme
|
141 |
+
msgid "http://wordpress.org/extend/plugins/sidebar-login/"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#. Description of the plugin/theme
|
145 |
+
msgid "Adds a sidebar widget to let users login"
|
146 |
+
msgstr "Προσθέτε μία μονάδα (widget) στην μπάρα για την σύνδεση των χρηστών"
|
147 |
+
|
148 |
+
#. Author of the plugin/theme
|
149 |
+
msgid "Mike Jolley"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#. Author URI of the plugin/theme
|
153 |
+
msgid "http://blue-anvil.com"
|
154 |
+
msgstr ""
|
155 |
+
|
langs/sblogin-hi_IN.mo
ADDED
Binary file
|
langs/sblogin-hi_IN.po
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: sidebar-login\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2009-06-03 11:43+0100\n"
|
6 |
+
"PO-Revision-Date: 2011-06-17 07:58+0530\n"
|
7 |
+
"Last-Translator: Ashish Jha <ashish@outshinesolutions.com>\n"
|
8 |
+
"Language-Team: Outshine Solutions <ash.pr@outshinesolutions.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: Hindi\n"
|
13 |
+
"X-Poedit-Country: INDIA\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
|
16 |
+
#: sidebar-login.php:14
|
17 |
+
#: sidebar-login.php:57
|
18 |
+
msgid "Sidebar Login"
|
19 |
+
msgstr "साइडबार लॉगिन"
|
20 |
+
|
21 |
+
#: sidebar-login.php:46
|
22 |
+
msgid "<p>Changes saved</p>"
|
23 |
+
msgstr "<p>परिवर्तन सहेजे</p>"
|
24 |
+
|
25 |
+
#: sidebar-login.php:62
|
26 |
+
msgid "Login redirect URL"
|
27 |
+
msgstr "लॉगिन यूआरएल अनुप्रेषित"
|
28 |
+
|
29 |
+
#: sidebar-login.php:63
|
30 |
+
msgid "Url to redirect the user to after login. Leave blank to use their current page."
|
31 |
+
msgstr "Url प्रवेश के बाद से उपयोगकर्ता अनुप्रेषित करने के लिए. अपने वर्तमान पृष्ठ का उपयोग करें रिक्त छोड़ दें."
|
32 |
+
|
33 |
+
#: sidebar-login.php:66
|
34 |
+
msgid "Logout redirect URL"
|
35 |
+
msgstr "लॉगआउट रीडायरेक्ट URL"
|
36 |
+
|
37 |
+
#: sidebar-login.php:67
|
38 |
+
msgid "Url to redirect the user to after logout. Leave blank to use their current page."
|
39 |
+
msgstr "Url लॉगआउट करने के बाद उपयोगकर्ता अनुप्रेषित करने के लिए. अपने वर्तमान पृष्ठ का उपयोग करने के लिए रिक्त छोड़ दें."
|
40 |
+
|
41 |
+
#: sidebar-login.php:70
|
42 |
+
msgid "Show Register Link"
|
43 |
+
msgstr " रजिस्टर लिंक दिखाएँ"
|
44 |
+
|
45 |
+
#: sidebar-login.php:72
|
46 |
+
#: sidebar-login.php:79
|
47 |
+
msgid "Yes"
|
48 |
+
msgstr "हां"
|
49 |
+
|
50 |
+
#: sidebar-login.php:73
|
51 |
+
#: sidebar-login.php:80
|
52 |
+
msgid "No"
|
53 |
+
msgstr "नहीं"
|
54 |
+
|
55 |
+
#: sidebar-login.php:74
|
56 |
+
msgid "User registrations must also be turned on for this to work ('Anyone can register' checkbox in settings)."
|
57 |
+
msgstr "उपयोगकर्ता पंजीकरण भी इस ('कोई भी पंजीकृत कर सकते हैं'चेकबॉक्स सेटिंग्स में) काम करने के लिए पर कर दिया जाना चाहिए."
|
58 |
+
|
59 |
+
#: sidebar-login.php:77
|
60 |
+
msgid "Show Lost Password Link"
|
61 |
+
msgstr " खोया लिंक पासवर्ड दिखाएँ"
|
62 |
+
|
63 |
+
#: sidebar-login.php:84
|
64 |
+
msgid "Logged in links"
|
65 |
+
msgstr "लिंक में लॉग इन"
|
66 |
+
|
67 |
+
#: sidebar-login.php:85
|
68 |
+
msgid "One link per line. Note: Logout link will always show regardless. Tip: Add <code>|true</code> after a link to only show it to admin users. Default: <br/><a href=\""
|
69 |
+
msgstr "एक पंक्ति पर एक लिंक. नोट: लॉगआउट कड़ी हमेशा परवाह दिखाएगा. सुझाव: जोड़ें<code>|True</code> पैरा únicamente mostrarlo एक administradores संयुक्त राष्ट्र लिंक डे después. डिफ़ॉल्ट: <br/><a href=\""
|
70 |
+
|
71 |
+
#: sidebar-login.php:89
|
72 |
+
msgid "Save Changes"
|
73 |
+
msgstr "परिवर्तन सहेजें"
|
74 |
+
|
75 |
+
#: sidebar-login.php:120
|
76 |
+
msgid "Login"
|
77 |
+
msgstr "लॉग इन"
|
78 |
+
|
79 |
+
#: sidebar-login.php:121
|
80 |
+
msgid "Welcome"
|
81 |
+
msgstr "आपका स्वागत है"
|
82 |
+
|
83 |
+
#: sidebar-login.php:122
|
84 |
+
msgid "Username:"
|
85 |
+
msgstr "प्रयोक्ता नाम:"
|
86 |
+
|
87 |
+
#: sidebar-login.php:123
|
88 |
+
msgid "Password:"
|
89 |
+
msgstr "पासवर्ड:"
|
90 |
+
|
91 |
+
#: sidebar-login.php:124
|
92 |
+
msgid "Remember me"
|
93 |
+
msgstr "मुझे याद रखें"
|
94 |
+
|
95 |
+
#: sidebar-login.php:125
|
96 |
+
msgid "Register"
|
97 |
+
msgstr "रजिस्टर"
|
98 |
+
|
99 |
+
#: sidebar-login.php:126
|
100 |
+
msgid "Password Lost and Found"
|
101 |
+
msgstr "पासवर्ड खोया और पाया"
|
102 |
+
|
103 |
+
#: sidebar-login.php:127
|
104 |
+
msgid "Lost your password?"
|
105 |
+
msgstr "अपना कूटशब्द खो गया?"
|
106 |
+
|
107 |
+
#: sidebar-login.php:128
|
108 |
+
msgid "Logout"
|
109 |
+
msgstr "लॉगआउट"
|
110 |
+
|
111 |
+
#: sidebar-login.php:246
|
112 |
+
msgid "Dashboard"
|
113 |
+
msgstr "डैशबोर्ड"
|
114 |
+
|
115 |
+
#: sidebar-login.php:246
|
116 |
+
msgid "Profile"
|
117 |
+
msgstr "प्रोफ़ाइल"
|
118 |
+
|
119 |
+
#: sidebar-login.php:292
|
120 |
+
msgid "<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."
|
121 |
+
msgstr "<strong>ERROR</strong>:कुकीज़ या अवरुद्ध कर रहे हैं आपके ब्राउज़र द्वारा समर्थित नहीं है. तुम्हें चाहिए<a href=\"http://www.google.com/support/accounts/bin/answer.py?hl=es&answer=61416\"></a> WordPress करने के लिए कुकीज़ का उपयोग कर सकें."
|
122 |
+
|
123 |
+
#: sidebar-login.php:300
|
124 |
+
msgid "<strong>ERROR</strong>: Please enter a username & password."
|
125 |
+
msgstr "<strong>ERROR</strong>: एक उपयोगकर्ता नाम और पासवर्ड दर्ज करें."
|
126 |
+
|
langs/sblogin-lv_LV.mo
ADDED
Binary file
|
langs/sblogin-lv_LV.po.txt
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin Sidebar Login 2.2.10 by Mike Jolley.
|
2 |
+
# Copyright (C) 2010 Mike Jolley
|
3 |
+
# This file is distributed under the same license as the Sidebar Login package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: Sidebar Login 2.2.10\n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/sidebar-login\n"
|
10 |
+
"POT-Creation-Date: 2010-05-16 10:55+0000\n"
|
11 |
+
"PO-Revision-Date: 2011-06-19 14:54+0200\n"
|
12 |
+
"Last-Translator: reinis <what@ev.er>\n"
|
13 |
+
"Language-Team: <wiziris@gmail.com>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"X-Poedit-Language: Latvian\n"
|
18 |
+
"X-Poedit-Country: LATVIA\n"
|
19 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
20 |
+
|
21 |
+
#. #-#-#-#-# plugin.pot (Sidebar Login 2.2.10) #-#-#-#-#
|
22 |
+
#. Plugin Name of the plugin/theme
|
23 |
+
#: sidebar-login.php:22
|
24 |
+
#: sidebar-login.php:51
|
25 |
+
#: sidebar-login.php:289
|
26 |
+
msgid "Sidebar Login"
|
27 |
+
msgstr "Sidebar Login"
|
28 |
+
|
29 |
+
#: sidebar-login.php:40
|
30 |
+
msgid "<p>Changes saved</p>"
|
31 |
+
msgstr "<p>Izmaiņas saglabātas</p>"
|
32 |
+
|
33 |
+
#: sidebar-login.php:56
|
34 |
+
msgid "Login redirect URL"
|
35 |
+
msgstr "Pieslēdzoties doties uz URL"
|
36 |
+
|
37 |
+
#: sidebar-login.php:57
|
38 |
+
msgid "Url to redirect the user to after login. Leave blank to use their current page."
|
39 |
+
msgstr "URL, uz kuru lietotājs tiks pāradresēts pieslēdzoties. Atstājiet tukšu, lai lietotājs paliktu esošajā lapā"
|
40 |
+
|
41 |
+
#: sidebar-login.php:60
|
42 |
+
msgid "Logout redirect URL"
|
43 |
+
msgstr "Atslēdzoties doties uz URL"
|
44 |
+
|
45 |
+
#: sidebar-login.php:61
|
46 |
+
msgid "Url to redirect the user to after logout. Leave blank to use their current page."
|
47 |
+
msgstr "URL, uz kuru lietotājs tiks pāradresēts atslēdzoties. Atstājiet tukšu, lai lietotājs paliktu esošajā lapā."
|
48 |
+
|
49 |
+
#: sidebar-login.php:64
|
50 |
+
msgid "Show Register Link"
|
51 |
+
msgstr "Rādīt norādi \"Reģistrācija\""
|
52 |
+
|
53 |
+
#: sidebar-login.php:66
|
54 |
+
#: sidebar-login.php:73
|
55 |
+
msgid "Yes"
|
56 |
+
msgstr "Jā"
|
57 |
+
|
58 |
+
#: sidebar-login.php:67
|
59 |
+
#: sidebar-login.php:74
|
60 |
+
msgid "No"
|
61 |
+
msgstr "Nē"
|
62 |
+
|
63 |
+
#: sidebar-login.php:68
|
64 |
+
msgid "User registrations must also be turned on for this to work ('Anyone can register' checkbox in settings)."
|
65 |
+
msgstr "Lai šo pieslēgtu, ir jābūt aktivizētām lietotāja pieslēgšanās iespējām. (Iestatījumi --> Vispārīgi --> opcija \"Jebkurš var reģistrēties par lietotāju\")"
|
66 |
+
|
67 |
+
#: sidebar-login.php:71
|
68 |
+
msgid "Show Lost Password Link"
|
69 |
+
msgstr "Rādīt pazaudētās paroles norādi"
|
70 |
+
|
71 |
+
#: sidebar-login.php:78
|
72 |
+
msgid "Logged in links"
|
73 |
+
msgstr "Norādes, kas ir redzamas reģistrētiem lietotājiem"
|
74 |
+
|
75 |
+
#: sidebar-login.php:79
|
76 |
+
msgid "One link per line. Note: Logout link will always show regardless. Tip: Add <code>|true</code> after a link to only show it to admin users. If you add a further <code>|USER LEVEL</code> the link will only be shown to users with levels equal to or greater than those defined. See <a href='http://codex.wordpress.org/Roles_and_Capabilities' target='_blank'>http://codex.wordpress.org/Roles_and_Capabilities</a> for more info on roles and Capabilities.<br/> You can also type <code>%USERNAME%</code> and <code>%USERID%</code> which will be replaced by the user info. Default:"
|
77 |
+
msgstr "Viena norāde rindā. Piezīme: Norāde \"Atslēgties\" parādīsies vienalga. Padoms: pievienojiet <code>|true</code> norādei, lai to redzētu tikai administratori. Ja pievienosit <code>|USER LEVEL</code>, norāde būs redzama tikai tiem lietotājiem, kuru piekļuves līmenis atbilst minētajam vai ir augstāks. Papildus informāciju meklējiet <a href='http://codex.wordpress.org/Roles_and_Capabilities' target='_blank'>http://codex.wordpress.org/Roles_and_Capabilities</a> šeit. <br/> Varat arī ierakstīt <code>%USERNAME%</code> un <code>%USERID%</code>. Noklusētais:"
|
78 |
+
|
79 |
+
#: sidebar-login.php:83
|
80 |
+
msgid "Save Changes"
|
81 |
+
msgstr "Saglabāt izmaiņas"
|
82 |
+
|
83 |
+
#: sidebar-login.php:114
|
84 |
+
msgid "Login"
|
85 |
+
msgstr "Pieslēgties"
|
86 |
+
|
87 |
+
#: sidebar-login.php:115
|
88 |
+
msgid "Welcome"
|
89 |
+
msgstr "Sveiki"
|
90 |
+
|
91 |
+
#: sidebar-login.php:116
|
92 |
+
msgid "Username:"
|
93 |
+
msgstr "Lietotājvārds:"
|
94 |
+
|
95 |
+
#: sidebar-login.php:117
|
96 |
+
msgid "Password:"
|
97 |
+
msgstr "Parole:"
|
98 |
+
|
99 |
+
#: sidebar-login.php:118
|
100 |
+
msgid "Remember me"
|
101 |
+
msgstr "Atcerēties mani"
|
102 |
+
|
103 |
+
#: sidebar-login.php:119
|
104 |
+
msgid "Register"
|
105 |
+
msgstr "Reģistrācija"
|
106 |
+
|
107 |
+
#: sidebar-login.php:120
|
108 |
+
msgid "Password Lost and Found"
|
109 |
+
msgstr "Mainīt paroli"
|
110 |
+
|
111 |
+
#: sidebar-login.php:121
|
112 |
+
msgid "Lost your password?"
|
113 |
+
msgstr "Aizmirsta parole"
|
114 |
+
|
115 |
+
#: sidebar-login.php:122
|
116 |
+
msgid "Logout"
|
117 |
+
msgstr "Atslēgties"
|
118 |
+
|
119 |
+
#: sidebar-login.php:188
|
120 |
+
msgid "<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."
|
121 |
+
msgstr "<strong>KĻŪDA</strong>: Jūsu programma neatbalsta sīkfailus (cookies) vai tie ir atslēgti. <a href='http://www.google.de/cookies.html'>Atļaut sīkfailus</a>."
|
122 |
+
|
123 |
+
#: sidebar-login.php:227
|
124 |
+
msgid "Or login using an <a href=\"http://openid.net/what/\" title=\"Learn about OpenID\">OpenID</a>"
|
125 |
+
msgstr "Vai pieslēdzieties, izmantojot <a href=\"http://openid.net/what/\" title=\"Par OpenID\">OpenID</a>"
|
126 |
+
|
127 |
+
#: sidebar-login.php:288
|
128 |
+
msgid "Sidebar Login."
|
129 |
+
msgstr "Sidebar Login."
|
130 |
+
|
131 |
+
#: sidebar-login.php:318
|
132 |
+
msgid "Dashboard"
|
133 |
+
msgstr "Darbgalds"
|
134 |
+
|
135 |
+
#: sidebar-login.php:318
|
136 |
+
msgid "Profile"
|
137 |
+
msgstr "Profils"
|
138 |
+
|
139 |
+
#: sidebar-login.php:368
|
140 |
+
msgid "<strong>ERROR</strong>: Please enter a username & password."
|
141 |
+
msgstr "<strong>KĻŪDA</strong>: Ievadiet lietotājvārdu un paroli."
|
142 |
+
|
143 |
+
#. Plugin URI of the plugin/theme
|
144 |
+
msgid "http://wordpress.org/extend/plugins/sidebar-login/"
|
145 |
+
msgstr "http://wordpress.org/extend/plugins/sidebar-login/"
|
146 |
+
|
147 |
+
#. Description of the plugin/theme
|
148 |
+
msgid "Adds a sidebar widget to let users login"
|
149 |
+
msgstr "Adds a sidebar widget to let users login"
|
150 |
+
|
151 |
+
#. Author of the plugin/theme
|
152 |
+
msgid "Mike Jolley"
|
153 |
+
msgstr "Mike Jolley"
|
154 |
+
|
155 |
+
#. Author URI of the plugin/theme
|
156 |
+
msgid "http://blue-anvil.com"
|
157 |
+
msgstr "http://blue-anvil.com"
|
158 |
+
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: jolley_small
|
3 |
-
Donate link: http://
|
4 |
Tags: login, sidebar, widget, sidebar login, meta, form, register
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
Adds a sidebar widget to let users login. Displayed links can be changed from the <a href="options-general.php?page=Sidebar%20Login">settings page</a>.
|
10 |
|
@@ -14,9 +14,13 @@ Sidebar-Login has both a widget and a template tag to allow you to have a login
|
|
14 |
|
15 |
It lets users login, and then redirects them back to the page they logged in from rather than the backend, it also shows error messages.
|
16 |
|
17 |
-
You can configure the plugin in <code>Admin >
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
|
21 |
* Czech Translation - http://wordpress.blog.mantlik.cz/plugins/sblogin-cs/
|
22 |
* Catalan Translation by Marc Vinyals
|
@@ -47,6 +51,10 @@ You can configure the plugin in <code>Admin > Appearance > Sidebar Login</code>
|
|
47 |
* Indonesian (2) translation by Hendry Lee (http://kelayang.com)
|
48 |
* Lithuanian translation by Justas Kalinauskas
|
49 |
* Hebrew translation by Yosi (http://www.thefinancialchef.com/blog/)
|
|
|
|
|
|
|
|
|
50 |
|
51 |
Note: Those with more than one translation are found in langs/alternate/. To use the alternatives move them from /alternate/ into /langs/.
|
52 |
|
@@ -70,6 +78,12 @@ You will find a config page in tools/settings > Sidebar Login. Here you can set
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
= 2.2.15 =
|
74 |
* FORCE_SSL_LOGIN/ADMIN double login issue fix (Thanks to bmaupin)
|
75 |
* Only added openid styling if other plugin is installed
|
1 |
=== Plugin Name ===
|
2 |
Contributors: jolley_small
|
3 |
+
Donate link: http://mikejolley.com/projects/sidebar-login-for-wordpress/
|
4 |
Tags: login, sidebar, widget, sidebar login, meta, form, register
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 3.2
|
7 |
+
Stable tag: 2.3
|
8 |
|
9 |
Adds a sidebar widget to let users login. Displayed links can be changed from the <a href="options-general.php?page=Sidebar%20Login">settings page</a>.
|
10 |
|
14 |
|
15 |
It lets users login, and then redirects them back to the page they logged in from rather than the backend, it also shows error messages.
|
16 |
|
17 |
+
You can configure the plugin in <code>Admin > Settings > Sidebar Login</code> after installing it.
|
18 |
|
19 |
+
If you'd like to contribute to the plugin you can find it on GitHub: https://github.com/mikejolley/sidebar-login.
|
20 |
+
|
21 |
+
== Localization ==
|
22 |
+
|
23 |
+
Added localizations are listed below. If you want to contribute or improve a localisation, please contribute via GitHub (https://github.com/mikejolley/sidebar-login).
|
24 |
|
25 |
* Czech Translation - http://wordpress.blog.mantlik.cz/plugins/sblogin-cs/
|
26 |
* Catalan Translation by Marc Vinyals
|
51 |
* Indonesian (2) translation by Hendry Lee (http://kelayang.com)
|
52 |
* Lithuanian translation by Justas Kalinauskas
|
53 |
* Hebrew translation by Yosi (http://www.thefinancialchef.com/blog/)
|
54 |
+
* Latvian translation by Reinis
|
55 |
+
* Hindi translation by Outshine Solutions (http://outshinesolutions.com/web-hosting/web-hosting-india.html)
|
56 |
+
* Bulgarian translation by Siteground (http://www.siteground.com)
|
57 |
+
* Greek translation by Meet-sos (wptips.thetida.gr)
|
58 |
|
59 |
Note: Those with more than one translation are found in langs/alternate/. To use the alternatives move them from /alternate/ into /langs/.
|
60 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 2.3 =
|
82 |
+
* Put the project on GitHub
|
83 |
+
* Added new localisations
|
84 |
+
* New options panel
|
85 |
+
* AJAX Login
|
86 |
+
|
87 |
= 2.2.15 =
|
88 |
* FORCE_SSL_LOGIN/ADMIN double login issue fix (Thanks to bmaupin)
|
89 |
* Only added openid styling if other plugin is installed
|
sidebar-login.php
CHANGED
@@ -3,533 +3,297 @@
|
|
3 |
Plugin Name: Sidebar Login
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/sidebar-login/
|
5 |
Description: Adds a sidebar widget to let users login
|
6 |
-
Version: 2.
|
7 |
Author: Mike Jolley
|
8 |
-
Author URI: http://
|
9 |
*/
|
10 |
|
11 |
-
// Pre 2.6 compatibility (BY Stephen Rider)
|
12 |
-
if ( ! defined( 'WP_CONTENT_URL' ) ) {
|
13 |
-
if ( defined( 'WP_SITEURL' ) ) define( 'WP_CONTENT_URL', WP_SITEURL . '/wp-content' );
|
14 |
-
else define( 'WP_CONTENT_URL', get_option( 'url' ) . '/wp-content' );
|
15 |
-
}
|
16 |
-
if ( ! defined( 'WP_PLUGIN_URL' ) ) define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
|
17 |
-
|
18 |
load_plugin_textdomain('sblogin', WP_PLUGIN_URL.'/sidebar-login/langs/', 'sidebar-login/langs/');
|
19 |
|
|
|
20 |
|
21 |
-
function
|
22 |
-
|
23 |
-
}
|
24 |
-
|
25 |
-
if (!function_exists('is_ssl')) :
|
26 |
-
function is_ssl() {
|
27 |
-
return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
|
28 |
-
}
|
29 |
-
endif;
|
30 |
-
|
31 |
-
function wp_sidebarlogin_admin(){
|
32 |
-
// Update options
|
33 |
-
if ($_POST) {
|
34 |
-
update_option('sidebarlogin_heading', stripslashes($_POST['sidebarlogin_heading']));
|
35 |
-
update_option('sidebarlogin_welcome_heading', stripslashes($_POST['sidebarlogin_welcome_heading']));
|
36 |
-
|
37 |
-
update_option('sidebarlogin_login_redirect', stripslashes($_POST['sidebarlogin_login_redirect']));
|
38 |
-
update_option('sidebarlogin_logout_redirect', stripslashes($_POST['sidebarlogin_logout_redirect']));
|
39 |
-
update_option('sidebarlogin_register_link', stripslashes($_POST['sidebarlogin_register_link']));
|
40 |
-
update_option('sidebarlogin_forgotton_link', stripslashes($_POST['sidebarlogin_forgotton_link']));
|
41 |
-
update_option('sidebarlogin_logged_in_links', stripslashes($_POST['sidebarlogin_logged_in_links']));
|
42 |
-
update_option('sidebar_login_avatar', stripslashes($_POST['sidebar_login_avatar']));
|
43 |
-
echo '<div id="message"class="updated fade">';
|
44 |
-
_e('<p>Changes saved</p>',"sblogin");
|
45 |
-
echo '</div>';
|
46 |
-
}
|
47 |
-
// Get options
|
48 |
-
$sidebarlogin_heading = get_option('sidebarlogin_heading');
|
49 |
-
$sidebarlogin_welcome_heading = get_option('sidebarlogin_welcome_heading');
|
50 |
|
51 |
-
$
|
52 |
-
$sidebarlogin_logout_redirect = get_option('sidebarlogin_logout_redirect');
|
53 |
-
$sidebarlogin_register_link = get_option('sidebarlogin_register_link');
|
54 |
-
$sidebarlogin_forgotton_link = get_option('sidebarlogin_forgotton_link');
|
55 |
-
$sidebarlogin_logged_in_links = get_option('sidebarlogin_logged_in_links');
|
56 |
-
$sidebar_login_avatar = get_option('sidebar_login_avatar');
|
57 |
-
?>
|
58 |
-
<div class="wrap alternate">
|
59 |
-
<h2><?php _e('Sidebar Login',"sblogin"); ?></h2>
|
60 |
-
<br class="a_break" style="clear: both;"/>
|
61 |
-
<form action="themes.php?page=sidebar-login" method="post">
|
62 |
-
<table class="niceblue form-table">
|
63 |
-
|
64 |
-
<tr>
|
65 |
-
<th scope="col"><?php _e('Logged out Heading',"sblogin"); ?>:</th>
|
66 |
-
<td><input type="text" name="sidebarlogin_heading" value="<?php echo $sidebarlogin_heading; ?>" /> <span class="setting-description"><?php _e('Widget heading.','sblogin'); ?></span></td>
|
67 |
-
</tr>
|
68 |
-
<tr>
|
69 |
-
<th scope="col"><?php _e('Logged in Heading',"sblogin"); ?>:</th>
|
70 |
-
<td><input type="text" name="sidebarlogin_welcome_heading" value="<?php echo $sidebarlogin_welcome_heading; ?>" /> <span class="setting-description"><?php _e('Heading for widget when user is logged in. <code>%username%</code> shows username.','sblogin'); ?></span></td>
|
71 |
-
</tr>
|
72 |
-
|
73 |
-
<tr>
|
74 |
-
<th scope="col"><?php _e('Login redirect URL',"sblogin"); ?>:</th>
|
75 |
-
<td><input type="text" name="sidebarlogin_login_redirect" value="<?php echo $sidebarlogin_login_redirect; ?>" /> <span class="setting-description"><?php _e('Url to redirect the user to after login. Leave blank to use their current page.','sblogin'); ?></span></td>
|
76 |
-
</tr>
|
77 |
-
<tr>
|
78 |
-
<th scope="col"><?php _e('Logout redirect URL',"sblogin"); ?>:</th>
|
79 |
-
<td><input type="text" name="sidebarlogin_logout_redirect" value="<?php echo $sidebarlogin_logout_redirect; ?>" /> <span class="setting-description"><?php _e('Url to redirect the user to after logout. Leave blank to use their current page.','sblogin'); ?></span></td>
|
80 |
-
</tr>
|
81 |
-
<tr>
|
82 |
-
<th scope="col"><?php _e('Show Register Link',"sblogin"); ?>:</th>
|
83 |
-
<td><select name="sidebarlogin_register_link">
|
84 |
-
<option <?php if ($sidebarlogin_register_link=='yes') echo 'selected="selected"'; ?> value="yes"><?php _e('Yes','sblogin'); ?></option>
|
85 |
-
<option <?php if ($sidebarlogin_register_link=='no') echo 'selected="selected"'; ?> value="no"><?php _e('No','sblogin'); ?></option>
|
86 |
-
</select> <span class="setting-description"><?php _e('User registrations must also be turned on for this to work (\'Anyone can register\' checkbox in settings).','sblogin'); ?></span></td>
|
87 |
-
</tr>
|
88 |
-
<tr>
|
89 |
-
<th scope="col"><?php _e('Show Lost Password Link',"sblogin"); ?>:</th>
|
90 |
-
<td><select name="sidebarlogin_forgotton_link">
|
91 |
-
<option <?php if ($sidebarlogin_forgotton_link=='yes') echo 'selected="selected"'; ?> value="yes"><?php _e('Yes','sblogin'); ?></option>
|
92 |
-
<option <?php if ($sidebarlogin_forgotton_link=='no') echo 'selected="selected"'; ?> value="no"><?php _e('No','sblogin'); ?></option>
|
93 |
-
</select></td>
|
94 |
-
</tr>
|
95 |
-
<tr>
|
96 |
-
<th scope="col"><?php _e('Logged in links',"sblogin"); ?>:</th>
|
97 |
-
<td><textarea name="sidebarlogin_logged_in_links" rows="3" cols="80" /><?php echo $sidebarlogin_logged_in_links; ?></textarea><br/><span class="setting-description"><?php _e("One link per line. Note: Logout link will always show regardless. Tip: Add <code>|true</code> after a link to only show it to admin users or alternatively use a <code>|user_capability</code> and the link will only be shown to users with that capability. See <a href='http://codex.wordpress.org/Roles_and_Capabilities' target='_blank'>http://codex.wordpress.org/Roles_and_Capabilities</a> for more info on roles and Capabilities.<br/> You can also type <code>%USERNAME%</code> and <code>%USERID%</code> which will be replaced by the user info. Default:",'sblogin');
|
98 |
-
echo '<br/><a href="'.get_bloginfo('wpurl').'/wp-admin/">'. __('Dashboard', 'sblogin') .'</a><br/><a href="'.get_bloginfo('wpurl').'/wp-admin/profile.php">'. __('Profile', 'sblogin') .'</a>'; ?></span></td>
|
99 |
-
</tr>
|
100 |
-
<tr>
|
101 |
-
<th scope="col"><?php _e('Show Logged in Avatar',"sblogin"); ?>:</th>
|
102 |
-
<td><select name="sidebar_login_avatar">
|
103 |
-
<option <?php if ($sidebar_login_avatar=='yes') echo 'selected="selected"'; ?> value="yes"><?php _e('Yes','sblogin'); ?></option>
|
104 |
-
<option <?php if ($sidebar_login_avatar=='no') echo 'selected="selected"'; ?> value="no"><?php _e('No','sblogin'); ?></option>
|
105 |
-
</select></td>
|
106 |
-
</tr>
|
107 |
-
|
108 |
-
</table>
|
109 |
-
<p class="submit"><input type="submit" value="<?php _e('Save Changes',"sblogin"); ?>" /></p>
|
110 |
-
</form>
|
111 |
-
</div>
|
112 |
-
<?php
|
113 |
-
}
|
114 |
-
|
115 |
-
/*
|
116 |
-
example of short call with text
|
117 |
-
|
118 |
-
sidebarlogin('before_title=<h5>&after_title='</h5>');
|
119 |
-
|
120 |
-
suggested by dev.xiligroup.com
|
121 |
-
*/
|
122 |
-
|
123 |
-
function sidebarlogin($myargs = '') {
|
124 |
-
if (is_array($myargs)) $args = &$myargs;
|
125 |
-
else parse_str($myargs, $args);
|
126 |
|
127 |
-
$defaults = array(
|
128 |
-
|
|
|
|
|
|
|
129 |
);
|
130 |
$args = array_merge($defaults, $args);
|
131 |
|
132 |
widget_wp_sidebarlogin($args);
|
133 |
}
|
134 |
|
|
|
135 |
function widget_wp_sidebarlogin($args) {
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
-
|
139 |
-
$defaults = array(
|
140 |
-
'thelogin'=>'',
|
141 |
-
'thewelcome'=>'',
|
142 |
-
'theusername'=>__('Username:','sblogin'),
|
143 |
-
'thepassword'=>__('Password:','sblogin'),
|
144 |
-
'theremember'=>__('Remember me','sblogin'),
|
145 |
-
'theregister'=>__('Register','sblogin'),
|
146 |
-
'thepasslostandfound'=>__('Password Lost and Found','sblogin'),
|
147 |
-
'thelostpass'=> __('Lost your password?','sblogin'),
|
148 |
-
'thelogout'=> __('Logout','sblogin')
|
149 |
-
);
|
150 |
|
151 |
-
$
|
152 |
-
extract($args);
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
if (
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
$links = explode("\n", $links);
|
175 |
-
if (sizeof($links)>0)
|
176 |
-
foreach ($links as $l) {
|
177 |
-
$l = trim($l);
|
178 |
-
if (!empty($l)) {
|
179 |
-
$link = explode('|',$l);
|
180 |
-
if (isset($link[1])) {
|
181 |
-
$cap = strtolower(trim($link[1]));
|
182 |
-
if ($cap=='true') {
|
183 |
-
if (!current_user_can( 'manage_options' )) continue;
|
184 |
-
} else {
|
185 |
-
if (!current_user_can( $cap )) continue;
|
186 |
-
}
|
187 |
}
|
188 |
-
// Parse %USERNAME%
|
189 |
-
$link[0] = str_replace('%USERNAME%',$current_user->user_login,$link[0]);
|
190 |
-
$link[0] = str_replace('%username%',$current_user->user_login,$link[0]);
|
191 |
-
// Parse %USERID%
|
192 |
-
$link[0] = str_replace('%USERID%',$current_user->ID,$link[0]);
|
193 |
-
$link[0] = str_replace('%userid%',$current_user->ID,$link[0]);
|
194 |
-
echo '<li class="page_item">'.$link[0].'</li>';
|
195 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
}
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
$wp_error = $myerrors;
|
216 |
-
}
|
217 |
-
|
218 |
-
/* Cookies not supported error handling */
|
219 |
-
if ( isset($_GET['_login']) && empty($_COOKIE[TEST_COOKIE]) ) $wp_error->add('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
|
220 |
-
|
221 |
-
if ( $wp_error->get_error_code() ) {
|
222 |
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
foreach ( $wp_error->get_error_codes() as $code ) {
|
227 |
-
$severity = $wp_error->get_error_data($code);
|
228 |
-
foreach ( $wp_error->get_error_messages($code) as $error ) {
|
229 |
-
if ( 'message' == $severity )
|
230 |
-
$messages .= ' ' . $error . "<br />\n";
|
231 |
-
else
|
232 |
-
$errors .= ' ' . $error . "<br />\n";
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
if ( !empty($errors) )
|
237 |
-
echo '<div id="login_error">' . apply_filters('login_errors', $errors) . "</div>\n";
|
238 |
-
if ( !empty($messages) )
|
239 |
-
echo '<p class="message">' . apply_filters('login_messages', $messages) . "</p>\n";
|
240 |
}
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
<p><label for="user_login"><?php echo $theusername; ?></label
|
249 |
-
<p><label for="user_pass"><?php echo $thepassword; ?></label
|
250 |
-
|
251 |
<?php
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
<label for="openid_field">' . __('Or login using an <a href="http://openid.net/what/" title="Learn about OpenID">OpenID</a>', 'sblogin') . '</label>
|
263 |
-
<input type="text" name="openid_identifier" id="openid_field" class="input mid" value="" /></label>
|
264 |
-
</p>';
|
265 |
-
}
|
266 |
-
|
267 |
?>
|
268 |
|
269 |
<p class="rememberme"><input name="rememberme" class="checkbox" id="rememberme" value="forever" type="checkbox" /> <label for="rememberme"><?php echo $theremember; ?></label></p>
|
270 |
-
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" value="<?php echo $thelogin; ?> »" />
|
271 |
|
272 |
-
<
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
?>
|
279 |
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
?>
|
297 |
-
<li><a href="<?php bloginfo('wpurl'); ?>/wp-signup.php" rel="nofollow"><?php echo $theregister; ?></a></li>
|
298 |
-
<?php
|
299 |
-
}
|
300 |
}
|
301 |
-
|
302 |
-
|
303 |
-
echo '<ul class="sidebarlogin_otherlinks">';
|
304 |
-
$isul = true;
|
305 |
-
}
|
306 |
-
?>
|
307 |
-
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php echo $thepasslostfound; ?>" rel="nofollow"><?php echo $thelostpass; ?></a></li>
|
308 |
-
<?php
|
309 |
-
endif;
|
310 |
-
if ($isul) echo '</ul>';
|
311 |
-
}
|
312 |
|
313 |
-
|
314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
}
|
316 |
|
317 |
-
|
|
|
318 |
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
|
336 |
-
} else {
|
337 |
-
// Legacy Widgets
|
338 |
-
function widget_wp_sidebarlogin_init() {
|
339 |
-
if ( !function_exists('register_sidebar_widget') ) return;
|
340 |
-
// Register widget for use
|
341 |
-
register_sidebar_widget(array('Sidebar Login', 'widgets'), 'widget_wp_sidebarlogin');
|
342 |
-
}
|
343 |
-
add_action('widgets_init', 'widget_wp_sidebarlogin_init');
|
344 |
}
|
|
|
345 |
|
|
|
346 |
function widget_wp_sidebarlogin_check() {
|
347 |
|
348 |
-
// Add options - they may not exist
|
349 |
-
add_option('sidebarlogin_heading','Login');
|
350 |
-
add_option('sidebarlogin_welcome_heading','Welcome %username%');
|
351 |
-
|
352 |
-
add_option('sidebarlogin_login_redirect','');
|
353 |
-
add_option('sidebarlogin_logout_redirect','');
|
354 |
-
add_option('sidebarlogin_register_link','yes');
|
355 |
-
add_option('sidebarlogin_forgotton_link','yes');
|
356 |
-
add_option('sidebarlogin_logged_in_links', "<a href=\"".get_bloginfo('wpurl')."/wp-admin/\">".__('Dashboard','sblogin')."</a>\n<a href=\"".get_bloginfo('wpurl')."/wp-admin/profile.php\">".__('Profile','sblogin')."</a>");
|
357 |
-
add_option('sidebar_login_avatar','yes');
|
358 |
-
|
359 |
-
if (!headers_sent()) :
|
360 |
-
// Set a cookie now to see if they are supported by the browser.
|
361 |
-
setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
|
362 |
-
if ( SITECOOKIEPATH != COOKIEPATH )
|
363 |
-
setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
|
364 |
-
endif;
|
365 |
-
|
366 |
if (isset($_POST['sidebarlogin_posted'])) {
|
367 |
-
|
368 |
-
global $myerrors;
|
369 |
-
$myerrors = new WP_Error();
|
370 |
|
371 |
-
|
372 |
-
|
373 |
-
$secure_cookie = '';
|
374 |
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
if ( $redirect_to ) {
|
392 |
-
// Redirect to https if user wants ssl
|
393 |
-
if ( $secure_cookie && false !== strpos($redirect_to, 'wp-admin') )
|
394 |
-
$redirect_to = preg_replace('|^http://|', 'https://', $redirect_to);
|
395 |
-
}
|
396 |
-
|
397 |
-
if ( !$secure_cookie && is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) ) $secure_cookie = false;
|
398 |
-
|
399 |
$user = wp_signon('', $secure_cookie);
|
400 |
|
|
|
|
|
401 |
$redirect_to = apply_filters('login_redirect', $redirect_to, isset( $redirect_to ) ? $redirect_to : '', $user);
|
402 |
|
403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
wp_safe_redirect($redirect_to);
|
405 |
exit;
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
}
|
412 |
}
|
413 |
}
|
|
|
414 |
|
415 |
-
if ( !function_exists('wp_sidebarlogin_current_url') ) :
|
416 |
-
function wp_sidebarlogin_current_url($url = '') {
|
417 |
-
|
418 |
-
global $wpdb, $post, $cat, $tag, $author, $year, $monthnum, $day, $wp_query;
|
419 |
-
$pageURL = "";
|
420 |
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
elseif (is_home() || is_front_page())
|
426 |
-
{
|
427 |
-
$pageURL = get_bloginfo('url');
|
428 |
-
}
|
429 |
-
elseif (is_single() || is_page())
|
430 |
-
{
|
431 |
-
$pageURL = get_permalink($wp_query->post->ID);
|
432 |
-
}
|
433 |
-
elseif (is_category())
|
434 |
-
{
|
435 |
-
$pageURL = get_category_link($cat);
|
436 |
-
}
|
437 |
-
elseif (is_tag())
|
438 |
-
{
|
439 |
-
$tag_id = $wpdb->get_var("SELECT ".$wpdb->terms.".term_id FROM $wpdb->term_taxonomy
|
440 |
-
LEFT JOIN $wpdb->terms
|
441 |
-
ON (".$wpdb->term_taxonomy.".term_id = ".$wpdb->terms.".term_id)
|
442 |
-
WHERE ".$wpdb->terms.".slug = '$tag'
|
443 |
-
AND ".$wpdb->term_taxonomy.".taxonomy = 'post_tag' LIMIT 1");
|
444 |
-
$pageURL = get_tag_link($tag_id);
|
445 |
}
|
446 |
-
|
447 |
-
{
|
448 |
-
$pageURL = get_author_posts_url($author);
|
449 |
-
}
|
450 |
-
elseif (is_date())
|
451 |
-
{
|
452 |
-
|
453 |
-
if ($day)
|
454 |
-
{
|
455 |
-
$pageURL = get_day_link( $year, $monthnum, $day);
|
456 |
-
}
|
457 |
-
elseif ($monthnum)
|
458 |
-
{
|
459 |
-
$pageURL = get_month_link( $year, $monthnum, $day);
|
460 |
-
}
|
461 |
-
elseif ($year)
|
462 |
-
{
|
463 |
-
$pageURL = get_year_link( $year, $monthnum, $day);
|
464 |
-
}
|
465 |
|
466 |
-
|
467 |
-
|
468 |
-
{
|
469 |
-
$pageURL = get_bloginfo('wpurl');
|
470 |
-
if ("/" != substr($pageURL, -1)) $pageURL = $pageURL . "/";
|
471 |
-
$pageURL .= '?s='.stripslashes(strip_tags($_REQUEST['s'])).'';
|
472 |
-
}
|
473 |
|
474 |
-
|
475 |
-
$pageURL
|
476 |
-
$pageURL
|
|
|
477 |
|
478 |
-
if ($
|
479 |
-
$pageURL
|
480 |
-
|
481 |
-
|
482 |
-
|
|
|
|
|
483 |
|
484 |
-
|
485 |
-
if (!strstr(get_bloginfo('url'),'www.')) $pageURL = str_replace('www.','', $pageURL );
|
486 |
-
//——————–
|
487 |
-
}
|
488 |
-
if ($pageURL && !is_search()) if ("/" != substr($pageURL, -1)) $pageURL = $pageURL . "/";
|
489 |
-
|
490 |
-
if ($url != "nologout") {
|
491 |
-
if (!strpos($pageURL,'_login=')) {
|
492 |
-
$rand_string = md5(uniqid(rand(), true));
|
493 |
-
$rand_string = substr($rand_string, 0, 10);
|
494 |
-
|
495 |
-
if (strpos($pageURL,'?'))
|
496 |
-
if (substr($pageURL,-1)=='/')
|
497 |
-
$pageURL = substr($pageURL,0,-1);
|
498 |
-
|
499 |
-
$rand = (!strpos($pageURL,'?')) ? '?_login='.$rand_string : '&_login='.$rand_string;
|
500 |
-
$pageURL .= $rand;
|
501 |
-
}
|
502 |
}
|
503 |
-
|
504 |
-
return $pageURL;
|
505 |
-
}
|
506 |
-
endif;
|
507 |
-
|
508 |
-
function wp_sidebarlogin_css() {
|
509 |
-
if (is_ssl())
|
510 |
-
$myStyleFile = str_replace('http://','https://', WP_PLUGIN_URL) . '/sidebar-login/style.css';
|
511 |
-
else
|
512 |
-
$myStyleFile = WP_PLUGIN_URL . '/sidebar-login/style.css';
|
513 |
-
wp_register_style('wp_sidebarlogin_css_styles', $myStyleFile);
|
514 |
-
wp_enqueue_style( 'wp_sidebarlogin_css_styles');
|
515 |
-
}
|
516 |
-
|
517 |
-
function wp_sidebarlogin_openid_styling() {
|
518 |
-
?>
|
519 |
-
<style type="text/css">
|
520 |
-
.widget_wp_sidebarlogin #openid_field {
|
521 |
-
background-image:url(<?php echo WP_PLUGIN_URL; ?>/openid/f/openid.gif);
|
522 |
-
background-position:3px 50%;
|
523 |
-
background-repeat:no-repeat;
|
524 |
-
padding-left:21px !important;
|
525 |
-
}
|
526 |
-
</style>
|
527 |
-
<?php
|
528 |
-
}
|
529 |
-
|
530 |
-
// Run code and init
|
531 |
-
add_action('wp_print_styles', 'wp_sidebarlogin_css');
|
532 |
-
add_action('init', 'widget_wp_sidebarlogin_check', 0);
|
533 |
-
add_action('admin_menu', 'wp_sidebarlogin_menu');
|
534 |
-
if (function_exists('openid_wp_login_form')) add_action('wp_head', 'wp_sidebarlogin_openid_styling');
|
535 |
-
?>
|
3 |
Plugin Name: Sidebar Login
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/sidebar-login/
|
5 |
Description: Adds a sidebar widget to let users login
|
6 |
+
Version: 2.3
|
7 |
Author: Mike Jolley
|
8 |
+
Author URI: http://mikejolley.com
|
9 |
*/
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
load_plugin_textdomain('sblogin', WP_PLUGIN_URL.'/sidebar-login/langs/', 'sidebar-login/langs/');
|
12 |
|
13 |
+
if (is_admin()) include( WP_PLUGIN_DIR . '/sidebar-login/admin.php' );
|
14 |
|
15 |
+
/* Call via function */
|
16 |
+
function sidebarlogin( $args = '' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
+
if (!is_array($args)) parse_str($args, $args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
$defaults = array(
|
21 |
+
'before_widget'=>'',
|
22 |
+
'after_widget'=>'',
|
23 |
+
'before_title'=>'<h2>',
|
24 |
+
'after_title'=>'</h2>'
|
25 |
);
|
26 |
$args = array_merge($defaults, $args);
|
27 |
|
28 |
widget_wp_sidebarlogin($args);
|
29 |
}
|
30 |
|
31 |
+
/* The widget */
|
32 |
function widget_wp_sidebarlogin($args) {
|
33 |
+
global $user_ID, $current_user;
|
34 |
+
|
35 |
+
/* To add more extend i.e when terms came from themes - suggested by dev.xiligroup.com */
|
36 |
+
$defaults = array(
|
37 |
+
'thelogin'=>'',
|
38 |
+
'thewelcome'=>'',
|
39 |
+
'theusername'=>__('Username:','sblogin'),
|
40 |
+
'thepassword'=>__('Password:','sblogin'),
|
41 |
+
'theremember'=>__('Remember me','sblogin'),
|
42 |
+
'theregister'=>__('Register','sblogin'),
|
43 |
+
'thepasslostandfound'=>__('Password Lost and Found','sblogin'),
|
44 |
+
'thelostpass'=> __('Lost your password?','sblogin'),
|
45 |
+
'thelogout'=> __('Logout','sblogin')
|
46 |
+
);
|
47 |
+
|
48 |
+
$args = array_merge($defaults, $args);
|
49 |
+
extract($args);
|
50 |
+
|
51 |
+
get_currentuserinfo();
|
52 |
+
|
53 |
+
if ($user_ID != '') {
|
54 |
+
|
55 |
+
// User is logged in
|
56 |
+
global $current_user;
|
57 |
+
get_currentuserinfo();
|
58 |
|
59 |
+
if (empty($thewelcome)) $thewelcome = str_replace('%username%',ucwords($current_user->display_name),get_option('sidebarlogin_welcome_heading'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
echo $before_widget . $before_title .$thewelcome. $after_title;
|
|
|
62 |
|
63 |
+
if (get_option('sidebar_login_avatar')=='1') echo '<div class="avatar_container">'.get_avatar($user_ID, $size = '38').'</div>';
|
64 |
+
|
65 |
+
echo '<ul class="pagenav">';
|
66 |
+
|
67 |
+
if(isset($current_user->user_level) && $current_user->user_level) $level = $current_user->user_level;
|
68 |
+
|
69 |
+
$links = do_shortcode(trim(get_option('sidebarlogin_logged_in_links')));
|
70 |
+
|
71 |
+
$links = explode("\n", $links);
|
72 |
+
if (sizeof($links)>0)
|
73 |
+
foreach ($links as $l) {
|
74 |
+
$l = trim($l);
|
75 |
+
if (!empty($l)) {
|
76 |
+
$link = explode('|',$l);
|
77 |
+
if (isset($link[1])) {
|
78 |
+
$cap = strtolower(trim($link[1]));
|
79 |
+
if ($cap=='true') {
|
80 |
+
if (!current_user_can( 'manage_options' )) continue;
|
81 |
+
} else {
|
82 |
+
if (!current_user_can( $cap )) continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
+
// Parse %USERNAME%
|
86 |
+
$link[0] = str_replace('%USERNAME%',$current_user->user_login,$link[0]);
|
87 |
+
$link[0] = str_replace('%username%',$current_user->user_login,$link[0]);
|
88 |
+
// Parse %USERID%
|
89 |
+
$link[0] = str_replace('%USERID%',$current_user->ID,$link[0]);
|
90 |
+
$link[0] = str_replace('%userid%',$current_user->ID,$link[0]);
|
91 |
+
echo '<li class="page_item">'.$link[0].'</li>';
|
92 |
}
|
93 |
+
}
|
94 |
+
|
95 |
+
$redir = trim(stripslashes(get_option('sidebarlogin_logout_redirect')));
|
96 |
+
if (!$redir || empty($redir)) $redir = sidebar_login_current_url('nologout');
|
97 |
+
|
98 |
+
echo '<li class="page_item"><a href="'.wp_logout_url($redir).'">'.$thelogout.'</a></li></ul>';
|
99 |
+
|
100 |
+
} else {
|
101 |
+
|
102 |
+
// User is NOT logged in!!!
|
103 |
+
|
104 |
+
if (empty($thelogin)) $thelogin = get_option('sidebarlogin_heading');
|
105 |
+
|
106 |
+
echo $before_widget . $before_title .'<span>'. $thelogin .'</span>' . $after_title;
|
107 |
|
108 |
+
global $login_errors;
|
109 |
+
|
110 |
+
if ( is_wp_error($login_errors) && $login_errors->get_error_code() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
+
foreach ($user->errors as $error) {
|
113 |
+
echo '<div class="login_error">' . $error[0] . "</div>\n";
|
114 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
+
|
117 |
+
}
|
118 |
+
// login form
|
119 |
+
if (force_ssl_login() || force_ssl_admin()) $sidebarlogin_post_url = str_replace('http://', 'https://', sidebar_login_current_url()); else $sidebarlogin_post_url = sidebar_login_current_url();
|
120 |
+
?>
|
121 |
+
<form method="post" action="<?php echo $sidebarlogin_post_url; ?>">
|
122 |
+
|
123 |
+
<p><label for="user_login"><?php echo $theusername; ?></label> <input name="log" value="<?php if (isset($_POST['log'])) echo esc_attr(stripslashes($_POST['log'])); ?>" class="text" id="user_login" type="text" /></p>
|
124 |
+
<p><label for="user_pass"><?php echo $thepassword; ?></label> <input name="pwd" class="text" id="user_pass" type="password" /></p>
|
125 |
+
|
126 |
<?php
|
127 |
+
// OpenID Plugin (http://wordpress.org/extend/plugins/openid/) Integration
|
128 |
+
if (function_exists('openid_wp_login_form')) :
|
129 |
+
echo '
|
130 |
+
<hr id="openid_split" />
|
131 |
+
<p>
|
132 |
+
<label for="openid_field">' . __('Or login using an <a href="http://openid.net/what/" title="Learn about OpenID">OpenID</a>', 'sblogin') . '</label>
|
133 |
+
<input type="text" name="openid_identifier" id="openid_field" class="input mid" value="" /></label>
|
134 |
+
</p>
|
135 |
+
';
|
136 |
+
endif;
|
|
|
|
|
|
|
|
|
|
|
137 |
?>
|
138 |
|
139 |
<p class="rememberme"><input name="rememberme" class="checkbox" id="rememberme" value="forever" type="checkbox" /> <label for="rememberme"><?php echo $theremember; ?></label></p>
|
|
|
140 |
|
141 |
+
<p class="submit">
|
142 |
+
<input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Login »', 'sblogin'); ?>" />
|
143 |
+
<input type="hidden" name="redirect_to" class="redirect_to" value="<?php echo sidebar_login_current_url(); ?>" />
|
144 |
+
<input type="hidden" name="sidebarlogin_posted" value="1" />
|
145 |
+
<input type="hidden" name="testcookie" value="1" />
|
146 |
+
</p>
|
|
|
147 |
|
148 |
+
<?php if (function_exists('fbc_init_auth')) do_action('fbc_display_login_button'); // Facebook Plugin ?>
|
149 |
+
|
150 |
+
</form>
|
151 |
+
<?php
|
152 |
+
// Output other links
|
153 |
+
$links = '';
|
154 |
+
if (get_option('users_can_register') && get_option('sidebarlogin_register_link')=='1') {
|
155 |
+
|
156 |
+
if (!is_multisite()) {
|
157 |
+
|
158 |
+
$links .= '<li><a href="'.get_bloginfo('wpurl').'/wp-login.php?action=register" rel="nofollow">'.$theregister.'</a></li>';
|
159 |
+
|
160 |
+
} else {
|
161 |
+
|
162 |
+
$links .= '<li><a href="'.get_bloginfo('wpurl').'/wp-signup.php" rel="nofollow">'.$theregister.'</a></li>';
|
163 |
+
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
+
}
|
166 |
+
if (get_option('sidebarlogin_forgotton_link')=='1') :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
+
$links .= '<li><a href="'.get_bloginfo('wpurl').'/wp-login.php?action=lostpassword" rel="nofollow">'. $thelostpass .'</a></li>';
|
169 |
+
|
170 |
+
endif;
|
171 |
+
if ($links) echo '<ul class="sidebarlogin_otherlinks">'.$links.'</ul>';
|
172 |
+
}
|
173 |
+
|
174 |
+
// echo widget closing tag
|
175 |
+
echo $after_widget;
|
176 |
}
|
177 |
|
178 |
+
/* Init widget/styles/scripts */
|
179 |
+
function widget_wp_sidebarlogin_init() {
|
180 |
|
181 |
+
// CSS
|
182 |
+
if (is_ssl()) $myStyleFile = str_replace('http://','https://', WP_PLUGIN_URL) . '/sidebar-login/style.css';
|
183 |
+
else $myStyleFile = WP_PLUGIN_URL . '/sidebar-login/style.css';
|
184 |
+
wp_register_style('wp_sidebarlogin_css_styles', $myStyleFile);
|
185 |
+
wp_enqueue_style('wp_sidebarlogin_css_styles');
|
186 |
+
|
187 |
+
// Scripts
|
188 |
+
wp_register_script('blockui', WP_PLUGIN_URL . '/sidebar-login/js/blockui.js', array('jquery'), '1.0' );
|
189 |
+
wp_register_script('sidebar-login', WP_PLUGIN_URL . '/sidebar-login/js/sidebar-login.js', array('jquery', 'blockui'), '1.0' );
|
190 |
+
wp_enqueue_script('jquery');
|
191 |
+
wp_enqueue_script('blockui');
|
192 |
+
wp_enqueue_script('sidebar-login');
|
193 |
+
|
194 |
+
// Register widget
|
195 |
+
class SidebarLoginMultiWidget extends WP_Widget {
|
196 |
+
function SidebarLoginMultiWidget() {
|
197 |
+
$widget_ops = array('description' => __( 'Sidebar Login.','sblogin') );
|
198 |
+
$this->WP_Widget('wp_sidebarlogin', __('Sidebar Login','sblogin'), $widget_ops);
|
199 |
+
}
|
200 |
+
function widget($args, $instance) {
|
201 |
+
|
202 |
+
widget_wp_sidebarlogin($args);
|
203 |
+
|
204 |
+
}
|
205 |
+
}
|
206 |
+
register_widget('SidebarLoginMultiWidget');
|
207 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
209 |
+
add_action('init', 'widget_wp_sidebarlogin_init', 1);
|
210 |
|
211 |
+
/* Login Action */
|
212 |
function widget_wp_sidebarlogin_check() {
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
if (isset($_POST['sidebarlogin_posted'])) {
|
|
|
|
|
|
|
215 |
|
216 |
+
global $login_errors;
|
|
|
|
|
217 |
|
218 |
+
// Get redirect URL
|
219 |
+
$redirect_to = trim(stripslashes(get_option('sidebarlogin_login_redirect')));
|
220 |
+
|
221 |
+
if (empty($redirect_to)) :
|
222 |
+
if (isset($_REQUEST['redirect_to']))
|
223 |
+
$redirect_to = $_REQUEST['redirect_to'];
|
224 |
+
else
|
225 |
+
$redirect_to = sidebar_login_current_url('nologout');
|
226 |
+
endif;
|
227 |
+
|
228 |
+
// Check for Secure Cookie
|
229 |
+
if ( is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) ) $secure_cookie = false;
|
230 |
+
else $secure_cookie = '';
|
231 |
+
|
232 |
+
// Login
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
$user = wp_signon('', $secure_cookie);
|
234 |
|
235 |
+
// Redirect filter
|
236 |
+
if ( $secure_cookie && false !== strpos($redirect_to, 'wp-admin') ) $redirect_to = preg_replace('|^http://|', 'https://', $redirect_to);
|
237 |
$redirect_to = apply_filters('login_redirect', $redirect_to, isset( $redirect_to ) ? $redirect_to : '', $user);
|
238 |
|
239 |
+
// Check the username
|
240 |
+
if ( !$_POST['log'] ) :
|
241 |
+
$user = new WP_Error();
|
242 |
+
$user->add('empty_username', __('<strong>ERROR</strong>: Please enter a username.', 'sblogin'));
|
243 |
+
elseif ( !$_POST['pwd'] ) :
|
244 |
+
$user = new WP_Error();
|
245 |
+
$user->add('empty_username', __('<strong>ERROR</strong>: Please enter your password.', 'sblogin'));
|
246 |
+
endif;
|
247 |
+
|
248 |
+
// Show result based on whether its by ajax or not
|
249 |
+
if (sidebar_login_is_ajax()) :
|
250 |
+
if ( !is_wp_error($user) ) :
|
251 |
+
echo 'SBL_SUCCESS';
|
252 |
+
else :
|
253 |
+
foreach ($user->errors as $error) {
|
254 |
+
echo $error[0];
|
255 |
+
break;
|
256 |
+
}
|
257 |
+
endif;
|
258 |
+
exit;
|
259 |
+
else :
|
260 |
+
if ( !is_wp_error($user) ) :
|
261 |
wp_safe_redirect($redirect_to);
|
262 |
exit;
|
263 |
+
endif;
|
264 |
+
endif;
|
265 |
+
|
266 |
+
$login_errors = $user;
|
267 |
+
|
|
|
268 |
}
|
269 |
}
|
270 |
+
add_action('init', 'widget_wp_sidebarlogin_check', 0);
|
271 |
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
+
/* Detect AJAX login */
|
274 |
+
if (!function_exists('sidebar_login_is_ajax')) {
|
275 |
+
function sidebar_login_is_ajax() {
|
276 |
+
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') return true; else return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
|
280 |
+
/* Get Current URL */
|
281 |
+
if ( !function_exists('sidebar_login_current_url') ) {
|
282 |
+
function sidebar_login_current_url( $url = '' ) {
|
|
|
|
|
|
|
|
|
283 |
|
284 |
+
$pageURL = 'http://';
|
285 |
+
$pageURL .= $_SERVER['HTTP_HOST'];
|
286 |
+
$pageURL .= $_SERVER['REQUEST_URI'];
|
287 |
+
if ( force_ssl_login() || force_ssl_admin() ) $pageURL = str_replace( 'http://', 'https://', $pageURL );
|
288 |
|
289 |
+
if ($url != "nologout") {
|
290 |
+
if (!strpos($pageURL,'_login=')) {
|
291 |
+
$rand_string = md5(uniqid(rand(), true));
|
292 |
+
$rand_string = substr($rand_string, 0, 10);
|
293 |
+
$pageURL = add_query_arg('_login', $rand_string, $pageURL);
|
294 |
+
}
|
295 |
+
}
|
296 |
|
297 |
+
return $pageURL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
}
|
299 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
style.css
CHANGED
@@ -23,4 +23,46 @@
|
|
23 |
border: 0;
|
24 |
border-top: 1px solid #999;
|
25 |
height: 1px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
23 |
border: 0;
|
24 |
border-top: 1px solid #999;
|
25 |
height: 1px;
|
26 |
+
}
|
27 |
+
.widget_wp_sidebarlogin #openid_field {
|
28 |
+
background-image:url(../openid/f/openid.gif);
|
29 |
+
background-position:3px 50%;
|
30 |
+
background-repeat:no-repeat;
|
31 |
+
padding-left:21px !important;
|
32 |
+
}
|
33 |
+
.widget_wp_sidebarlogin ul.sidebarlogin_otherlinks {
|
34 |
+
margin-left: 0 !important;
|
35 |
+
}
|
36 |
+
.widget_wp_sidebarlogin .login_error {
|
37 |
+
color: #ae121e;
|
38 |
+
background-color: #fbb1b7;
|
39 |
+
border: 1px solid;
|
40 |
+
margin: 1em 0;
|
41 |
+
padding: 1em;
|
42 |
+
font-size: 13px;
|
43 |
+
}
|
44 |
+
.widget_wp_sidebarlogin .login_error a {
|
45 |
+
color: #ae121e;
|
46 |
+
}
|
47 |
+
.widget_wp_sidebarlogin form {
|
48 |
+
margin: 1em 0;
|
49 |
+
}
|
50 |
+
.widget_wp_sidebarlogin form p {
|
51 |
+
margin: .5em 0;
|
52 |
+
}
|
53 |
+
.widget_wp_sidebarlogin form input.text {
|
54 |
+
width: 100%;
|
55 |
+
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
56 |
+
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
57 |
+
box-sizing: border-box; /* Opera/IE 8+ */
|
58 |
+
}
|
59 |
+
/* ie7 */
|
60 |
+
*:first-child+html .widget_wp_sidebarlogin form input.text {
|
61 |
+
width: 90%;
|
62 |
+
}
|
63 |
+
.widget_wp_sidebarlogin label {
|
64 |
+
display: block;
|
65 |
+
}
|
66 |
+
.widget_wp_sidebarlogin .rememberme label {
|
67 |
+
display: inline;
|
68 |
}
|