Brad Posted August 26, 2010 Posted August 26, 2010 Ok so in mccode lite im not sure if it's the same in v2 but when someone sends a mail it goes to the mail logs in the game but if that person deletes the mail it goes away from the mail logs and your databass. So what i have done is made it so all users are able to delete there mail but all mail also go into another field so you can read the mail after they have been deleted by the user. This is only for mccode lite. Open mailbox.php and replace with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open admin.php Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Go to PhpMyAdmin and add the SQL [mysql] CREATE TABLE `mailall` ( `mail_id` int(11) NOT NULL auto_increment, `mail_read` int(11) NOT NULL default '0', `mail_from` int(11) NOT NULL default '0', `mail_to` int(11) NOT NULL default '0', `mail_time` int(11) NOT NULL default '0', `mail_subject` varchar(255) NOT NULL default '', `mail_text` text NOT NULL, PRIMARY KEY (`mail_id`) ) ENGINE=MyISAM AUTO_INCREMENT=1 [/mysql] Thanks Brad Quote
sniko Posted August 26, 2010 Posted August 26, 2010 I havent proof read the code but, it looks good, sounds good, but for the developers view, you should space out your code, for example You have You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Whereas the following is easier to read and debug You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Equinox Posted August 26, 2010 Posted August 26, 2010 Everyone has their own preference, sniko :) For example, I like my like this; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Brad Posted August 26, 2010 Author Posted August 26, 2010 Thanks But it is just the mccode lite mailbox just where i changed that when the mail is sent goes into 2 fields so one can be deleted. Quote
rulerofzu Posted August 26, 2010 Posted August 26, 2010 I would highly recommend that you prune the logs after a certain amount of time otherwise your going to be looking at a run away table in your database which as soon as you open the staff page is going to lag your game. Quote
Brad Posted August 26, 2010 Author Posted August 26, 2010 but you need it so you can see what goes on in your game mail. But you could probs add a cron like every day or something it clears the mail logs Quote
rulerofzu Posted August 26, 2010 Posted August 26, 2010 Just decide how long you wish to keep a log. IE 60 days. Anything older than that delete. Just keeps things trim. Quote
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.