The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How do I add a swap account widget?

View previous topic View next topic Go down

How do I add a swap account widget?

Post by Jezzda on May 14th 2013, 7:32 am

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.

Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

Re: How do I add a swap account widget?

Post by Sandara on May 15th 2013, 12:51 am


Sandara
Forumember

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

Back to top Go down

Re: How do I add a swap account widget?

Post by Jezzda on May 15th 2013, 5:20 am

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

Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

Re: How do I add a swap account widget?

Post by Sandara on May 15th 2013, 5:49 pm

I tried searching through the search function here, and this is what i saw: http://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
Forumember

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

Back to top Go down

Re: How do I add a swap account widget?

Post by Jezzda on May 17th 2013, 7:10 pm

It doesn't work.

Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

Re: How do I add a swap account widget?

Post by nathanadhitya on May 18th 2013, 1:02 am

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 May 18th 2013, 1:03 am; edited 1 time in total (Reason for editing : Forgot the code tag)

nathanadhitya
Forumember

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

http://tr-teamwork.mydiscussionboard.com

Back to top Go down

Re: How do I add a swap account widget?

Post by Jezzda on May 18th 2013, 2:44 pm

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

Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

Re: How do I add a swap account widget?

Post by Jezzda on May 19th 2013, 9:25 pm

Bump

Jezzda
Forumember

Posts : 74
Reputation : 2
Language : English

Back to top Go down

Re: How do I add a swap account widget?

Post by underestimated on May 25th 2013, 10:16 am

@Sandara wrote:I tried searching through the search function here, and this is what i saw: http://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

underestimated
Forumember

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

Back to top Go down

View previous topic View next topic Back to top


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