when a new users join, they will get redirected to a newbie page, they cannot leave, until they click the button: i understand, or something like that, its also usefull for guiding the newbies
first off run this mysql query:
PHP Code:
CREATE TABLE IF NOT EXISTS `adopts_users` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
`password` varchar(200) COLLATE latin1_general_ci DEFAULT NULL,
`email` varchar(60) COLLATE latin1_general_ci DEFAULT NULL,
`usergroup` int(11) DEFAULT NULL,
`newmessagenotify` varchar(10) COLLATE latin1_general_ci DEFAULT NULL,
`membersince` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
`isbanned` int(11) DEFAULT NULL,
`tradeforbidden` int(11) DEFAULT NULL,
`pmstatus` int(11) DEFAULT NULL,
`tradestatus` int(11) DEFAULT NULL,
`website` varchar(80) COLLATE latin1_general_ci DEFAULT NULL,
`profilepic` varchar(80) COLLATE latin1_general_ci DEFAULT NULL,
`aim` varchar(80) COLLATE latin1_general_ci DEFAULT NULL,
`yahoo` varchar(80) COLLATE latin1_general_ci DEFAULT NULL,
`msn` varchar(80) COLLATE latin1_general_ci DEFAULT NULL,
`money` int(11) DEFAULT NULL,
`friends` varchar(500) COLLATE latin1_general_ci DEFAULT NULL,
`theme` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
`avatar` varchar(120) COLLATE latin1_general_ci DEFAULT NULL,
`profile` varchar(500) COLLATE latin1_general_ci DEFAULT NULL,
`color` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
`about` varchar(200) COLLATE latin1_general_ci DEFAULT NULL,
`favpet` int(11) DEFAULT NULL,
`gender` varchar(10) COLLATE latin1_general_ci DEFAULT NULL,
`nickname` varchar(40) COLLATE latin1_general_ci DEFAULT NULL,
`newmember` int(11) DEFAULT '1',
PRIMARY KEY (`uid`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2 ;
Then go to register.php, replace
PHP Code:
runquery("INSERT INTO {$prefix}users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0', '0' ,'0','0','','','','','', '{$GLOBALS['settings']['startmoney']}','','','$avatar', '', '', '', '0', 'Unknown', '')");
with:
PHP Code:
runquery("INSERT INTO {$prefix}users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0', '0' ,'0','0','','','','','', '{$GLOBALS['settings']['startmoney']}','','','$avatar', '', '', '', '0', 'Unknown', '', '1')");
Then go to functions.php, at the very ENDING (not after the ?>)put this code:
PHP Code:
if($isloggedin == "yes"){
$query = "SELECT * FROM ".$GLOBALS['prefix']."users WHERE username='".$GLOBALS['loggedinname']."'";
$result = mysql_query($query);
$newbie=@mysql_result($result,0,"newmember");
if($newbie == 1 & $newbiepage != 1){
header( 'Location: /newbie.php' ) ;
}
}
And place the newbie.php in your root of your adoptables folder (where everything is)
the newbie.php is kinda clean atm, its up to you to customize it, but just keep the code intact.