Jump to content

One-time login for both My Gallery and Forum users


Guest salsa

Recommended Posts

Guest salsa

Hi,

Am impressed with how well you have integrated the 2 software. Would like to know how you managed to have a single login for both software. Can I have the hack as well?

Thank you!

Salsa

Link to comment
Share on other sites


PhotoPost will integrate with phpBB with the username and login with the instructions they give you. Then, there is a hack to phpBB to keep the "session" open when they leave the forum and enter the PhotoPost folder.

That hack requires you to edit the login.php script with the following:

/* /////// Find in login.php /////// */
if( $session_id )
{
if( !empty($HTTP_POST_VARS['redirect']) )
{
header($header_location.append_sid($HTTP_POST_VARS['redirect'], true));
exit;
}
else { 
header($header_location.append_sid("index.$phpEx", true));
exit;
}
}

/* And change it to: //////// */

if( $session_id )
{
if( !empty($HTTP_POST_VARS['redirect']) )
{
setcookie( "phpbb2uid", $row['user_id'], time()+2592000, "/" );
setcookie( "phpbb2pw", md5($password), time()+2592000, "/" );
header($header_location. append_sid($HTTP_POST_VARS['redirect'], true));
exit;
}
else {
setcookie( "phpbb2uid", $row['user_id'], time()+2592000, "/" );
setcookie( "phpbb2pw", md5($password), time()+2592000, "/" );
header($header_location. append_sid("index.$phpEx", true));
exit;
}
}


/* FIND /////////////// */

if( $userdata['session_logged_in'] ) { 
session_end($userdata['session_id'], $userdata['user_id'
]);
}


/* And change it to: ///////////*/

if( $userdata['session_logged_in'] )
{
setcookie( "phpbb2uid", "", time()-3600, "/");
setcookie( "phpbb2pw", "", time()-3600, "/");
session_end($userdata['session_id'], $userdata['user_id']);
}

This is shown on the PhotoPost support forum in this message. You'll need your password to access the thread. Also, this works for phpBB 2.0.3, but not 2.0.4 ... some have used the 2.0.3 version of login.php for 2.0.4.

Obviously, with all of this you need to make sure you have a backup copy of your login.php file in a safe place!

Also, here is the code in the header file (HEADER.HTM) that works with Netscape 4.x, and as seen here in the My Gallery:

<body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5493B4" />
<a name="top"></a>
<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
	<td>
	<table width="100%" cellspacing="0" cellpadding="0" border="0">
		<tr>
			<td valign="top"><a href="http://www.messing-about.com/photopost">
  				    <img src="http://www.messing-about.com/templates/subSilver/images/gallery.gif" border="0" alt="My Gallery" vspace="1" /></a>
			</td>

			<td align="center" width="100%" valign="middle"><span class="maintitle">messing-about.com</span><br /><span class="gen">"There is nothing - absolute NOTHING - half so much<BR> worth doing as simply messing about in boats."<br /> </span>
			  <span class="copyright">Kenneth Graham's "Wind in the Willows"</span><br /><br />
	    	  <span class="mainmenu">
				<a href="http://www.messing-about.com" class="mainmenu">Home</a>  |    
					<a href="http://www.messing-about.com/forum" class="mainmenu">Forums</a>  |  
				<a href="http://www.messing-about.com/homeport" class="mainmenu"><i>My Home Port</i></a>  |  
				<a href="http://www.messing-about.com/links/linkster.php" class="mainmenu">Links</a> <br />
  					<a href="http://www.messing-about.com/weekender" class="mainmenu">Weekender</a>  |  
				<a href="http://www.messing-about.com/smallboats" class="mainmenu">Small Boats</a>  |  
				<a href="http://www.messing-about.com/gaffrig" class="mainmenu">Gaff Rig Page</a> <br />
				<a href="http://www.messing-about.com/store" class="mainmenu">Gift Shop</a>  |  
				<a href="http://www.messing-about.com/books" class="mainmenu">Boatbuilding Books</a> 
			  </span>
			</td>
		</tr>
	</table>

	</td>
</tr>
</table>

<table width=100% border=0>
 <tr>
     <td valign="top">

Hope this helps!

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.