MyBB Community Forums

Full Version: [request] automatic away
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
would it be possable to make a mod that does 2 things,
1. if a user sets his/her away setting on his/her proifle settings and it is past the return date then the away setting is turned off.

2. if the user has not logged on in 50 days then it automaticly sets there away setting from the date they last loged on with no return date and the reson would be "user has not logged on in 50 or more days"

Bumping old post...

1. Yes, I also think this is usefull. Little hack:
file inc/functions_post.php
			if($post['away'] == "yes" && $mybb->settings['allowaway'] != "no")

			if ($post['returndate'])
				$returnhome = explode("-", $post['returndate']);
			if($post['away'] == "yes" && $mybb->settings['allowaway'] != "no" && (($post['returndate'] == "") || (mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]) > time())))

file member.php
		eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");

		if ($memprofile['returndate'] && ($returnmkdate > time()))
			eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
cool, thanks! I totaly forgot about this! This is a good mod, however this mod does not seem to work the way it should, if it is the return date the only thing that happens is that it won't display them as away, however they are still set to away. Also it won't put ppl that haven't been logged for 50 as away