Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.2.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-19-2011, 03:21 PM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 24,976
mapleblade
Default New Users auto redirect to page

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` (
  `
uidint(11NOT NULL AUTO_INCREMENT,
  `
usernamevarchar(20COLLATE latin1_general_ci DEFAULT NULL,
  `
passwordvarchar(200COLLATE latin1_general_ci DEFAULT NULL,
  `
emailvarchar(60COLLATE latin1_general_ci DEFAULT NULL,
  `
usergroupint(11) DEFAULT NULL,
  `
newmessagenotifyvarchar(10COLLATE latin1_general_ci DEFAULT NULL,
  `
membersincevarchar(20COLLATE latin1_general_ci DEFAULT NULL,
  `
isbannedint(11) DEFAULT NULL,
  `
tradeforbiddenint(11) DEFAULT NULL,
  `
pmstatusint(11) DEFAULT NULL,
  `
tradestatusint(11) DEFAULT NULL,
  `
websitevarchar(80COLLATE latin1_general_ci DEFAULT NULL,
  `
profilepicvarchar(80COLLATE latin1_general_ci DEFAULT NULL,
  `
aimvarchar(80COLLATE latin1_general_ci DEFAULT NULL,
  `
yahoovarchar(80COLLATE latin1_general_ci DEFAULT NULL,
  `
msnvarchar(80COLLATE latin1_general_ci DEFAULT NULL,
  `
moneyint(11) DEFAULT NULL,
  `
friendsvarchar(500COLLATE latin1_general_ci DEFAULT NULL,
  `
themevarchar(20COLLATE latin1_general_ci DEFAULT NULL,
  `
avatarvarchar(120COLLATE latin1_general_ci DEFAULT NULL,
  `
profilevarchar(500COLLATE latin1_general_ci DEFAULT NULL,
  `
colorvarchar(20COLLATE latin1_general_ci DEFAULT NULL,
  `
aboutvarchar(200COLLATE latin1_general_ci DEFAULT NULL,
  `
favpetint(11) DEFAULT NULL,
  `
gendervarchar(10COLLATE latin1_general_ci DEFAULT NULL,
  `
nicknamevarchar(40COLLATE latin1_general_ci DEFAULT NULL,
  `
newmemberint(11) DEFAULT '1',
  
PRIMARY KEY (`uid`),
  
UNIQUE KEY `username` (`username`)
ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=

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 == $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.
Attached Files
File Type: php newbie.php (848 Bytes, 20 views)
__________________
Need coding help? send me a PM! :)

Last edited by mapleblade; 10-21-2011 at 03:11 AM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect after login Empress_Swanbottom Questions and Supports 10 06-03-2020 11:12 AM
So... How to Disable the Auto-Ban? Kyttias Questions and Supports 1 12-15-2014 12:17 PM
Making an auto installer Nemesis Feedback and Suggestions 9 12-23-2013 09:55 AM
Page that gives users money Derpstra Tutorials and Tips 0 08-18-2012 12:34 PM
Redirect to Previous Page after Login/Logout fadillzzz Mys v1.1.x Mods 6 02-02-2011 06:24 PM


All times are GMT -5. The time now is 05:24 PM.

Currently Active Users: 847 (0 members and 847 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636