Post by Noche on Apr 22, 2013 7:57:48 GMT -8
So Again Im not great with codes.
In the old version of Proboard there was a code to switch quickly between accounts with out logging out first..
I hope someone can make a code that can go in my plugin sidetable
The old code:
<div id="socialLogins" style="cursor:pointer;text-align:center;"></div>
<script>
(function(){
var gY=window.gigya,gYd=gY.services.socialize;
if(gY&&gYd&&!document.getElementById('componentDiv1')){
var ae = window.addEventListener?['addEventListener','load']:['attachEvent','onload']
window[ae[0]](ae[1],function(){
if(!gYd || !gYd.plugins){var ac=arguments.callee; ac.count=('count'in ac?ac.count++:0); if(ac.count<1000)setTimeout(ac,500);return}
var d=document,g='getElementById',l,q,r,s,t,u='',v,z=gYd.plugins.login.modules;
for(q in z){
if("object" == typeof(z[q]) && "pageDiv" in z[q])l=z[q].pageDiv; else l=null;
if(l){
for(s=l.getElementsByTagName('img'),t=0;t<s.length;t++){
v=s[t].parentNode.parentNode;
u += '<img src="'+s[t].src+ '" width="'+s[t].width+ '" height="'+s[t].height+ '" onclick="pb_openOverlay(); gigya_id = 0; gigya.services.socialize.plugins.login.providerClick(\''+q+'\',\''+v.title.toLowerCase()+'\')">&nbs'+'p;';
}
}
}
if(u)d[g]('socialLogins').innerHTML=u;
},false)
}
})()
</script>
<form action="/index.cgi" method="post" name="sideloginform" onsubmit="disable(this);if(location.href.indexOf('action=logout')==-1)this.redirect.value=location.href;">
<input type="hidden" value="/index.cgi" name="redirect">
<input type="hidden" name="action" value="login2">
<img onload="document.getElementById('sidelogout').style.display=(pb_username=='Guest'?'none':'')" src="http://s3.images.proboards.com/blank.gif">
<center><table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody><tr>
<td width="50%"><center><font size="1pt">username:</font></center></td>
<td width="50%"><input type="text" name="username" size="18" tabindex="3001" maxlength="18" class="sidelogin user"></td>
</tr><tr>
<td width="50%"><center><font size="1pt">password:</font></center></td>
<td width="50%"><input type="password" name="password" size="18" tabindex="3002" class ="sidelogin password"></td>
</tr><tr title="stay logged in">
<td width="50%"><center><font size="1pt">stay on:</font></center></td>
<td width="50%"><input type="checkbox" id="minutesinput1" name="minutes" tabindex="3003"></td>
</tr><tr>
<td width="100%" align="center" colspan="2">
<input type="submit" value=" login " tabindex="3004" class="sidelogin submit">
<input type="button" style="display: none;" id="sidelogout" onclick="location.href='/index.cgi?action=logout'" value="Logout" class="sidelogin logout">
<center><font size="1pt"><a href="/index.cgi?action=register" class="sidelogin register">new</a></font> |
<font size="1pt"><a href="/index.cgi?action=forgotpassword" class="sidelogin forgot">forgot</a></font></center>
</td></tr>
</tbody></table></center>
</form>
Thanks!