New Zenner
- Join Date:
- Sep 2006
- Location:
- UK
- Posts:
- 13
- Plugin Contributions:
- 0
Simultaneous login to zen-cart phpbb2 and by extension gallery 2
**If I wanted the people on my website to be able to log on to zen-cart and phpbb2 simultaneously, the simplest way would be to have a form with email address, forum ID and password on it. My current code is designed for people to log onto just phpbb2 and I'm not sure what to do in order to get it sending data off to zen cart and phpbb2.
At the top of the page:**
<?php define('IN_PHPBB', true); $phpbb_root_path = './forums/'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); // // Start session management // $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); // // End session management // ?>At the relevant point:
<?php if( $userdata['session_logged_in'] ) { echo '<form action="/forums/login.php?logout=true?"; method="post" font-family: Book Antiqua> <input type="submit" value="logout" name="logout"></form>'; } else { echo '<form action="/forums/login.php"; method="post" font-family: Book Antiqua> <input type="hidden" name="redirect" value="../index.php"> <input type="text" value="username" name="username" font-family:Book Antiqua> <br> <input type="password" value="password" name="password" font-family:Book Antiqua> <input type="submit" value="login" name="login"> </form>'; } ?>**The code in red doesn't work anyways but is there for completeness sake:-/
As far as I can tell from the topics in this forum, when you log into the shopping cart, it doesn't log you into the forum automatically- so which bits would Ihave to modify to get it two log into both seamlessly?
Also- I have Gallery 2, which does not have a register function as phpbb2 registered users have an auto create ID function for it. Has anyone else had the same set up and know whether it still works when the forum ID is created by Zen?**