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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2011, 02:21 PM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 24,683
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 02:11 AM.
Reply With Quote
  #2  
Old 10-20-2011, 01:27 PM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 24,683
mapleblade
Default

theres also an demo @ http://epicmiro.99webs.info
__________________
Need coding help? send me a PM! :)
Reply With Quote
  #3  
Old 10-21-2011, 12:41 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 481,553
Hall of Famer is on a distinguished road
Default

This looks quite good so far, thanks for posting it Mapleblade.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #4  
Old 10-21-2011, 12:49 AM
Sophie Sophie is offline
Artist
 
Join Date: Sep 2011
Posts: 6
Gender: Female
Credits: 1,822
Sophie is on a distinguished road
Default

I love this!
Reply With Quote
  #5  
Old 02-05-2012, 11:38 AM
keliptis keliptis is offline
Member
 
Join Date: May 2011
Posts: 15
Gender: Female
Credits: 1,819
keliptis is on a distinguished road
Default

So xD I did this add on however it didnt work instead now every page to my site is a blank white screen, So I tryed to revert to old renewed the 2 phps that got edited however that doesnt work im assumeing its the mysql and I never had that saved?

Or a answer as to why it did that D:


~~~~~~~~~~~~

Ok figured out why it was blank however its still messed up register
Do I need to find a way to replace mysql users table?

Last edited by keliptis; 02-05-2012 at 12:10 PM.
Reply With Quote
  #6  
Old 02-09-2012, 02:00 AM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 24,683
mapleblade
Default

maybe the script is interfering with other scripts wich use the user table, if so, add a new row called newmember (int 1) with default 1, and adding an , '' at the end of the register query.
__________________
Need coding help? send me a PM! :)
Reply With Quote
  #7  
Old 02-09-2012, 09:47 AM
keliptis keliptis is offline
Member
 
Join Date: May 2011
Posts: 15
Gender: Female
Credits: 1,819
keliptis is on a distinguished road
Default

That seemed not to change nothing im assuming something somewhere is off as not even reseting passwords will work
Reply With Quote
Reply


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 10:12 AM
So... How to Disable the Auto-Ban? Kyttias Questions and Supports 1 12-15-2014 11:17 AM
Making an auto installer Nemesis Feedback and Suggestions 9 12-23-2013 08:55 AM
Page that gives users money Derpstra Tutorials and Tips 0 08-18-2012 11:34 AM
Redirect to Previous Page after Login/Logout fadillzzz Mys v1.1.x Mods 6 02-02-2011 05:24 PM


All times are GMT -5. The time now is 01:20 PM.

Currently Active Users: 789 (0 members and 789 guests)
Threads: 4,081, Posts: 32,029, 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