Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/07/2008, 16:24
quevon24
 
Fecha de Ingreso: junio-2006
Mensajes: 83
Antigüedad: 17 años, 10 meses
Puntos: 0
Respuesta: Integrar phpbb3 con tu aplicacion web

Pues mira en tu indez de tu pagina hay que agregarle esto:

En tu index agregas esta linea hasta arriba.
Código PHP:
<? include("integrar.php"); ?>
integrar.php
Código PHP:
<?php  
define
('IN_PHPBB'true); // se dice que se usa el phpbb. 
$phpbb_root_path 'Foro/'// direccion directa del servidor a tu phpBB 
$phpbb_url_path 'http://tuweb.com/Foro/'// la url tu phpbb3 
$phpEx substr(strrchr(__FILE__'.'), 1); // extension 
include($phpbb_root_path 'common.' $phpEx); // se incluye common.php
include($phpbb_root_path 'config.' $phpEx); //se incluye para la info de tu base de datos como conexion, etc
include($phpbb_root_path 'includes/functions_display.' $phpEx);
include(
$phpbb_root_path 'includes/bbcode.' $phpEx);
// iniciamos sesion 
$user->session_begin(); 
$auth->acl($user->data); 
$user->setup();
?>
login.php
Tu podes personalizar el diseño de tu login. Yo tengo asi el mio
Código PHP:
<?php 
if($user->data['is_registered']) 

//en phpbb3_ suponemos que el prefijo de la tabla es phpbb3_ 
$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 80
$height 80
}
?>  
                  <A 
                  href="<?php echo $phpbb_url_path?>memberlist.php?mode=viewprofile&amp;u=<?php echo $user->data['user_id'];?> " 
                  target=_self></A><FONT face=Arial size=2>
                  <TABLE cellSpacing=0 cellPadding=0 width=300 background="" 
                  border=0>
                    <TBODY>
                    <TR>
                      <TD vAlign=top width=150 background="">
                                                <CENTER>Hola <a href="<?php echo $phpbb_url_path?>memberlist.php?mode=viewprofile&amp;u=<?php echo $user->data['user_id'];?> " target="_self"> <?php echo $user->data['username'];?> </A>! 
<IMG height=" <? echo $height?>" alt=Avatar 
                        src="<?php echo $phpbb_url_path?>download/file.php?avatar=<? echo $link?> " 
                        width="<? echo $width?> " border=0> </CENTER></TD>
                      <TD vAlign=top width=150 background="">
                        <LI><A href="<?php echo $phpbb_url_path?>ucp.php">Panel 
                        de Control</A> <BR>
                        <LI><?php echo( "<a href=" $phpbb_url_path 'ucp.php?mode=logout&redirect=index.php' '&sid=' $user->data['session_id'] . " >Cerrar Sesion</a>");?> 
                  </LI></TD></TR></TBODY></TABLE></FONT><?php 
} else { 
 
?>
                  <TABLE cellSpacing=0 cellPadding=0 width=145 border=0>
                    <TBODY>
                    <TR>
                      <TD vAlign=top align=middle width=145>
                        <P>
                        <FORM 
                        action="<?php echo $phpbb_url_path?>ucp.php?mode=login" 
                        method=post target=_top encType=multipart/form-data>
                        <META content="MSHTML 6.00.2800.1106" name=GENERATOR>
                        <TABLE cellSpacing=0 cellPadding=0 width=280 
                        background="" border=0>
                          <TBODY>
                          <TR>
                            <TD vAlign=top width=140 background="">
                              <CENTER><IMG height=75 alt=. hspace=0 
                              src="http://poderinterno.net63.net/avatar.jpg" 
                              width=75 border=1><BR><FONT face=Arial size=1><A 
                              title="Léete las condiciones y decide si quieres pertenecer a esta comunidad." 
                              href="<?php echo $phpbb_url_path?>ucp.php?mode=register">Registrarse</A></FONT></CENTER></TD>
                            <TD vAlign=top width=140 background=""><FONT 
                              face=Arial size=1>Usuario: <INPUT 
                              style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 110px; BORDER-BOTTOM: 0px" 
                              size=10 name=username> <BR>Contraseña:<BR><INPUT 
                              style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 110px; BORDER-BOTTOM: 0px" 
                              type=password maxLength=32 size=10 name=password> 
                              <BR><INPUT class=checkbox id=autologin 
                              type=checkbox value=ON name=autologin> Autologin 
                              <INPUT type=hidden value=../redirigir.php 
                              name=redirect> <INPUT style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 60px; BORDER-BOTTOM: 0px" type=submit value=" Entrar " name=login> 
                              </FONT></TD></TR></TBODY></TABLE></FORM></P></TD></TR></TBODY></TABLE><?php 
?></P></TD></TR>
Y ya hasta el final incliyes esta linea para que aparezca el login en la parte que quieras:
Código PHP:
<? include("login.php"); ?>