PrestashopTrackglobe Posted March 23, 2011 Share Posted March 23, 2011 Then the question but it seems odd is very simple:PHPBB + Prestashop am joining and I need to know how I can identify in PHPBB from Prestashop authentication form.Currently, I have a separate page (not PHPBB and Prestashop) where if you enter username and pasword PHPBB identifies and redirects you to the page you want.So far so easy, but of course, as I make in the form Prestashop, identify yourself and also for PHPBB.Keep in mind that the code I use to PHPBB loguerame from outside in it is: ><?php define('IN_PHPBB', true); // se define que se va a usar phpbb. $site_root_path=""; $phpbb_root_path = $_SERVER['DOCUMENT_ROOT'] .'/Foro/'; $phpbb_url_path = 'http://www.midominio.com/Foro/'; // la url hacia tu phpbb3 $phpEx = substr(strrchr(__FILE__, '.'), 1); // tipo de extension include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'config.' . $phpEx); $user->session_begin(); $auth->acl($user->data); ?> <?php if($user->data['is_registered']) { //en phpbb3_ suponemos que el prefijo de la tabla es phpbb3_ $conexion = mysql_connect('localhost', 'username', 'pass); mysql_select_db('tienda'); $avvy = "SELECT * FROM phpbb_users WHERE user_id =" . $user->data['user_id']; $result = mysql_query($avvy) or die (mysql_error()); while($row = mysql_fetch_array($result)) { $link = $row['user_avatar']; $width = $row['user_avatar_width']; $height = $row['user_avatar_height']; }?> data['user_id'];?> " target="_self"> </pre> <table width="145" border="0" cellpadding="0" cellspacing="0" style="height:392px;"> Hola data['user_id'];?> " target="_self"> <?php echo $user->data['username'];?> ! Visita tu Panel de control <?php echo( "data['session_id] . " >Cerrar Sesion");?>. 0 </table> <br><br><br><br><?php <br>} else { <br>?> <br><table width="145" border="0" cellpadding="0" cellspacing="0" style="height:392px;"> <form action="<?php echo $phpbb_url_path?>ucp.php?mode=login" target="_top" method="post" enctype="multipart/form-data"> Usuario: <input name="username" type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 110px; BORDER-BOTTOM: 0px" value="" size="10" /> Contraseña: <input type="password" name="password" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 110px; BORDER-BOTTOM: 0px" size="10" maxlength="32" > <input type="checkbox" name="autologin" id="autologin" class="checkbox" value="ON" /> Autologin <input type="hidden" name="redirect" value="../index.php"> Soy nuevo Recordar password <input type="submit" value=" Entrar " name="login" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 60px; BORDER-BOTTOM: 0px"> </form></td> </table> <br><br><br><br><br><?php } <br><br Keep in mind that the first lines are needed to identify the user in PHPBB, etc, but the place where I put in Prestashop strip error.What I wish is finally PHPBB + Prestashop join, do it myself, and explain them all as I've done.The operation is as follows.- Identification and registration through Prestashop. - If you sign in automatically Prestashop PHPBB - If you sign in automatically PrestaShop you do in PHPBB to pretend that there is only one user. - Only you can change the user through PrestaShop - PrestaShop smoothly Living in PHPBB perhaps just samrty functions, iniciode session, etc., so that even if you are in the forum keep your cart, etc.Can you help a bit different from everyone?PS: To make things easier, is in the same DB Prestashop and PHPBBThank you very much for your helpGreetings Link to comment Share on other sites More sharing options...
Recommended Posts