Page 4 of 9 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 82
  1. #31
    Join Date
    Mar 2007
    Posts
    153
    Plugin Contributions
    0

    Default 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?


    Quote Originally Posted by lazerradial2003 View Post
    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.
    Quote Originally Posted by sadr1an1 View Post
    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.

  2. #32
    Join Date
    Mar 2007
    Posts
    153
    Plugin Contributions
    0

    Default 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




    Quote Originally Posted by SoftCorpse View Post
    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

  3. #33
    Join Date
    Mar 2008
    Location
    NW Indiana
    Posts
    72
    Plugin Contributions
    0

    Default 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

  4. #34
    Join Date
    Jan 2008
    Posts
    32
    Plugin Contributions
    0

    Default How about the sessions?

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

  5. #35
    Join Date
    Mar 2007
    Posts
    153
    Plugin Contributions
    0

    Default 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....

  6. #36
    Join Date
    Mar 2008
    Location
    Melbourne
    Posts
    5
    Plugin Contributions
    1

    Default 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 Code:
    define('DIR_WS_PHPBB''C:/your server/www/phpbb3/'); 
    with correct physical path to your phpbb installation.

    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 Code:
      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);
          }
        } 
    5. Enjoy your nicely integrated phpbb3 forum with zencart, and if you find better solution please let me know

    You can find other zencart tips and tricks at my blog - ferolen.com/blog
    Last edited by Kim; 21 Jun 2008 at 04:12 AM.

  7. #37
    Join Date
    Mar 2007
    Posts
    153
    Plugin Contributions
    0

    Default 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.

  8. #38
    Join Date
    Mar 2008
    Posts
    22
    Plugin Contributions
    0

    Default 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?

  9. #39
    Join Date
    Mar 2008
    Location
    Melbourne
    Posts
    5
    Plugin Contributions
    1

    Default 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 ...

  10. #40
    Join Date
    Jun 2008
    Location
    MI, USA
    Posts
    7
    Plugin Contributions
    0

    Default Re: Integrating PHPBB3 with Zencart

    Quote Originally Posted by felixh View Post
    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.....

 

 
Page 4 of 9 FirstFirst ... 23456 ... LastLast

Similar Threads

  1. Integrating my payment gateway with zencart
    By gpgoud in forum General Questions
    Replies: 3
    Last Post: 19 Sep 2009, 07:48 AM
  2. [Request] Integrate ZenCart with phpBB3
    By austin881 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 17 Jun 2008, 10:34 AM
  3. Replies: 11
    Last Post: 30 Apr 2008, 06:21 PM
  4. Integrating ZenCart With My Design ??
    By Jack Gleeson in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 19 Oct 2006, 05:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR