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.

Login to forumotion forums from different site?

3 posters

Go down

Login to forumotion forums from different site? Empty Login to forumotion forums from different site?

Post by mrchasez November 22nd 2011, 4:17 pm

Forumotion hosts my forums, but on my main site ( not forumotion )
I want to have a login / register thing. So they could login and register from my website?
Is this possible?
avatar
mrchasez
Forumember

Posts : 34
Reputation : 0
Language : United States

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by LGforum November 22nd 2011, 5:20 pm

Yes.
The best way to do it, would be to make a HTML page on your forum, with a log in form in. (the log in form will obviously log people into your forum).
Then on your actual site, have an Iframe displaying that log in form.
Therefore they can log in to your forum.

To make them register, then you'll just have to have a link on your site.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by mrchasez November 22nd 2011, 6:40 pm

uh.

An example?
I was looking more like, they can register / login and stay on my main site.
avatar
mrchasez
Forumember

Posts : 34
Reputation : 0
Language : United States

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by LGforum November 22nd 2011, 7:44 pm

Yes. This will do just that.

Take my steps slowly.
Create a log in form in a HTML page. This tutorial will provide a log in form for you: https://help.forumotion.com/t262-log-in-form-for-the-faq

After that, go to your main site. And have somewhere:
Code:

<iframe src="URL OF YOUR FORUM HTML PAGE WITH LOG IN FORM" width="SET THE WIDTH" height="SET THE HEIGHT" frameborder="0" name="fmlogin"></iframe>

And that will mean, on your main site, people will see a log in form. That when they enter their details in it. It will log them into your site.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by mrchasez November 23rd 2011, 8:33 am

How can i get this but for registering >??????

It lets the user login, but my whole forums becomes a little box on my webstie 0.0

How can i do that but for registering?
avatar
mrchasez
Forumember

Posts : 34
Reputation : 0
Language : United States

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by mrchasez November 23rd 2011, 8:39 am

Better yet, how about when they login from the login on my website, It auto takes them to my forums?
avatar
mrchasez
Forumember

Posts : 34
Reputation : 0
Language : United States

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by LGforum November 23rd 2011, 10:15 am

You'll need to use Javascript to change the functions of things inside the Iframe.

Someting like this will (should) work:
Code:

$(function() {
var iframe=parent.fmlogin;
$(iframe).find('form').attr('target','_top');
});

So when the form is submitted, it submits and changes the actual page, not the contents in the iframe. Thus taking the user to your forum.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by ioncube November 24th 2011, 12:17 am

LGforum wrote:You'll need to use Javascript to change the functions of things inside the Iframe.

Someting like this will (should) work:
Code:

$(function() {
var iframe=parent.fmlogin;
$(iframe).find('form').attr('target','_top');
});

So when the form is submitted, it submits and changes the actual page, not the contents in the iframe. Thus taking the user to your forum.

Trying to understand your code using this as a html code for the login form
Code:
 <form action="http://engineering.forumotions.info/login.forum" method="post">
    <table cellspacing="1" cellpadding="3" border="0">
      <tr>
        <td width="25%" align="right"><br />
        Username:</td>

        <td><input type="text" name="username" id="username" size="11" maxlength=
        "40" /></td>
      </tr>

      <tr>
        <td align="right"><br />
        Password:</td>

        <td><input type="password" name="password" id="password" size="11" maxlength=
        "32" /></td>
      </tr>

      <tr align="center">
        <td colspan="2">Remember me: <input type="checkbox" name="autologin" checked=
        "true" /></td>
      </tr>

      <tr align="center">
        <td colspan="2"><input type="submit" class="mainoption" name="login" value=
        "Log in" /></td>
      </tr>
    </table>
  </form>

I cannot understand this part
Code:
var iframe=parent.fmlogin;
...& this
Code:
$(iframe).find('form').attr('target','_top');
supposedly will add target blank feature to form tag Yes?
ioncube
ioncube
Forumember

Male Posts : 279
Reputation : 41
Language : eng
Location : Pakistan

http://defencedog.blogspot.com/

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by LGforum November 24th 2011, 2:03 am

if you look at the Iframe HTML you can see i have given it a name of 'fmlogin'

Code:

<iframe src="URL OF YOUR FORUM HTML PAGE WITH LOG IN FORM" width="SET THE WIDTH" height="SET THE HEIGHT" frameborder="0" name="fmlogin"></iframe>
And so it can be accessed in JS by:
Code:

var iframe=parent.fmlogin;

Now it can be manipulated like other elements. For some examples:
Code:

iframe.style.display="none";
iframe.style.width="100%";
etc etc...

In my original code it was actually wrong.
It was supposed to be var iframe=parent.fmlogin.document;
Therefore the DOM of the contents within the iframe is accessed.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by mrchasez November 24th 2011, 5:32 am

So i should add that to my index.html
or make a Js file?
avatar
mrchasez
Forumember

Posts : 34
Reputation : 0
Language : United States

Back to top Go down

Login to forumotion forums from different site? Empty Re: Login to forumotion forums from different site?

Post by ioncube November 24th 2011, 8:05 am

Plus one for explaination
ioncube
ioncube
Forumember

Male Posts : 279
Reputation : 41
Language : eng
Location : Pakistan

http://defencedog.blogspot.com/

Back to top Go down

Back to top

- Similar topics

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