SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    integrate phpbb without frame.

    I have a page that loads phpbb in a frame with this code:
    PHP Code:

    $forum_link
    ="phpBB2/index.php";
    if(
    $VAR[4]){
        
    $result mysql_query("SELECT username, user_password FROM phpbb_users WHERE username='".$VAR[4]."'");
        while(
    $row mysql_fetch_array($resultMYSQL_ASSOC))
            {
            
    $forum_nick=$row['username'];
            break;
            }
        
    $result mysql_query("SELECT password FROM user WHERE user='".$VAR[4]."'") or die(mysql_error());
            while(
    $row mysql_fetch_array($resultMYSQL_ASSOC))
                {
                
    $forum_pass=$row['password'];
                break;
            }
     
    $forum_link="phpBB2/login.php?login=yes&username=".$forum_nick."&password=".$forum_pass;

        }

    $DATA="<IFRAME SRC=\"".$forum_link."\" TITLE=\"The MYSITE.com Forum\" width=100% HEIGHT=1000 FRAMEBORDER=0>"
    in phpbb's login.php I've added:
    PHP Code:

    if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && (!$userdata['session_logged_in'] || isset($HTTP_POST_VARS['admin'])) )
        {
            
    $username = isset($HTTP_GET_VARS['username']) ? phpbb_clean_username($HTTP_GET_VARS['username']) : '';
            
    $password = isset($HTTP_GET_VARS['password']) ? $HTTP_GET_VARS['password'] : '';
           
            if(empty(
    $username)||empty($password))
                {
            
    /*Moded this section to allow primarly the vars to be passed by the GET instead of the POST
            */
            
    $username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
            
    $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
                } 

    This will logged in the user to phpbb if the user have already logged in to the main site. What I'm trying to figure out is how to get rid of the frame page that loads phpbb. I want the user to go directly/logged in to phpbb's index.php page without the frame page.

    Can someone help me with this?
    SparkyGames.com - Play Free Games!

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Instead of writing an iframe tag, redirect the user to the $forum_link URL you created. If your code is the first thing appearing in the page, you can use header("Location: url"). Otherwise, you'll need JavaScript or a meta refresh.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •