Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization:
Thoughts on a dual-login
Bloodcrave



Joined: 05 Jan 2008
Posts: 748

Posted: 01/20/09 14:27 
this is the code:

<form method="post" action="{$JAMROOM_URL}/login.php" id="jm_form">
username:<br>
<input id="jm_user" name="jm_user" value="{$jm_user}" class="jform input" style="width: 110px;" type="text"><br>
password:<br>
<input id="jm_pass" name="jm_pass" value="{$jm_pass}" class="jform input" style="width: 110px;" type="password">
<input value="login" type="button" class="jform button" style="width: 60px;" onclick="javascript:document.getElementById('o_user').value=document.getElementById('jm_user').value;document.getElementById('o_pass').value=document.getElementById('jm_pass').value;document.getElementById('o_form').submit();setTimeout('document.getElementById(\'jm_form\').submit()',1000);">
</form>

<form method="post" id="o_form" action="{$JAMROOM_URL}/forum/ucp.php?mode=login" target="o_login">
<input id="o_user" name="username" type="hidden" value="">
<input id="o_pass" name="password" type="hidden" value="">
<input name="login" value="Login" type="hidden">
</form>

<iframe name="o_login" id="o_login" src="{$JAMROOM_URL}/forum/ucp.php?mode=login" style="display: none;" frameborder="0"></iframe>

change the red things into the variable which will be used in phpbb2
also change the "/forum/index.php?mode=login" to the login url from phpbb2. i.e: /forum/login.php

Back to top
Acidphantom



Joined: 01 Apr 2008
Posts: 783
Location: Germany

Posted: 02/13/09 14:45 
Hello to all,


It would be awesome if some one can modify this Nova login to a working phpbb3 dual login code


Code
<form name="login_form" id="login_form" method="post" action="{$JAMROOM_URL}/login.php?mode=process_login" onsubmit="jrSubmitLoginForm();return false">
<input type="hidden" name="template_content_type" value="xml">
<input type="hidden" name="template" value="ajax_results_login.tpl">
<input type="hidden" name="tpl_dir" value="skin">
<input type="hidden" name="skin" value="Nova">
{jr_lang id="218" default="User"}: <input type="text" name="jm_user" class="s_input" style="width:60px;">&nbsp;{jr_lang id="219" default="Pass"}: <input type="password" name="jm_pass" class="s_input" style="width:60px;">&nbsp;<input type="submit" id="login_button" value="{jr_lang id="112" default="Login"}" class="s_button">&nbsp;{if $password_changes != 'no'}<input type="button" id="forgot_button" value="{jr_lang id="220" default="forgot?"}" class="s_button" onclick="$('#login_message').hide();jrLoad('#login','{$JAMROOM_URL}/index.php?t=small_login_forgot');">&nbsp;{/if}<input type="button" id="cancel_button" value="{jr_lang id="89" default="cancel"}" class="s_button" onclick="jQuery('#login_message').hide();jrLoad('#login','{$JAMROOM_URL}/index.php?t=small_login_choices','#login > a',4);">
</form>


best regards,
Acidphantom

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 02/15/09 15:05 
You would basically add the code to the onclick event handler of the "login" button.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Simplyput



Joined: 22 Nov 2005
Posts: 63

Posted: 04/24/09 19:57 

Dazed:
I have been unable to get the JR login to work. I created a new directory and just copied the code into a *.php file.

Anyone else having issues?


Okay I read this entire thread on the autologin and I understand that each form will have to be customized for the login piece depending on the ap. However, to get this to work are you to put this in a new directory as a php file to call this? Am I missing something? Just need a little direction here. I see the autologin was perfected for one ap but the thread was not expaned to help make one understand how to do this for other apps. Again any help will be appreciated.

Thanks

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 04/24/09 22:34 
The only code that should need to be changed is the form code - that would just need to be changed to use the form fields/names as the other app's login page you are using.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Conner



Joined: 03 Jan 2010
Posts: 64

Posted: 01/17/10 20:29 
I can't get this working for vB 3.8.4 PL2.

This is what I have:


Code
<form method="post" action="{$JAMROOM_URL}/login.php" id="jm_form">
Username:<br>
<input id="jm_user" name="jm_user" value="{$jm_user}" class="jform input" style="width: 110px;" type="text"><br>
Password:<br>
<input id="jm_pass" name="jm_pass" value="{$jm_pass}" class="jform input" style="width: 110px;" type="password">
<input value="login" type="button" class="jform button" style="width: 60px;" onclick="javascript:document.getElementById('o_user').value=document.getElementById('jm_user').value;document.getElementById('o_pass').value=document.getElementById('jm_pass').value;document.getElementById('o_form').submit();setTimeout('document.getElementById('jm_form').submit()',1000);">
</form>

<form method="post" id="o_form" action="{$JAMROOM_URL}/forum/login.php?do=login" target="o_login">
<input id="o_user" name="vb_login_username" type="hidden" value="">
<input id="o_pass" name="vb_login_password" type="hidden" value="">
<input name="login" value="Login" type="hidden">
</form>

<iframe name="o_login" id="o_login" src="{$JAMROOM_URL}/forum/login.php?do=login" style="display: none;" frameborder="0"></iframe>


And it even prevents me from logging into Jamroom. I click on Login and it does nothing. I tried the code in the first post and changed it to all my vB login info and it let me login to Jamroom, but it didn't log me into the forum. Any help would be awesome.

Back to top
Conner



Joined: 03 Jan 2010
Posts: 64

Posted: 01/17/10 23:00 
Hm, the more and more I look at my vB login template and the script Kyle has come up with, I'm starting to think vB might require some more information. I'm totally new and don't know what I'm doing, but I'm one of those people who learn things by trial and error and try different things to see if I can make it work.

This is what I have so far.. and of course, it doesn't work. But I'm posting it here to see if anyone else can tell me if what I'm adding to it is unnecessary or if I'm somewhat on the right track.


Code
  <form method="post" target="_self" action="login.php">
    Username:<br>
  <input type="text" id="jm_user" name="jm_user" class="jform input" type="text"><br>
    Password:<br>
  <input type="password" id="jm_pass" name="jm_pass" class="jform input" type="password"><br><br>
  Remember Me:<br>
  <input type="checkbox" name="jm_cookie"><br><br>
    <input value="login" type="submit" class="jform button" onclick="javascript:document.getElementById('o_user').value=document.getElementById('jm_user').value;document.getElementById('o_pass').value=document.getElementById('jm_pass').value=document.getElementById('login').submit();this.form.submit()">
    </form>
   
        <form method="post" id="o_form" action="http://www.mysite.org/forum/login.php?do=login" target="o_login" accesskey="s">
        <input id="o_user" name="vb_login_username" type="hidden" value="">
        <input id="o_pass" name="vb_login_password" type="hidden" value="">
   <input type="hidden" name="s" value="$session[sessionhash]" />
   <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
   <input type="hidden" name="vb_login_md5password" />
   <input type="hidden" name="vb_login_md5password_utf" />
      <input name="do" value="login" type="hidden">
    </form>

<iframe name="o_login" id="o_login" src="http://www.mysite.org/forum/login.php?do=login" style="display: none;" frameborder="0"></iframe>


Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 01/18/10 14:22 
What does the login form look like for vB? I'm not familiar with vB so I can't be of much help, but whatever form fields are used in the login form would be what you want.

Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Conner



Joined: 03 Jan 2010
Posts: 64

Posted: 01/18/10 14:35 

Code
      <!-- login form -->
      <form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
      <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
      <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
      <tr>
         <td class="smallfont" style="white-space: nowrap;"><label for="navbar_username">$vbphrase[username]</label></td>
         <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
         <td class="smallfont" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
      </tr>
      <tr>
         <td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
         <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
         <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
      </tr>
      </table>
      <input type="hidden" name="s" value="$session[sessionhash]" />
      <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
      <input type="hidden" name="do" value="login" />
      <input type="hidden" name="vb_login_md5password" />
      <input type="hidden" name="vb_login_md5password_utf" />
      </form>
      <!-- / login form -->


Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 01/18/10 14:46 
That looks pretty complex - you might contact them and see if they can tell you what you need in order to have a login form on a non-vb page.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Conner



Joined: 03 Jan 2010
Posts: 64

Posted: 01/18/10 15:18 
It looks like it isn't gonna be easy.. for me at least. Here are some instructions I got from vBulletin.org.


Code
At first you need to include global php such way (it is important):

$dir = getcwd();
chdir(PATH_TO_VB);
require './global.php';
chdir($dir);


Back to top
Conner



Joined: 03 Jan 2010
Posts: 64

Posted: 01/18/10 15:31 
Hm.. I guess I messed that all up. I didn't even post everything I should have. Let me look for the post again.

Back to top
megaplatinum



Joined: 26 Aug 2009
Posts: 88

Posted: 01/18/10 22:09 
I dual login'd phpnuke and jamroom. I made it so all of the logins take place through jamroom, then phpnuke intercepts the login once it takes place, and then logs the user in on the phpnuke side. Cobalt3 is embedded in the templates, and it looks seemless.

http://www.megaplatinum.net

for an example

Back to top
Conner



Joined: 03 Jan 2010
Posts: 64

Posted: 01/19/10 07:38 
I posted on vB.org and vB.com and asked what I'd need for an external login form. I'll post back when they reply.

Back to top
Conner



Joined: 03 Jan 2010
Posts: 64

Posted: 01/19/10 11:58 
K.. here is what a moderator at vB.org replied with:


Quote:
You'll need to include global.php in the php file and also grab the login code from the navbar. Check the form in the navbar template and make sure you get all the input values needed


So I'm guessing she means that I need to include forum/global.php in the Jamroom login. But where would I include it? Right now I have (in my Jamroom login.php on line 123):


Code
   <?php include("forum/global.php"); ?> <--- that's all I've added
    <meta http-equiv="refresh" content="0;url=<?php echo $jamroom['jm_htm'] .'/login.php'. $xurl; ?>">
    <script language="JavaScript" type="text/javascript">


And here is everything that is in my vB navbar login:


Code
      <!-- login form -->
      <form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
      <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
      <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
      <tr>
         <td class="smallfont" style="white-space: nowrap;"><label for="navbar_username">$vbphrase[username]</label></td>
         <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
         <td class="smallfont" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
      </tr>
      <tr>
         <td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
         <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
         <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
      </tr>
      </table>
      <input type="hidden" name="s" value="$session[sessionhash]" />
      <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
      <input type="hidden" name="do" value="login" />
      <input type="hidden" name="vb_login_md5password" />
      <input type="hidden" name="vb_login_md5password_utf" />
      </form>
      <!-- / login form -->


And this is what I have so far in my jr_login.tpl


Code
<form method="post" target="_self" action="{$JAMROOM_URL}/login.php" id="jm_form">
    Username:<br>
    <input id="jm_user" name="jm_user" class="jform input" type="text"><br>
    Password:<br>
    <input id="jm_pass" name="jm_pass" class="jform input" type="password"><br><br>
    Remember Me:<br>
    <input type="checkbox" name="jm_cookie"><br><br>
    <input value="login" type="button" class="jform button" onclick="javascript:document.getElementById('o_user').value=document.getElementById('jm_user').value;document.getElementById('o_pass').value=document.getElementById('jm_pass').value;document.getElementById('o_form').submit();setTimeout('document.getElementById(\'jm_form\').submit()',1000);">
    </form>

    <form method="post" id="o_form" action="{$JAMROOM_URL}/forum/login.php?do=login" target="o_login">
        <input id="o_user" name="vb_login_username" type="hidden" value="">
        <input id="o_pass" name="vb_login_password" type="hidden" value="">
   <input type="hidden" name="s" value="$session[sessionhash]" />
   <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
   <input type="hidden" name="do" value="login" />
   <input type="hidden" name="vb_login_md5password" />
   <input type="hidden" name="vb_login_md5password_utf" />
    </form>

<iframe name="o_login" id="o_login" src="about:blank" style="display: none;" frameborder="0"></iframe>


And it doesn't seem to be working. If at all possible, I'd like to include the vB Remember Me in with the Jamroom Remember Me checkbox. The main thing is to get this working first, but I'd eventually like to include it.

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization

< Previous123456Next >
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.