Pls Can someone Translate to the English this?

Moderator: ariadneduvessa

Locked
User avatar
crow
Joomla! Explorer
Joomla! Explorer
Posts: 304
Joined: Mon Aug 29, 2005 5:17 pm
Location: Austria
Contact:

Pls Can someone Translate to the English this?

Post by crow » Wed Oct 19, 2005 8:06 pm

I need help, can someone translate this to the English i need it to import joomla user to phpbb.

http://www.phpbb.globalfree.net/forum/v ... .php?p=102

Code: Select all

#################################################################
## Mod Title:phpBB&mambo Users
## Mod Version: 0.0.2 :: Segunda Feira, 11 Abril, 2005 22:05 GMT
## Author: Álvaro Martins alvaromartins@globalfree.net
## URL: http://www.phpbb.globalfree.net
## Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
## Description: Mambo e phpBB ( standalone ) integração de utilizadores.
##                  
##                   Para fóruns phpBB já existentes que vão instalar mambo
##                   Para portais mambo já existentes e que vão instalar o phpBB
##                   Para instalações novas de mambo e phpBB
##                   Para instalações já existentes de ambos os sistemas
##                 
##
## Installation Level: Médio
## Installation Time: 15 Minutes
## Files To Edit:
## phpBB  > /includes/usercp_register.php
## Mambo > /components/com_registration/registration.php
##
## Included Files: copyphpbb2mambo.php, copymambo2phpbb.php, Install_phpBB&mamboUsersMOD_Portuguese.txt, Install_phpBB&mamboUsersMOD_English.txt
#################################################################
## Termos de uso: Esta mod não pode ser colocada ou adicionada em foruns nao oficiais de phpBB ou Mambo
#################################################################
#
#################################################################
#
#-----[ Abrir ]------------------------------------------
#
/includes/usercp_register.php
#
#-----[ Pesquisar ]------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
         }
#
#-----[ Na linha a seguir adicionar ]------------------------------------------
#
// phpBB&mambo Users - Inicio da alteração
// URL: http://www.phpbb.globalfree.net
// Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
$sql = "insert into mos_users (name, username, email, password) values ('" . str_replace("\'", "''", $username) . "',  '" . str_replace("\'", "''", $username) . "',  '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $new_password) . "')";
         if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
         {
            message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
         }
// phpBB&mambo Users - Fim da alteração
#
#-----[ Abrir ]------------------------------------------
#
com_registration/registration.php
#
#-----[ Pesquisar ]------------------------------------------
#
  if ( $mosConfig_useractivation == "1" ){
      echo _REG_COMPLETE_ACTIVATE;
   } else {
      echo _REG_COMPLETE;
   }
#
#-----[ Na linha a seguir adicionar ]------------------------------------------
#
// phpBB&mambo Users - Inicio da alteração
// URL: http://www.phpbb.globalfree.net
// Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
$passwordmonica = md5($pwd);
$regdate = strtotime ("now");
$sql = "insert into phpbb_users (username, user_password, user_email, user_regdate) values ('".$username."', '". $passwordmonica."', '".$email."', '". $regdate."')";
   $database->setQuery( $sql );
   if (!$database->query()) {
      die("SQL error" . $database->stderr(true));
   }
// phpBB&mambo Users - Fim da alteração
// URL: http://www.phpbb.globalfree.net
// Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102#
##
##
##
##
## Mod Title:phpBB&mambo Users
## Mod Version: 0.0.2 :: Segunda Feira, 11 Abril, 2005 22:05 GMT
## Author: Álvaro Martins alvaromartins@globalfree.net
## URL: http://www.phpbb.globalfree.net
## Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
## Description: Mambo e phpBB ( standalone ) integração de utilizadores.
Thnx
BosanskoHercegovacki Chat Komjuniti
http://www.chat.ba

 
User avatar
bigodines
Joomla! Hero
Joomla! Hero
Posts: 2237
Joined: Thu Aug 18, 2005 11:10 am
Location: Floripa, Brazil
Contact:

Re: Pls Can someone Translate to the English this?

Post by bigodines » Wed Oct 19, 2005 8:42 pm

ok, in short:

open this file (phpbb):
/includes/usercp_register.php

search for:

Code: Select all

message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
         } 
below insert the following lines :

Code: Select all

// phpBB&mambo Users - Inicio da alteração
// URL: http://www.phpbb.globalfree.net
// Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
$sql = "insert into mos_users (name, username, email, password) values ('" . str_replace("\'", "''", $username) . "',  '" . str_replace("\'", "''", $username) . "',  '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $new_password) . "')";
         if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
         {
            message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
         }
// phpBB&mambo Users - Fim da alteração 
now open:
com_registration/registration.php  (mambo)

search for:

Code: Select all

  if ( $mosConfig_useractivation == "1" ){
      echo _REG_COMPLETE_ACTIVATE;
   } else {
      echo _REG_COMPLETE;
   } 
then add these lines:

Code: Select all

// phpBB&mambo Users - Inicio da alteração
// URL: http://www.phpbb.globalfree.net
// Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
$passwordmonica = md5($pwd);
$regdate = strtotime ("now");
$sql = "insert into phpbb_users (username, user_password, user_email, user_regdate) values ('".$username."', '". $passwordmonica."', '".$email."', '". $regdate."')";
   $database->setQuery( $sql );
   if (!$database->query()) {
      die("SQL error" . $database->stderr(true));
   }
// phpBB&mambo Users - Fim da alteração
// URL: http://www.phpbb.globalfree.net
// Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102# 
this snippet shall add new users into both (mambo/joomla, and phpbb) user tables. Now, to import the existing users (next post on that url you gave) from mambo to the phpBB database we shall do this:


create a new file and insert these lines (change the parameters to the mysql_connect ( http://www.php.net/mysql_connect ) according to your database configuration.

Rename "basededados" to your database name. (ctrl+f may help ya a lot ;P)

Code: Select all

$conn=mysql_connect('localhost','basededados','password');;                

if ($conn)
{
//
//
// Segunda alteração
//
// Substituir "basededados", pelo nome da base de dados
// Substituir "mos_users", pelo nome da tabela de utilizadores do mambo ( mos_users por defeito )
   $status = mysql_query("select * from basededados.mos_users");
               if($status == false)
                  echo ("Erro 1");
   else
   {
   $linha = mysql_fetch_row($status);
   while($linha != false)
      {
           $regdate = strtotime ("now");
// Substituir "basededados", pelo nome da base de dados
// Substituir "phpbb_userss", pelo nome da tabela de utilizadores do phpbb ( phpbb_users por defeito )
           $sql="insert into basededados.phpbb_users (username, user_email, user_password, user_regdate) values ('$linha[2]', '$linha[3]', '$linha[4]', '$regdate')";
           mysql_query($sql);
#######################################################################################################
## Termos de uso: Esta mod não pode ser colocada ou adicionada em foruns nao oficiais de phpBB ou Mambo
#######################################################################################################
           $linha = mysql_fetch_row($status);
           }
        mysql_close($conn);
   }
}
else
   echo ("Erro");
## Mod Title:phpBB&Mambo Users
## Mod Version: 0.0.2 :: Segunda Feira, 11 Abril, 2005 22:05 GMT
## Author: Álvaro Martins alvaromartins@globalfree.net
## URL: http://www.phpbb.globalfree.net
## Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
## Description: Mambo e phpBB ( standalone ) integração de utilizadores.
##                  
##                   Para fóruns phpBB já existentes que vão instalar mambo
##                   Para portais mambo já existentes e que vão instalar o phpBB
##                   Para instalações novas de mambo e phpBB
and then run it :)

now (finally) if you have a phpBB forum and would like to install mambo. this is your script:
(again, rename "basededados" and fix the mysql_connect() function)

Code: Select all

<?php
## Mod Title:phpBB&Mambo Users
## Mod Version: 0.0.2 :: Segunda Feira, 11 Abril, 2005 22:05 GMT
## Author: Álvaro Martins alvaromartins@globalfree.net
## URL: http://www.phpbb.globalfree.net
## Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
## Description: Mambo e phpBB ( standalone ) integração de utilizadores.
##                  
##                   Para fóruns phpBB já existentes que vão instalar mambo
##                   Para portais mambo já existentes e que vão instalar o phpBB
##                   Para instalações novas de mambo e phpBB
##                   Para instalações já existentes de ambos os sistemas
//
//
// Para fóruns phpBB já existentes que vão instalar mambo
//
//
// Primeira alteração
//
// Substituir "basededados", pelo nome da base de dados onde estão as tabelas do phpbb e do mambo
// Substituir "password" pela password do user associado à base de dados onde estão as tabelas do phpbb e do mambo
$conn=mysql_connect('localhost','basededados','password');;                

if ($conn)
{
//
//
// Segunda alteração
//
// Substituir "basededados", pelo nome da base de dados
// Substituir "phpbb_users", pelo nome da tabela de utilizadores do mambo ( phpbb_users por defeito )
   $status = mysql_query("select * from basededados.phpbb_users");
               if($status == false)
                  echo ("Erro 1");
   else
   {
   $linha = mysql_fetch_row($status);
   while($linha != false)
      {
           $regdate = strtotime ("now");
// Substituir "basededados", pelo nome da base de dados
// Substituir "mos_users", pelo nome da tabela de utilizadores do Mambo ( mos_users por defeito )
           $sql="insert into basededados.mos_users (name, username, email, password, registerDate) values ('$linha[2]', '$linha[2]', '$linha[32]', '$linha[3]', '$regdate')";
           mysql_query($sql);
#######################################################################################################
## Termos de uso: Esta mod não pode ser colocada ou adicionada em foruns nao oficiais de phpBB ou Mambo
#######################################################################################################
           $linha = mysql_fetch_row($status);
           }
        mysql_close($conn);
   }
}
else
   echo ("Erro");
## Mod Title:phpBB&Mambo Users
## Mod Version: 0.0.2 :: Segunda Feira, 11 Abril, 2005 22:05 GMT
## Author: Álvaro Martins alvaromartins@globalfree.net
## URL: http://www.phpbb.globalfree.net
## Mod URL: http://www.phpbb.globalfree.net/forum/viewtopic.php?p=102
## Description: Mambo e phpBB ( standalone ) integração de utilizadores.
##                  
##                   Para fóruns phpBB já existentes que vão instalar mambo
##                   Para portais mambo já existentes e que vão instalar o phpBB
##                   Para instalações novas de mambo e phpBB
##                   Para instalações já existentes de ambos os sistemas
?>
and then run it.

I don't know if it will work :D (let us know ;) )

cheers,
matheus

User avatar
crow
Joomla! Explorer
Joomla! Explorer
Posts: 304
Joined: Mon Aug 29, 2005 5:17 pm
Location: Austria
Contact:

Re: Pls Can someone Translate to the English this?

Post by crow » Thu Oct 20, 2005 2:34 pm

Thnx bigodines for translating this, i will try to do something with it, if i success i will post here ofcourse :))


Thnx once more time.
BosanskoHercegovacki Chat Komjuniti
http://www.chat.ba

 

Locked

Return to “Portuguese Forum”