Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-09-2005, 10:14 AM phpbb login help!
Extreme Talker

Posts: 171
Trades: 0
I made this really basic phpbb login below. When some one is already loged in i want the script to say welcome [user name].
HTML Code:
Forum Login

<form action="http://www.somplanet.com/forums/login.php" method="post" target="_top">

Username: <input type="text" name="username" size="25" maxlength="40" value="" />

Password: <input type="password" name="password" size="25" maxlength="32" />

<input type="hidden" name="redirect" value="" /><input type="submit" name="login" class="mainoption" value="Log in" />

</form>
mohamoud is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-09-2005, 11:22 AM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
whats the name you've used to prefix the PHPBB cookie?? (this is found somewhere in your Administration Panel under one of the settings) then i can give u a whole code for it
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 06-09-2005, 11:37 AM
Extreme Talker

Posts: 171
Trades: 0
the cookie name is phpbb2mysql
mohamoud is offline
Reply With Quote
View Public Profile
 
Old 06-12-2005, 07:58 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
ok, so turns out you don't actually need the cookie name :P

This little hack should work, but since i've not tested it (as i dont need it!) i'm not too sure, but here goes.

PHP Code:
<?php

$phpbb_root_path 
you need to find out this, and place it here;

include(
$phpbb_root_path 'common.php');

$userdata session_pagestart($user_ipPAGE_INDEX);
init_userprefs($userdata);

if ( 
$userdata['session_logged_in'] )
   
$username $userdata['username'];
{ echo 
"Welcome $username"; } else {
echo(
'
Forum Login

<form action="http://www.somplanet.com/forums/login.php" method="post" target="_top">

Username: <input type="text" name="username" size="25" maxlength="40" value="" />

Password: <input type="password" name="password" size="25" maxlength="32" />

<input type="hidden" name="redirect" value="" /><input type="submit" name="login" class="mainoption" value="Log in" />

</form>'
);
}
?>
Like i said, this is completely untested - and my formatting is awful!! If this does not work, have u tried the PHPBB forums?? they openly post many hacks.
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to phpbb login help!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19498 seconds with 12 queries