why login twice

Suggestions for WarcraftRealms.com
Post Reply
User avatar
Vaisteen
Posts: 52
Joined: Wed Feb 01, 2006 10:20 am
Location: Tacoma, Washington

why login twice

Post by Vaisteen »

why do i have to login and then login again when i get to the forums? it just seems kinda pointless to me, but maybe rollie has some reason for it and yes i know theres an "automatically login" option but i spend alot of time on shared computers so i don't realistically have that option.

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

Well, see, I'm lazy, and while it is possible to hack phpbb to do logins from outside the forums, I've had more pressing issues to attend to =)
phpbb:phpinfo()

User avatar
Ceto
Shady Dealer
Posts: 335
Joined: Sun Oct 16, 2005 8:22 pm
Location: Plymouth, NH
Contact:

Post by Ceto »

The fix involves setting the phpBB cookie to be site-wide so that all pages receive the cookie. Then, you add the following code to your site-wide initialization script:

Code: Select all

// http://www.phpbb.com/kb/article.php?article_id=143

define('IN_PHPBB', true);
$phpbb_root_path = '/path/to/phpBB/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
Optionally, add a function to determine if a user is logged in.

Code: Select all

function logged_in() {
    global $userdata;

    if($userdata['session_logged_in']) return true;

    return false;
}
But Rollie already knew that. ;)
Image

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

Yeah, I dinked with that some a while back, couldn't get it working smoothly and just haven't spent anymore time messing with it.
phpbb:phpinfo()

User avatar
Vaisteen
Posts: 52
Joined: Wed Feb 01, 2006 10:20 am
Location: Tacoma, Washington

Post by Vaisteen »

i hate to be picky :lol: but could yall say that in normal english

User avatar
Ceto
Shady Dealer
Posts: 335
Joined: Sun Oct 16, 2005 8:22 pm
Location: Plymouth, NH
Contact:

Post by Ceto »

Vaisteen wrote:i hate to be picky :lol: but could yall say that in normal english
"It can be done, it's just a matter of finding the time to do it."
Image

User avatar
Vaisteen
Posts: 52
Joined: Wed Feb 01, 2006 10:20 am
Location: Tacoma, Washington

Post by Vaisteen »

ahh thank you :D as i am more computer litterate than most i don't quite get all the code stuff

Hybuir
Gear Dependent Squirrel
Gear Dependent Squirrel
Posts: 1471
Joined: Tue Sep 06, 2005 6:22 am
Location: Austin, TX
Contact:

Post by Hybuir »

Vaisteen wrote:i hate to be picky :lol: but could yall say that in normal english
We could fix it, but the pizza's here... 8)

User avatar
Vaisteen
Posts: 52
Joined: Wed Feb 01, 2006 10:20 am
Location: Tacoma, Washington

Post by Vaisteen »

mmm pizza good :lol:

User avatar
Sianni
Goddess
Posts: 291
Joined: Sat Sep 10, 2005 9:57 am
Location: West Coast, USA

Post by Sianni »

Hybuir wrote:We could fix it, but the pizza's here... 8)

mmmmm... now I'm hungry.

Post Reply