Vb easy to merge with php website?

Discussion in 'PHP' started by Doskono, Aug 13, 2007.

  1. #1
    I am planning on making a php based website, where users can register and so on. I was wondering If later on I would like to merge my site with a vb forum. Is it easy to convert all my user list to so it will work on forum and website?

    Thanks for some info!
     
    Doskono, Aug 13, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    I would do it the other way around. Install vB, and use its users table from the beginning. That would be way easier.
     
    nico_swd, Aug 13, 2007 IP
  3. Doskono

    Doskono Peon

    Messages:
    153
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Me too although I don't think I will be able to afford Vb right at the beginning.
     
    Doskono, Aug 13, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    Then I'd suggest using their table structure, and password encryption method.

    
    $password = md5(md5($password) . $salt);
    
    PHP:
    Note that every user has his own "salt" value. (Which is a 3 character value of any ASCII character)


    And this is the table structure:
    
    CREATE TABLE `vb_user` (
      `userid` int(10) unsigned NOT NULL auto_increment,
      `usergroupid` smallint(5) unsigned NOT NULL default '0',
      `membergroupids` char(250) collate latin1_general_ci NOT NULL default '',
      `displaygroupid` smallint(5) unsigned NOT NULL default '0',
      `username` varchar(100) collate latin1_general_ci NOT NULL default '',
      `password` char(32) collate latin1_general_ci NOT NULL default '',
      `passworddate` date NOT NULL default '0000-00-00',
      `email` char(100) collate latin1_general_ci NOT NULL default '',
      `styleid` smallint(5) unsigned NOT NULL default '0',
      `parentemail` char(50) collate latin1_general_ci NOT NULL default '',
      `homepage` char(100) collate latin1_general_ci NOT NULL default '',
      `icq` char(20) collate latin1_general_ci NOT NULL default '',
      `aim` char(20) collate latin1_general_ci NOT NULL default '',
      `yahoo` char(32) collate latin1_general_ci NOT NULL default '',
      `msn` char(100) collate latin1_general_ci NOT NULL default '',
      `skype` char(32) collate latin1_general_ci NOT NULL default '',
      `showvbcode` smallint(5) unsigned NOT NULL default '0',
      `showbirthday` smallint(5) unsigned NOT NULL default '2',
      `usertitle` char(250) collate latin1_general_ci NOT NULL default '',
      `customtitle` smallint(6) NOT NULL default '0',
      `joindate` int(10) unsigned NOT NULL default '0',
      `daysprune` smallint(6) NOT NULL default '0',
      `lastvisit` int(10) unsigned NOT NULL default '0',
      `lastactivity` int(10) unsigned NOT NULL default '0',
      `lastpost` int(10) unsigned NOT NULL default '0',
      `lastpostid` int(10) unsigned NOT NULL default '0',
      `posts` int(10) unsigned NOT NULL default '0',
      `reputation` int(11) NOT NULL default '10',
      `reputationlevelid` int(10) unsigned NOT NULL default '1',
      `timezoneoffset` char(4) collate latin1_general_ci NOT NULL default '',
      `pmpopup` smallint(6) NOT NULL default '0',
      `avatarid` smallint(6) NOT NULL default '0',
      `avatarrevision` int(10) unsigned NOT NULL default '0',
      `profilepicrevision` int(10) unsigned NOT NULL default '0',
      `sigpicrevision` int(10) unsigned NOT NULL default '0',
      `options` int(10) unsigned NOT NULL default '15',
      `birthday` char(10) collate latin1_general_ci NOT NULL default '',
      `birthday_search` date NOT NULL default '0000-00-00',
      `maxposts` smallint(6) NOT NULL default '-1',
      `startofweek` smallint(6) NOT NULL default '1',
      `ipaddress` char(15) collate latin1_general_ci NOT NULL default '',
      `referrerid` int(10) unsigned NOT NULL default '0',
      `languageid` smallint(5) unsigned NOT NULL default '0',
      `emailstamp` int(10) unsigned NOT NULL default '0',
      `threadedmode` smallint(5) unsigned NOT NULL default '0',
      `autosubscribe` smallint(6) NOT NULL default '-1',
      `pmtotal` smallint(5) unsigned NOT NULL default '0',
      `pmunread` smallint(5) unsigned NOT NULL default '0',
      `salt` char(3) collate latin1_general_ci NOT NULL default '',
      `ipoints` int(10) unsigned NOT NULL default '0',
      `infractions` int(10) unsigned NOT NULL default '0',
      `warnings` int(10) unsigned NOT NULL default '0',
      `infractiongroupids` varchar(255) collate latin1_general_ci NOT NULL default '',
      `infractiongroupid` smallint(5) unsigned NOT NULL default '0',
      `adminoptions` int(10) unsigned NOT NULL default '0',
      PRIMARY KEY  (`userid`),
      KEY `usergroupid` (`usergroupid`),
      KEY `username` (`username`),
      KEY `birthday` (`birthday`,`showbirthday`),
      KEY `birthday_search` (`birthday_search`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=7 ;
    
    Code (sql):
     
    nico_swd, Aug 13, 2007 IP