1 (edited by NicKy 2006-01-30 12:25)

Topic: login integration , weird problem [FIXED]

hi !
i have a problem to integrate the login in my homepage :
*if i log in through the homepage then go to the forum you're not connected. (with new threads link for exemple, if u just type /forum in url it works)
*if you log in through the forum then go to the homepage you're connected.

i'm pretty sure it's a cookies / session problem .. but can't figure it out.

login : test ; pass : test


define('PUN_TURN_OFF_MAINT', 1); // if forums go down the site will not
define('PUN_QUIET_VISIT', 0); // update last visit when outside of the forums            
            if($pun_user['is_guest']){ // If the user is guest
            <a id="r" href="<? echo _PATH; ?>forum/register.php">REGISTER</a>
            <a id="fp" href="<? echo _PATH; ?>forum/login.php?action=forget">PASSWORD?</a>
            <form id="login" method="post" action="<? echo _PATH; ?>forum/login.php?action=in" onsubmit="return process_form(this)">
            <p><input type="hidden" name="form_sent" value="1" />
            <input type="hidden" name="redirect_url" value="<? echo _PATH; ?>index.php" /></p>            
            <p class="upinputspace"><input class="upinput" type="text" value="<?php echo $lang_common['Username'] ?>" name="req_username" tabindex="1"/></p>
            <p class="upinputspace"><input class="upinput" type="password" value="<?php echo $lang_common['Password'] ?>" name="req_password" tabindex="2"/></p>
            <p class="upsubmitspace"><input class="upsubmit" type="submit" name="login" value="SUBMIT" tabindex="3" /></p>
            }else{ // The user is registered
             echo "<ul id='userlinks'>";
             echo "<li>Welcome ".$pun_user['username']."<br /><a href='"._PATH."forum/profile.php?id=".$pun_user['id']."'>Profile</a></li>";
                echo "<li><a href='"._PATH."forum/search.php?action=show_new'>Show new posts</a></li>";
             echo "<li><a href='"._PATH."forum/login.php?action=out&id=".$pun_user['id']."'>Logout</a></li>";
             echo "</ul>";

2 (edited by Smartys 2006-01-21 17:46)

Re: login integration , weird problem [FIXED]

Works fine for me (I tried logging into the site with the info you gave)


Re: login integration , weird problem [FIXED]

weird.. u loggued in into the site then u clicked on a new threadsand u was loggued in the forum??

Re: login integration , weird problem [FIXED]


Re: login integration , weird problem [FIXED]

Works fine

6 (edited by gezz 2006-01-30 06:52)

Re: login integration , weird problem [FIXED]

i just added this to mypage (http://www.greasyspoon.org) but i cleaned it up a bit and added a couple echo's instead of breaking in and out of php. smile

Works great.



Re: login integration , weird problem [FIXED]

ok i found the bug : i put http://micromediateam.com instead of www.micromediateam.com in the panel admin for the path.
So the cookies was bugued

8 (edited by gezz 2006-02-05 05:16)

Re: login integration , weird problem [FIXED]

Is it possible to show "There are new messages" on any php page?

I have the Private Message mod and when a new message is recieved it displays "There are new messages" in the pun header. I was wondering if this chould be applied to this script aswell?

Maybe Connorhd can shead some light on this?

Maybe Ill post this in the Private Message thread...