The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How do I add a swap account widget?

4 posters

Go down

How do I add a swap account widget? Empty How do I add a swap account widget?

Post by Jezzda 14/5/2013, 00:32

How can I add a swap account widget? I'd like to create a widget that members that are logged in can type in their username and their password of another account then click "Swap", "Switch" or "Login" and it will log them out of their current account and log them into their new one. Like so just on the right.
avatar
Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by Sandara 14/5/2013, 17:51

Sandara
Sandara
Forumember

Female Posts : 106
Reputation : 5
Language : English, Filipino
Location : Somewhere over the rainbow

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by Jezzda 14/5/2013, 22:20

That unfortunately doesn't work :/ My version is Phpbb2
avatar
Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by Sandara 15/5/2013, 10:49

I tried searching through the search function here, and this is what i saw: https://help.forumotion.com/t122342-help-with-switch-characters-widget?highlight=switch+phpbb2

Though it is in the garbage, it would not hurt if you'll try the codes provided.
Sandara
Sandara
Forumember

Female Posts : 106
Reputation : 5
Language : English, Filipino
Location : Somewhere over the rainbow

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by Jezzda 17/5/2013, 12:10

It doesn't work.
avatar
Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by nathanadhitya 17/5/2013, 18:02

Here.... LOL
this is the code of it...

Code:
<span style="font-size: x-small;">    </span><script type="text/javascript">
    function switch_accounts() {
    jQuery.get(document.getElementById('logout').href, function() {
    jQuery.post('/login', 'login=1&username='+document.getElementById('swap_uname').value+'&password='+document.getElementById('swap_pass').value, function () {
    window.location.reload();
    });
    });
    }
    </script><center><span style="font-size: x-small;"><br>Username:<br><input id="swap_uname" type="text"><br>Password:<br></span>
    <span style="font-size: x-small;"><input id="swap_pass" type="password"><br><br></span>
    <span style="font-size: x-small;"><input value="Swap Accounts" onclick="switch_accounts();" type="button"></span><br><br></center><span style="font-size: x-small;">


</span></div>


Last edited by nathanadhitya on 17/5/2013, 18:03; edited 1 time in total (Reason for editing : Forgot the code tag)
avatar
nathanadhitya
Forumember

Male Posts : 98
Reputation : 2
Language : English And Indonesia

http://tr-teamwork.mydiscussionboard.com

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by Jezzda 18/5/2013, 07:44

That code doesn't work, it just logs me out and doesn't swap the account to the account I have entered.
avatar
Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by Jezzda 19/5/2013, 14:25

Bump
avatar
Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

How do I add a swap account widget? Empty Re: How do I add a swap account widget?

Post by underestimated 25/5/2013, 03:16

Sandara wrote:I tried searching through the search function here, and this is what i saw: https://help.forumotion.com/t122342-help-with-switch-characters-widget?highlight=switch+phpbb2

Though it is in the garbage, it would not hurt if you'll try the codes provided.

this one works fine for me and my version is phpbb2 too Wink
avatar
underestimated
Forumember

Posts : 32
Reputation : 2
Language : english, german
Location : germany

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum