I have a site where each entry is rated by a number of things. I would like to show a list of those entries that have been given a 5 star rating. However, one of these stars includes a check to see whether the entry author has recently logged in.
So far I have this code:
{if member_photo AND short_description AND member_gallery AND more_looking_for_details}But I also need to incorporate something that checks the last vist date. This is what have for the rating:
{exp:user:stats}
<!--if visited in last 30 days-->
<?php
$start = new DateTime('{last_visit format="%Y-%m-%d"}');
$today = new DateTime();
$days = round(abs($today->format('U') - $start->format('U')) / (60*60*24));
if ($days <= 30)
echo '/images/permanent/star.png';
?>
{/exp:user:stats}
Can anyone suggest how I can create a conditional that will meld them all into a useable conditional?
Thanks