Author Topic: Compatir Base de Datos con Foro PHPBB2  (Read 23856 times)

0 Members and 1 Guest are viewing this topic.

Offline tyrwebmaster

  • Pre-Newbie
  • Posts: 6
    • View Profile
Compatir Base de Datos con Foro PHPBB2
« on: March 19, 2005, 05:55:59 PM »
Pues eso... tengo un foro en phpbb2 y me gustaria que tubiera los mismos usuarios sin que tengan que registrarse dos veces. Como se haria??
Instale 4gallery con el mismo nombre de base de datos pero parece que no comparte usuarios.
Un saludo  8O

Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #1 on: March 19, 2005, 06:46:12 PM »
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe

Offline tyrwebmaster

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #2 on: March 19, 2005, 09:14:40 PM »
Gracias excited... haber si alguien me lo puede traducir la instalacion...
 :)

Offline tyrwebmaster

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #3 on: March 19, 2005, 09:19:22 PM »
  ==========================================================
              Integration 4images 1.7 / phpBB 2
  ==========================================================

  Note: Main part in sessions.php is adapted from of phpBB
        (C) 2001 The phpBB Group
        phpBB and the file sessions.php are released under
        the GNU General Public License

  ----------------------------------------------------------
  Installation
  ----------------------------------------------------------

  1. Replace the template user_loginform.html in your templates
     folder with the file in this zip.

  2. Replace the file sessions.php in your includes folder with
     the file in this zip.

  3. Open sessions.php and edit the configuration part at the top
     of the file.

  4. Open includes/constants.php and edit the following parts:
     ---------
    Change:
       define('SESSIONS_TABLE', $table_prefix.'sessions');

    to:
       define('SESSIONS_TABLE', 'phpbb_sessions');
       (Maybe you should change the table prefix "phpbb_")
    ---------
    Change:
       define('USERS_TABLE', $table_prefix.'users');

    to:
       define('USERS_TABLE', 'phpbb_users');
       (Maybe you should change the table prefix "phpbb_")
     ---------
    Change:
       define('GUEST', -1);
       define('USER_AWAITING', 1);
       define('USER', 2);
       define('ADMIN', 9);

     to:
       define('GUEST', -1);
       define('USER_AWAITING', -1);
       define('USER', 0);
       define('ADMIN', 1);
     ---------
    Change:
       define('ADMIN_SAFE_LOGIN', 1);

    to:
       define('ADMIN_SAFE_LOGIN', 0);


  ----------------------------------------------------------
  Installation Notes
  ----------------------------------------------------------

  1. Integration works only if the tables of 4images and
     phpBB are on the same database.

  ---------

  1. We recommend you to use integration only with fresh new
     installations of 4images because of the following reason:
     In the 4images user-table User A has the User-ID "1".
     After integration 4images will use the user-table of phpBB.
     There, the User A has the User-ID "2" and User B the
     User-ID "1".
     All images, comments and usergroup memberships are now
     "owned" by User B.

  ---------

  2. If you run 4images and phpBB under different subdomains,
     for example http://4images.domain.com and http://phpbb.domain.com,
     you should use the following setting for phpBB in
     "General Admin -> Configuration":

       Cookie Domain = .domain.com

     Note the point at the beginning!

  ---------

  3. If you delete users, you should delete the user first over
     the Control Panel of 4images and after that over the
     Administration Panel of phpBB.
     This is neccessary to delete/modify all user-related data
     from the 4images database (images, comments, usergroups).

Offline tyrwebmaster

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #4 on: March 19, 2005, 09:58:20 PM »
tengo un problemilla con la instalacion.. sigo los pasos indicados----me sale esto al final

DB Error: Bad SQL Query: SELECT s.session_user_id, s.session_lastaction, s.session_ip, u.user_id, u.user_level, u.user_name, u.user_invisible FROM foro_sessions s LEFT JOIN foro_users u ON (u.user_id = s.session_user_id) WHERE s.session_lastaction >= 1111265476 ORDER BY u.user_id ASC, s.session_ip ASC
Unknown column 's.session_lastaction' in 'field list'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM gallery_images i, gallery_categories c LEFT JOIN foro_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND c.cat_id = i.cat_id LIMIT 0, 1
Unknown column 'u.user_name' in 'field list'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM gallery_images i, gallery_categories c LEFT JOIN foro_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0) ORDER BY i.image_date DESC LIMIT 3
Unknown column 'u.user_name' in 'field list'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhost/tuscanipassion.com/home/html/gallery/includes/db_mysql.php on line 116




La extension que puse en vez de phpbb_ es foro_  ¿Tiene algo que ver?
Ayudarme
Gracias

Offline tyrwebmaster

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #5 on: March 19, 2005, 10:42:06 PM »
ok.. ya lo tengo resuelto!!!!!

El tema estaba que tenia lo del phpbb_ por foro_
Debes cambiarlo en en sessions.php que te dan el zip de integracion. Cambias todo los phpbb_ por el nombre de las tablas, en mi caso foro_

Y en el includes/constants.php

Change:
define('SESSIONS_TABLE', $table_prefix.'sessions');

to:
define('SESSIONS_TABLE', 'foro_sessions');
(Maybe you should change the table prefix "phpbb_")
---------
Change:
define('USERS_TABLE', $table_prefix.'users');

to:
define('USERS_TABLE', 'foro_users');
(Maybe you should change the table prefix "phpbb_")

Ya esta todo resuelto.. si teneis dudas... yo ya lo tengo claro
Un saludo

Offline tyrwebmaster

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #6 on: March 19, 2005, 10:56:12 PM »
Lo unico que en el 4images me da errores de login y eso... a que puede ser...
probarlo si podeis...

www.tuscanipassion.com/foro
www.tuscanipassion.com/gallery


Offline sneaker

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #7 on: March 25, 2005, 03:21:56 AM »
 :D Hola hice una pequeña funcion para una instalacion que ya tiene previos usuarios en el 4images y quieren mudarlos al phpbb para compartir la tabla al fussionar los dos sistemas..

<?
//funcion para sacar los datos de 4images y meterlos a phpbb
//oscararzola
//2005
function Conectarse()
{
   if (!($link=mysql_connect("localhost","xxxx","dxxxx")))
   {
      echo "Error conectando a la base de datos.";
      exit();
   }
   if (!mysql_select_db("oscararz_v12",$link))
   {
      echo "Error seleccionando la base de datos.";
      exit();
   }
   return $link;
}
//primero sacamos los datos de la db y los imprimimos
 $link=Conectarse();
   $result=mysql_query("select * from 4images_users order by user_id DESC",$link);
      $num_rows = mysql_num_rows($result);
     $contador = 1;
   while($row = mysql_fetch_array($result)){
   $user = $row["user_name"];
   $email = $row["user_email"];
   $pass = $row["user_password"];
   $contador++;
//si el foro ya tiene usuarios activos poner en lugar de 1 el numero de usuarios que tenga el foro
   $userid = 1+$contador;
   //echo ($user.$email.$pass."<br>");
   mysql_query("insert into foro_users (user_id,username,user_email,user_password,user_regdate) values ('$userid','$user','$email','$pass','1111703844')",$link);
    if (mysql_query) {
   echo "Registros insertados".$contador."<br>";
   }
    }
   mysql_free_result($result);
   mysql_close($link);
?>

Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #8 on: March 25, 2005, 12:11:06 PM »
Saludos  tyrwebmaster

En la galería el error que te da, es que no enuentra la página de registro,, es que la has desactivado ?

excitex2
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe

Offline yoshi_afcl

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #9 on: March 26, 2005, 06:32:20 AM »
Bueno, pues lo hice, pero algo raro pasa:

1.-Si me logea, pero lo hace al foro
2.- que y que, configuro en "constants.php" si mi foro esta en www.afcl.com.mx/foro/   ?
3.- Esta parte de sessions.php es para poner la ruta del foro?

// Set here the URL to your phpBB forum. WITH trailing slash! >>>¿?....
$url_app           = "http://www.afcl.com.mx/download/"; //donde ./download es la ruta del 4images

// Set here different URL's to your phpBB forum.
// Normally no need to change.
$url_register      = $url_app."profile.php?mode=register";
$url_lost_password = $url_app."profile.php?mode=sendpassword";
$url_control_panel = $url_app."profile.php?mode=editprofile";
$url_mailform      = $url_app."profile.php?mode=email&u={user_id}";
$url_show_profile  = $url_app."profile.php?mode=viewprofile&u={user_id}";
$url_login         = $url_app."login.php";
$url_logout        = $url_app."login.php?logout=true";

----------------------------------------------------------------
podrian ayudarme?... me pase todo el dia tratando de hacer esto, la direccion del foro es www.afcl.com.mx/foro/ y la del 4images es www.afcl.com.mx/download/

gracias...

Offline astrock

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #10 on: April 02, 2005, 01:52:06 AM »
intente hacer lo que dice el install del zip pero me arroja los siguientes errores:
por que?

EL PREFIJO DE phpbb es: phpbb_

y 4image estaba en otra base de datos. que es esta afterclo_imga2 no enuentro la forma de cambiar la direccion de la tabla.

DB Error: Bad SQL Query: SELECT * FROM phpbb_config
Table 'afterclo_imga2.phpbb_config' doesn't exist

DB Error: Bad SQL Query: SELECT * FROM phpbb_sessions WHERE session_id = '080b6413fd5aaacbfd448fb85808c84b'
Table 'afterclo_imga2.phpbb_sessions' doesn't exist

DB Error: Bad SQL Query: SELECT ban_ip, ban_userid, ban_email FROM phpbb_banlist WHERE ban_ip IN ('c81597af', 'c81597ff', 'c815ffff', 'c8ffffff') OR ban_userid = -1
Table 'afterclo_imga2.phpbb_banlist' doesn't exist

DB Error: Bad SQL Query: UPDATE phpbb_sessions SET session_user_id = -1, session_start = 1112398692, session_time = 1112398692, session_page = 0, session_logged_in = 0 WHERE session_id = '080b6413fd5aaacbfd448fb85808c84b' AND session_ip = 'c81597af'
Table 'afterclo_imga2.phpbb_sessions' doesn't exist

DB Error: Bad SQL Query: INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) VALUES ('40ccb1530adfab38b1f80177f8849b6e', -1, 1112398692, 1112398692, 'c81597af', 0, 0)
Table 'afterclo_imga2.phpbb_sessions' doesn't exist

DB Error: Bad SQL Query: SELECT u.user_id, u.root, u.astrock, u.user_allow_viewonline, s.session_user_id, s.session_time, s.session_ip FROM phpbb_users u, phpbb_sessions s WHERE u.user_id = s.session_user_id AND (s.session_time >= 1112398392 OR u.user_session_time >= 1112398392) ORDER BY u.user_id ASC, s.session_ip ASC
Table 'afterclo_imga2.phpbb_users' doesn't exist

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.astrock FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN (0, 8, 9, 14) AND c.cat_id = i.cat_id LIMIT 27, 1
Table 'afterclo_imga2.phpbb_users' doesn't exist

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.astrock FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0, 8, 9, 14) ORDER BY i.image_date DESC LIMIT 3
Table 'afterclo_imga2.phpbb_users' doesn't exist

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/afterclo/public_html/Imagenes/includes/db_mysql.php on line 116

GRAICAS!!

Offline astrock

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #11 on: April 02, 2005, 02:29:50 AM »
NO ESOY BIEN, ya pude arreglar el problema, pero tengo otro.

cuando el usuario inicio sesion, se lanza para la direccion del foro, pero de todas maneras no carga.

aparece la pagina NO SE ENCONTRO PAGINA.

que puedo hacer para que no aparesca eso.

tengo el foro y la galeria en el mismo dominio.
el foro se encuentra en: www.afterclock.com/modulos/foro/
y la galeria en: www.afterclock.com/Imagenes/

si quieren pueden probar

usuario:  the_one
clave: 123456

GRACIAS!!!.

Offline Rol

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #12 on: February 24, 2006, 01:43:37 PM »
Hola..dónde puedo encontar el mod completo...me sale que no lo encuentra en todos los enlaces que he buscado: http://www.4homepages.de/forum/index.php?topic=1658.0

Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #13 on: February 26, 2006, 01:16:28 AM »
Saludos,,,

Lee este post : http://www.4homepages.de/forum/index.php?topic=9917.msg6985#msg6985 ,,, pero no dejes de leer el resto de post que forman el topic.

Lee también este otro : http://www.4homepages.de/forum/index.php?topic=6895.msg30187#msg30187

excitex2
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe

Offline obravista

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Compatir Base de Datos con Foro PHPBB2
« Reply #14 on: November 24, 2008, 03:12:20 PM »
Bien, como veo que no están por la labor de echar una mano, pues elimino la pregunta.
« Last Edit: November 26, 2008, 11:00:10 PM by obravista »