Sorta a mod

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Suggested Hosts
Locked
Download15
Registered User
Posts: 8
Joined: Thu Apr 15, 2010 12:56 am

Sorta a mod

Post by Download15 » Sun Apr 18, 2010 4:45 pm

Is there a way to get profiles on an external page? I have the login through the whole site using this....
Here is the link to my site

Code: Select all

<?php 
   //phpbb3 login, user session management
   $phpbb_root_path = './forums/';
   $returnAddress ='../index.php';
   //including phpBB3 stuff   
   define('IN_PHPBB', true);
   $phpEx = substr(strrchr(__FILE__, '.'), 1);
   include($phpbb_root_path . 'common.' . $phpEx);
   include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

   // Start phpbb3 session management
   $user->session_begin();
   $auth->acl($user->data);
   $user->setup('viewforum');
?>

Code: Select all

<?php

if($user->data['is_registered'])
{
echo("<span class='font-12'>Hi <b>" . $user->data['username'] . "</b>!</span>&nbsp;<a href=" . $phpbb_root_path . 'ucp.php?mode=logout&redirect=../index.php' . '&sid=' . $user->data['session_id'] . " class='menulink'>Logout</a>");
}
else
{
echo('<table border="0">
<span class="font-12">You are not logged in, please do so or <a href="/forums/ucp.php?mode=register">Register</a></span><br><form action="forum/ucp.php" method="post" enctype="multipart/form-data">
<tr>
  <td><input type="text" value="Username" name="username" class="user" size="15" onFocus="this.value=\'\'"></td>
  <td><input type="password" value="Password" name="password" class="pass" size="15" onFocus="this.value=\'\'"></td>
  <input type="hidden" name="redirect" value="../index.php">
  <td>Remember me:<input type="checkbox" name="autologin" id="autologin" class="checkbox"></td>
  <td><input type="submit" value="Login" name="login">
</tr>
</table>
</form>
');
} ?>

surfer247
Registered User
Posts: 145
Joined: Sat Jul 19, 2008 3:41 am
Location: University of Florida
Name: Todd
Contact:

Re: Sorta a mod

Post by surfer247 » Sun Apr 18, 2010 7:43 pm

I'm not sure what you mean by profiles?
Come visit me at Toddred.com!

Download15
Registered User
Posts: 8
Joined: Thu Apr 15, 2010 12:56 am

Re: Sorta a mod

Post by Download15 » Sun Apr 18, 2010 8:41 pm

Like displaying posts, avatar, etc.

surfer247
Registered User
Posts: 145
Joined: Sat Jul 19, 2008 3:41 am
Location: University of Florida
Name: Todd
Contact:

Re: Sorta a mod

Post by surfer247 » Mon Apr 19, 2010 1:17 am

There us a template.php page mod that will allow you to make pages that require the same login as the forums. This can be used to find the users information through the $user object. Here's the link to the mod:
http://www.phpbb.com/mods/db/index.php? ... ib_id=7435
Come visit me at Toddred.com!

Locked

Return to “[3.0.x] MOD Requests”