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 Tue 14 May 2013 - 7: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 Wed 15 May 2013 - 0: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 Wed 15 May 2013 - 5: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 Wed 15 May 2013 - 17: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 Fri 17 May 2013 - 19: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 Sat 18 May 2013 - 1: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 Sat 18 May 2013 - 1: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 Sat 18 May 2013 - 14: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 Sun 19 May 2013 - 21: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 Sat 25 May 2013 - 10: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