[request] automatic away
#1
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"



thankx
Reply
#2
Bumping old post...

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

# REPLACE WITH:
			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
# FIND:
		eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");

# REPLACE WITH:
		if ($memprofile['returndate'] && ($returnmkdate > time()))
		{
			eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
		}
www.kozik.net.pl
- So... Maybe you shouldn't have hacked it.
- And why don't you try not breathing. Hurts, dunnit. (userfriendly.org)
Reply
#3
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)