Forums / General Questions / Integrating PHPBB3 with Zencart

Integrating PHPBB3 with Zencart

Locked

Views: 41,750

Results 21 to 40 of 82
This thread is locked. New replies are disabled.
17 Jan 2008, 3:37 PM
#21
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Integrating PHPBB3 with Zencart

Wondering if people are still working on this project, or if a final consensus has been reached as to the best actions for getting the forum/Zen Cart linkage?

19 Jan 2008, 2:30 PM
#22
madmumbler avatar

madmumbler

Zen Follower

Join Date:
Dec 2005
Location:
SWFL
Posts:
450
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

I don't have the time to devote to it right now. Hopefully in the next couple of weeks I can look at it more. I'm trying to get a big project finished.

Lesli in SW Florida ~ writer, teacher, and dodging hurricanes!

24 Jan 2008, 6:36 PM
#23
jobe avatar

jobe

New Zenner

Join Date:
Aug 2006
Posts:
20
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

Good day all,

I did find that PHPBB3 is using its own hashing function not MD5.

the funtion is phpbb_hash(password); and is located in includes/functions.php

14 Feb 2008, 8:36 PM
#24
igd avatar

igd

New Zenner

Join Date:
Nov 2004
Posts:
76
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

started working on this today, the above posts do not correctly hash the password and while it appears to work it makes any future bridge/session management painful to work with.

Dan - statuscontrols.com/web
web programming and design

28 Feb 2008, 9:58 PM
#25
vgration avatar

vgration

New Zenner

Join Date:
Feb 2008
Posts:
10
Plugin Contributions:
1

Re: Integrating PHPBB3 with Zencart

i have tried both example codes and my phpbb3 still does not get a new user when i sign up a new account on zen

10 Mar 2008, 7:56 AM
#26
pricecatch avatar

pricecatch

New Zenner

Join Date:
Mar 2008
Posts:
2
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

I think it's still not solved... I have downloaded version 1.3.8 and it doesn't seem to integrate properly with my phpBB3 during the zencart installation.

Someone suggested installing 1.3.8a, but the general finding is somewhat oblivious = meaning, problem still unsolved.

10 Mar 2008, 8:54 AM
#27
lazerradial2003 avatar

lazerradial2003

New Zenner

Join Date:
Aug 2007
Posts:
14
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

sadr1an1:

I have succesfuly begin integration with phpbb3, all i have managed to do is sincronising account creation from zencart into phpbb. After the modification in admin section Configuration->My store->Enable phpBB linkage? = true, and the config file, i have to modify class.phpbb.php, just the following function:

function phpbb_create_account($nick, $password, $email_address) {
if ($this->phpBB['installed'] != true || !zen_not_null($password) || !zen_not_null($email_address) || !zen_not_null($nick)) return false;
if ($this->phpbb_check_for_duplicate_email($email_address) == 'already_exists') {
// $this->phpbb_change_email($old_email, $email_address);
} else {
$sql = "select max(user_id) as total from " . $this->phpBB['users_table'];
$phpbb_users = $this->db_phpbb->Execute($sql);
$user_id = ($phpbb_users->fields['total'] + 1);
$sql = "insert into " . $this->phpBB['users_table'] . "
( username,username_clean, user_password, user_email, user_regdate)
values
( '" . $nick . "','" . $nick . "', '" . md5($password) . "', '" . $email_address . "', '" . time() ."')";
$this->db_phpbb->Execute($sql);
//could do a check here to see if Insert_ID() matches $user_id...

// @TODO: MySQL5

    //$sql = "INSERT INTO " . $this->phpBB['groups_table'] . " (group_name, group_desc, group_single_user, group_moderator)
    //        VALUES (0, 'Personal User', 1, 0)";
    //$this->db_phpbb->Execute($sql);
    //$group_id = $this->db_phpbb->Insert_ID();
    $sql = "INSERT INTO " . $this->phpBB['user_group_table'] . " (user_id, group_id, user_pending)
            VALUES ($user_id, 2, 0)";
    $this->db_phpbb->Execute($sql);
    //might optionally send an extra email welcoming them to the phpBB forum, reminding them of their nickname?
  }
}

Now when i register a new user in zencart it will be registered in phpbb too.
Now i'm loking for something like wordpress integration: wordpress is oppend inside zencart. If iwon\t find anithing usefull this day i will start customisation myself.:wink:

I used this method (page 2 of this thread I think) several months ago and It is working fine for me, is this not working for everyone else?

Thanks, Ben.

10 Mar 2008, 10:11 AM
#28
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

lazerradial2003:

I used this method (page 2 of this thread I think) several months ago and It is working fine for me, is this not working for everyone else?

Thanks, Ben.

Hello,

Could you please tell me your ways to do ? I read all of them but it still misunderstand ....

Thanks !

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

10 Mar 2008, 10:29 AM
#29
lazerradial2003 avatar

lazerradial2003

New Zenner

Join Date:
Aug 2007
Posts:
14
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

Inside the includes folder there is a file called: class.phpbb.php, look for: function phpbb_create_account($nick, $password, $email_address) {

This is the function which creates the new account, it looks very similar to the code above. replace the function (all of it, not just the title, i think it finshes just above the line: function phpbb_check_for_duplicate_nick($nick='') {) with the code above and it should work.

As has been mentioned, this code doesn't seem to use phpbb's new password hashing methods but it does work for now.

19 Mar 2008, 10:29 PM
#30
explode avatar

explode

New Zenner

Join Date:
Mar 2008
Posts:
1
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

Hello, was jsut dropping by to check how far devlopment was on this integration/brdige.

What features are there going to be? Becuase I may be interested in helping :)

20 Mar 2008, 1:54 AM
#31
andyii avatar

andyii

Zen Follower

Join Date:
Mar 2007
Posts:
153
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

Although it gets rid of the error, any one who signs up at the cart is Not registered in the forum.
any news on a complete fix?

lazerradial2003:

I used this method (page 2 of this thread I think) several months ago and It is working fine for me, is this not working for everyone else?

Thanks, Ben.

sadr1an1:

I have succesfuly begin integration with phpbb3, all i have managed to do is sincronising account creation from zencart into phpbb. After the modification in admin section Configuration->My store->Enable phpBB linkage? = true, and the config file, i have to modify class.phpbb.php, just the following function:

function phpbb_create_account($nick, $password, $email_address) {
if ($this->phpBB['installed'] != true || !zen_not_null($password) || !zen_not_null($email_address) || !zen_not_null($nick)) return false;
if ($this->phpbb_check_for_duplicate_email($email_address) == 'already_exists') {
// $this->phpbb_change_email($old_email, $email_address);
} else {
$sql = "select max(user_id) as total from " . $this->phpBB['users_table'];
$phpbb_users = $this->db_phpbb->Execute($sql);
$user_id = ($phpbb_users->fields['total'] + 1);
$sql = "insert into " . $this->phpBB['users_table'] . "
( username,username_clean, user_password, user_email, user_regdate)
values
( '" . $nick . "','" . $nick . "', '" . md5($password) . "', '" . $email_address . "', '" . time() ."')";
$this->db_phpbb->Execute($sql);
//could do a check here to see if Insert_ID() matches $user_id...

// @TODO: MySQL5

    //$sql = "INSERT INTO " . $this->phpBB['groups_table'] . " (group_name, group_desc, group_single_user, group_moderator)
    //        VALUES (0, 'Personal User', 1, 0)";
    //$this->db_phpbb->Execute($sql);
    //$group_id = $this->db_phpbb->Insert_ID();
    $sql = "INSERT INTO " . $this->phpBB['user_group_table'] . " (user_id, group_id, user_pending)
            VALUES ($user_id, 2, 0)";
    $this->db_phpbb->Execute($sql);
    //might optionally send an extra email welcoming them to the phpBB forum, reminding them of their nickname?
  }
}

Now when i register a new user in zencart it will be registered in phpbb too.
Now i'm loking for something like wordpress integration: wordpress is oppend inside zencart. If iwon\t find anithing usefull this day i will start customisation myself.:wink:

21 Mar 2008, 7:51 PM
#32
andyii avatar

andyii

Zen Follower

Join Date:
Mar 2007
Posts:
153
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

Have you got this sorted?
I see that you are over at phpBB and it would appear that you got something to work, if so, would you kindly explain what you did and to what file (s) you modified
I would be great full

SoftCorpse:

I have been messing around with phpbb3 and integrating it into zencart where as you would sign up in zencart the registration details would be sent over to the phpbb3 database and create the user on the forum at the same time.

I have managed to get it all working except for one thing:

user_email_hash

At the moment I have the following:

$user_email_hash = crc32(strtolower($email_address));

As this is close, it is not 100% correct as the value I should get for the e-mail address [email protected] should be:

21079953813

However with the above sql I get a value of:

210799538

As you can see it is short the last 2 digits.

I would like to know what sql I should use to get the correct crc32 value to send across to the phpbb3 database.

Thank you for your time & help.

Here is the current code I am using:

// use separate db connection with details from phpBB config file

if ($sniffer->phpBB['installed'] == true) {
require($sniffer->phpBB['phpbb_path'] . 'config.php');

$user_email_hash = crc32(strtolower($email_address));

$db_phpbb = new queryFactory();
$db_phpbb->connect($dbhost, $dbuser, $dbpasswd, $dbname, USE_PCONNECT, false);
$sql = "select max(user_id) as total from " . $table_prefix . TABLE_PHPBB_USERS;
$phpbb_users = $db_phpbb->Execute($sql);
$user_id = ($phpbb_users->fields['total'] + 1);
$sql = "insert into " . $table_prefix . TABLE_PHPBB_USERS . "
(user_id, user_type, group_id, username, username_clean, user_password, user_email, user_email_hash, user_regdate, user_inactive_reason, user_passchg, user_lastmark, user_inactive_time, user_lang, user_timezone, user_dst, user_style, user_dateformat)
values
('" . (int)$user_id . "', 1, 2, '" . $nick . "', '" . $nick . "', '" . md5($_POST['password']) . "', '" . $email_address . "', '" . $user_email_hash . "', '" . time() ."', 1, '" . time() ."', '" . time() ."', '" . time() ."', '" . en ."', 2, 1, 4, 'D M d, Y g:i a')";

$db_phpbb->Execute($sql);
$group_id = $db_phpbb->Insert_ID();
$sql = "INSERT INTO " . $table_prefix . TABLE_PHPBB_USER_GROUPS . " (user_id, group_id, group_leader, user_pending)
VALUES ($user_id, 2, 0, 0)";

$db_phpbb->Execute($sql);
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
}
// End phppBB stuff

30 Mar 2008, 6:34 PM
#33
kendur avatar

kendur

New Zenner

Join Date:
Mar 2008
Location:
NW Indiana
Posts:
71
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

I just set up my forum a couple of days ago.
I'm starting today on incorporating various posts from the forum into zen cart. I imagine incorporating sign ups should be used too.
I'll try what's posted here and see how it goes.

Ken

2 Apr 2008, 7:35 PM
#34
icemint avatar

icemint

New Zenner

Join Date:
Jan 2008
Posts:
32
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

Has anyone figured out keeping the sessions between ZenCart and phpBB3?

2 Apr 2008, 8:54 PM
#35
andyii avatar

andyii

Zen Follower

Join Date:
Mar 2007
Posts:
153
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

I was hoping that between **lazerradial2003, ****SoftCorpse and ****sadr1an1
this would be sorted rather quickly, thanks to you 3 for working on this.... :cool:
**

13 Jun 2008, 3:38 PM
#36
felixh avatar

felixh

New Zenner

Join Date:
Mar 2008
Location:
Melbourne
Posts:
5
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

These are steps to integrate zencart 1.3.8 with phpbb3. This step will ensure your phpbb3 display appropriate Total number of user and Newest Member nickname at the board index.

  1. Install your phpbb3 and ensure it runs perfectly.
  2. Edit your configure.php replace ```php
    define('DIR_WS_PHPBB', 'C:/your server/www/phpbb3/');

3. Enable link to your phpbb3 from your zencart administrator. Inside your store configuration set the Link to phpbb3 to true.

4. edit "class.phpbb.php" inside your .../includes/classes folders. Try to find phpbb_create_account function and replace with the following code. 

```php
  function phpbb_create_account($nick, $password, $email_address) {
      if ($this->phpBB['installed'] != true || !zen_not_null($password) || !zen_not_null($email_address) || !zen_not_null($nick)) return false;
      if ($this->phpbb_check_for_duplicate_email($email_address) == 'already_exists') {
//        $this->phpbb_change_email($old_email, $email_address);
      } else {
        $sql = "select max(user_id) as total from " . $this->phpBB['users_table'];
        $phpbb_users = $this->db_phpbb->Execute($sql);
        $user_id = ($phpbb_users->fields['total'] + 1);
        $sql = "insert into " . $this->phpBB['users_table'] . "
                (user_id, group_id, username, username_clean, user_password, user_email, user_regdate)
                values
                ('" . (int)$user_id . "',2, '" . $nick . "', '" . $nick . "', '" . md5($password) . "', '" . $email_address . "', '" . time() ."')";
        $this->db_phpbb->Execute($sql);
		$sql = "update phpbb_config SET config_value = '{$user_id}' WHERE config_name = 'newest_user_id'";
		$this->db_phpbb->Execute($sql);
		$sql = "update phpbb_config SET config_value = '{$nick}' WHERE config_name = 'newest_username'";
		$this->db_phpbb->Execute($sql);
		$sql = "update phpbb_config SET config_value = config_value + 1 WHERE config_name = 'num_users'";
		$this->db_phpbb->Execute($sql);


        $sql = "INSERT INTO " . $this->phpBB['user_group_table'] . " (user_id, group_id, user_pending)
                VALUES ($user_id, 2, 0)";
        $this->db_phpbb->Execute($sql);
      }
    }
  1. Enjoy your nicely integrated phpbb3 forum with zencart, and if you find better solution please let me know :smile:

You can find other zencart tips and tricks at my blog - ferolen.com/blog

13 Jun 2008, 5:59 PM
#37
andyii avatar

andyii

Zen Follower

Join Date:
Mar 2007
Posts:
153
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

very nice.
will this also work with Zencart 1.3.7?
I will at some time try, but maybe you could say for sure.

17 Jun 2008, 5:39 AM
#38
juno avatar

juno

New Zenner

Join Date:
Mar 2008
Posts:
22
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

Thank you for the well-written out directions. However, I cannot seem to make it work. The user is created in phpbb, but they cannot login. I'm assuming that the password encryption is having a problem?

20 Jun 2008, 8:05 AM
#39
felixh avatar

felixh

New Zenner

Join Date:
Mar 2008
Location:
Melbourne
Posts:
5
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

mm... I don't know what's wrong, but I get it works on my client.
Could anyone who have succeed integrate phpbb3 and zencart 1.3.8 using my method post some comment. I will keep looking for the answer. if I could have some spare time :( ...

20 Jun 2008, 7:58 PM
#40
whoknowswhat avatar

whoknowswhat

New Zenner

Join Date:
Jun 2008
Location:
MI, USA
Posts:
7
Plugin Contributions:
0

Re: Integrating PHPBB3 with Zencart

felixh:

mm... I don't know what's wrong, but I get it works on my client.
Could anyone who have succeed integrate phpbb3 and zencart 1.3.8 using my method post some comment. I will keep looking for the answer. if I could have some spare time :( ...

I get an error...
[20-Jun-2008 15:21:27] PHP Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /class.phpbb.php on line 363

I get that from the zencart debug tool, sad thing is, there is no line 363.... It also makes my index.php show up blank.....