Uridium Posted March 17, 2010 Share Posted March 17, 2010 yep i know ive done this one before but my first attempt had many flaws. This version however has been Rigorously tested and im Pleased to say its a fully working Process.. New features...... 1 = Adds decimal to all stats ( old version didnt do this infact old version didnt even update them oops) 2 = New staff options you can now add the item directly without an ID and give the Item a name so users can see their reward instead of an ID# 3 = Crystals have been introduced so you can now offer Crystals as a Reward other than Items and Cash... 4 = All added Education Modules can now be set so you can have so many clicks per day and so many clicks per hour. 5 = Courses can be completed by users as many times as the user wishes. 6 = Staff have an Hidden section for those wanting to test new Education Outcomes 7 = Modules work from clicks and NOT crons so users dont have to wait X amount of days for a course to finish.... 8 = The new version will alow those who have other types of gains that arnt crystals to be added quite easily.... 9 = Admins can view which users are doing which course and the achieved percentage for that course 10 = Damn cant think of a 10 but the other 9 are great ;) Will post up new script later today........ Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted March 17, 2010 Share Posted March 17, 2010 And you reckon you shouldnt get the mod award ?( Sounds like a hefty bit of work. Well done as always Illusions Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 17, 2010 Author Share Posted March 17, 2010 I hate awards they just make people Code faster and mess up more. Id sooner have a decent working Project than an Award for messing up scripts.. Just my opinion :) Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted March 17, 2010 Share Posted March 17, 2010 [align=left]Fair enough. Now post the code.... :D [/align] Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 17, 2010 Author Share Posted March 17, 2010 FIRST OFF SQLS [mysql]CREATE TABLE IF NOT EXISTS `schools` ( `crID` int(11) NOT NULL AUTO_INCREMENT, `crNAME` varchar(255) NOT NULL DEFAULT '', `crDESC` text NOT NULL, `crSTARTING` text NOT NULL, `crCOMPLETED` text NOT NULL, `crCOST` int(11) NOT NULL DEFAULT '0', `crENERGY` int(11) NOT NULL DEFAULT '0', `crCASHPRIZE` int(11) NOT NULL DEFAULT '0', `crCRYSTALS` int(11) NOT NULL, `crITEM` int(11) NOT NULL DEFAULT '0', `crITEMNAME` varchar(100) NOT NULL, `crQTY` int(11) NOT NULL DEFAULT '0', `crCOMPPERCENT` int(11) NOT NULL DEFAULT '0', `crPERCENT` int(11) NOT NULL DEFAULT '0', `crCLICKS` int(11) NOT NULL DEFAULT '0', `crPERCLICKS` int(11) NOT NULL DEFAULT '0', `crSTR` decimal(65,4) NOT NULL DEFAULT '0.0000', `crGUARD` decimal(65,4) NOT NULL DEFAULT '0.0000', `crLABOUR` decimal(65,4) NOT NULL DEFAULT '0.0000', `crAGIL` decimal(65,4) NOT NULL DEFAULT '0.0000', `crIQ` decimal(65,6) NOT NULL DEFAULT '0.000000', PRIMARY KEY (`crID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; ----- USER SQLS ------ ALTER users ADD cpercent decimal(4,1) NOT NULL DEFAULT 0.0; ALTER users ADD course_clicks int(11) NOT NULL DEFAULT 0; ALTER users ADD minus_clicks int(11) NOT NULL DEFAULT 0; ALTER users ADD clickend int(11) NOT NULL DEFAULT 0; ALTER users ADD dailycclicks int(11) NOT NULL DEFAULT 0; ALTER users ADD crtimes int(11) NOT NULL DEFAULT 0; ---- HOMEWORK SQLS ------- CREATE TABLE IF NOT EXISTS `schoolhomework` ( `userid` int(11) NOT NULL DEFAULT '0', `courseid` int(11) NOT NULL DEFAULT '0', `crtimes` int(11) NOT NULL DEFAULT '0', `lastcourse` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;[/mysql] call this file staff_courses.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add these links to smenu.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add this to global_func.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. NEXT PART BELOW..... Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 17, 2010 Author Share Posted March 17, 2010 PART 2.. Call this file edureset.php Its for the Staff testing section... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. call this file schooling.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. schooling.php and edureset.php FILES HAVE BEEN UPDATED DUE TO NEW SQLS....... Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 17, 2010 Author Share Posted March 17, 2010 now add this CSS bit to your header.php or if your using an external css add it in with that... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Still in the header.php change the link education.php to schooling.php or create both links one hidden for testing.. Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 17, 2010 Author Share Posted March 17, 2010 Still working on the crons to update users clicks for hour and daily clicks cos my silly site dont have crons running.. Quote Link to comment Share on other sites More sharing options...
rowbvp Posted March 17, 2010 Share Posted March 17, 2010 Great job! keep it up so far i added the new codes just waiting on the crons! i did find one small error: line 24 on SQLS should be ) ENGINE=MyISAM DEFAULT CHARSET=latin1; just remove the = after latin Quote Link to comment Share on other sites More sharing options...
CJ - Twitch Posted March 17, 2010 Share Posted March 17, 2010 Screenies? :) Looking great. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted March 18, 2010 Share Posted March 18, 2010 Looks awesome Illusions :) Well done buddy Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 18, 2010 Author Share Posted March 18, 2010 Great job! keep it up so far i added the new codes just waiting on the crons! i did find one small error: line 24 on SQLS should be ) ENGINE=MyISAM DEFAULT CHARSET=latin1; just remove the = after latin Thanks rowbvp for spotting that error the SQLS ablve for line 24 have been ammended :) Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 18, 2010 Author Share Posted March 18, 2010 If anyone is able to help me out who has installed his mod on their site and dont mind giving me access to their FTP/CPANEL so i can sort the crons out i would be very greatful as for some reason my testing site has decided to stop running crons... Email me on here pls if your abale to assist... HELP FOUND ( Big thanks to DJKANNA for helping out ) Cheers Matey. Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 18, 2010 Author Share Posted March 18, 2010 Heres the cron for Hourly Updates for user clicks You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Still working on the daily one as its a bit more complex than i thought :) this is due to courses having different click rates than others Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 18, 2010 Author Share Posted March 18, 2010 For the daily cron to work ive had to redo schooling.php and edureset.php so if you have an older copy then get the updated one from posting on 1st page.. More SQLS sorry this was the only way i could make the Daily Crons match the clicks for each Education made.... [mysql]CREATE TABLE IF NOT EXISTS `schoolday` ( `userid` int(11) NOT NULL default '0', `courseid` int(11) NOT NULL default '0', `clicks` int(11) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1;[/mysql] And finally the Cron... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 18, 2010 Author Share Posted March 18, 2010 SCREENIES STAFF CHEAT SCREEN CHEAT OUTCOME CHOOSING A COURSE TO STUDY TAKING THE COURSE COURSE OUTCOME WHEN FINISHED Â SORRY FOR THE IMAGES NOT SHOWING SEEMS MY TEST SITE HAS GONE WALK ABOUTS :( STAFF EDITING COURSES Quote Link to comment Share on other sites More sharing options...
rowbvp Posted March 18, 2010 Share Posted March 18, 2010 im getting this error when viewing schooling.php page QUERY ERROR: Unknown column 'crtimes' in 'field list' Query was SELECT crtimes FROM users WHERE userid=1 AND course=1 any ideas Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted March 18, 2010 Share Posted March 18, 2010 Check your users table see if you added the crtimes field Quote Link to comment Share on other sites More sharing options...
rowbvp Posted March 18, 2010 Share Posted March 18, 2010 "Yes" thou i had to add this field manually , `crtimes` int(11) NOT NULL default '0' just had to remove the default in SQL then edit the table by setting crtimes to 0. One thing i did notice is that the staff_courses is adding course to the old courses table. So i deleted all the old courses sql and updated it with the schools SQL's, this worked.To test this i added a new course, and it 'installed' to the old table named courses.But it worked because the SQL are the same as schools table.So if we change the php where it say,courses to schools this may work! Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 19, 2010 Author Share Posted March 19, 2010 One thing i did notice is that the staff_courses is adding course to the old courses table. Thats impossible as the table courses hasnt been used Look again all INSERTS, UPDATES DELETE, Statements point to the table SCHOOL Quote Link to comment Share on other sites More sharing options...
rowbvp Posted March 19, 2010 Share Posted March 19, 2010 You know what your right 'illusions',looking in a php file there can't find anywhere where it says courses.I guess ill be remove all and SQL and starting over. Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 20, 2010 Author Share Posted March 20, 2010 I know this might sound daft but are you sure your looking at schooling.php and not education.php when you click the link to start an education from mainmenu... ? Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 20, 2010 Author Share Posted March 20, 2010 is anyone using this mod can i have some feedback for future updates or errors that may have occured whilst youve installed it. Quote Link to comment Share on other sites More sharing options...
rowbvp Posted March 20, 2010 Share Posted March 20, 2010 Yes i already changed education.php link to schooling.php!for some reason im getting error Schooling [align=center]Here is a list of available schools. QUERY ERROR: Unknown column 'course' in 'where clause' Query was SELECT crtimes FROM users WHERE userid=1 AND course=1 [align=left]I install two test courses but there not showing,crtimes is install in users table [/align][/align] Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 20, 2010 Author Share Posted March 20, 2010 create a new field in users Alter table users add course int(11) NOT NULL default 0; if your getting this error Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.