Jump to content

phpBB integrated to my Login System


Dyno

Recommended Posts

hi for my website i'm trying to create a good login system thats integrated with my phpBB forums.  does anyone know a good place i can find a good resource to make one or a good eBook that will help me create something like this. or point me in the right direction if something already exsists.
Link to comment
https://forums.phpfreaks.com/topic/26105-phpbb-integrated-to-my-login-system/
Share on other sites

i've looked into that but i want to learn to make my own script that will allow me ot make my own login system and integrate it myself with phpBB.  i'm just trying to find a eBook or a website that will help me with the development basics

edit: i've tried those scripts like phpnuke and that but they just dont seem to be what im looking for.
[code]<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
if(!$userdata['session_logged_in']) {
echo ' ';
?>
<form method="post" action="forum/login.php">
Name: <input class="post" type="text" name="username" size="12" style="font-family: Arial; font-size: 10px; border: 1px solid #808080"/><br>

Pass: <input class="post" type="password" name="password" size="12" style="font-family: Arial; font-size: 10px; border: 1px solid #808080"/>
<br>Auto: <input class="text" type="checkbox" name="autologin" />
<input type="submit" class="mainoption" name="login" value="Log in" style="border: 1px solid #333333; font-family:Arial; font-size:10px; color:#000000; text-transform:uppercase; background-color:#E9E9E9" />

<font size="1" face="verdana, Arial, Helvetica, sans-serif">
<img src="images/icon_mini_search.gif" border="0" align="middle">&nbsp;<a href="forum/search.php">Search</a>
&nbsp;
<img src="images/icon_mini_register.gif" border="0" align="middle">&nbsp;<a href="forum/profile.php?mode=register">Register</a></font>
  </form>
 

<?php
}
else {
echo '<font size="2" face="Arial, verdana, Helvetica, sans-serif">Hi, '.$userdata['username'] ;
echo '</font><br><font size="1" face="Arial, verdana, Helvetica, sans-serif">';
echo '<img src="images/folder.gif" border="0" align="middle"> <a href="'.append_sid("forum/privmsg.php?folder=inbox").'" title="Private Messages">Inbox</a> ['.$userdata['user_new_privmsg'].']';
echo ' <img src="images/icon_mini_profile.gif" border="0" align="middle"> <a href="'.append_sid("forum/profile.php?mode=editprofile").'" title="Edit profile">Profile</a><br>';
echo '<img src="images/icon_mini_search.gif" border="0" align="middle"> <a href="'.append_sid('forum/search.php').'">'.$lang['Search'].'</a>';
echo ' <img src="images/icon_mini_search_new.gif" border="0" align="middle">  <a href="'.append_sid('forum/search.php?search_id=newposts').'">'.$lang['Last_Post'].'</a><br>';
echo '<img src="images/icon_mini_login.gif" border="0" align="middle"> <a href="'.append_sid('forum/login.'.$phpEx.'?logout=true&amp;sid=' . $userdata['session_id']).'">Logout</a> </font><br>';


}

?>[/code]

use the code and it will be fine.
  • 2 weeks later...
  • 2 weeks later...
[code]<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);

if($userdata['session_logged_in']) {
//Put code for custom member's page here
}
else {
//Normal page and login form
}
?>[/code]

Of course, you probably don't want it structured like that. But you get the idea. You also have access to all the user data for the person logged in. Do var_dump($userdata) while logged in to see what you can play with.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.