Thanks very much, Ravyn! I'll give that a try.
Erm.... what would be the correct formating of the conditional? I'm not sure how to use dates. Is there a standard "30 days ago" or "1 week from now" kind of thing?
And would it be as easy as something like $userinfo[lastseen_date] < "-30 days"? Or must I call other functions to make it work?
EDIT:
I saw this working on a different site, so I wrote the webmaster and asked.
They are using a 3.0.x version, so I'd like to know what I need to do to get this to work with a 3.6.x version, or what I'm doing wrong so that this isn't working
Since I want this to display in my profiles, I edit the member.php file.
I'm not sure where is safe to put the code, so I placed it above the "Main Script Start" section.
$time1weekago=time()-7776000;
if ($userinfo[lastactivity] < $time1weekago ) {
$isOlduser = 1;
} else {
$isOlduser = 0;
}
I then edit my MEMBERINFO template and place the IF conditional around the text, like this:
<if conditional="$isOlduser=1">User has not logged in for 1 week!</if>
Does anyone see anything 'wrong' with the above code, or why it might not be working for me?
I had it output its values for me, and here is what I get for myself (last activity is today):
Time 1 Week Ago: 1187212461
Last Activity: 1187817258
Is Old User: 1
This user has not logged in for 1 week!
I checked a member that had not logged in in over a month, and here is what I got:
Time 1 Week Ago: 1187212629
Last Activity: 1184946900
Is Old User: 1
This user has not logged in for 1 week!