Skip to content

Instantly share code, notes, and snippets.

@Matslom
Created July 12, 2013 21:18
Show Gist options
  • Save Matslom/5987943 to your computer and use it in GitHub Desktop.
Save Matslom/5987943 to your computer and use it in GitHub Desktop.
$lateststatus = '';
$query = $db->simple_select('users', 'uid,username,custom_status,custom_status_date,usergroup,displaygroup', 'custom_status != \'\' AND custom_status_date > 0', array('order_by' => 'custom_status_date', 'order_dir' => 'DESC', 'limit' => $mybb->settings['custom_status_latest']));
while ($userstatus = $db->fetch_array($query))
{
$bgcolor = alt_trow();
$userstatus['username'] = format_name($userstatus['username'], $userstatus['usergroup'], $userstatus['displaygroup']);
$userstatus['username'] = '<a href="member.php?action=profile&uid='.intval($userstatus['username']).'"> '.$userstatus['username'].'</a>';
$userstatus['date'] = my_date($mybb->settings['dateformat'], $userstatus['custom_status_date'], '', false).", ".my_date($mybb->settings['timeformat'], $userstatus['custom_status_date']);
$userstatus['status'] = htmlspecialchars_uni($userstatus['custom_status']);
$userstatus['custom_status'] = htmlspecialchars_uni($userstatus['custom_status']);
eval("\$lateststatus .= \"".$templates->get('index_custom_status_latest')."\";");
}
eval("\$custom_status_index = \"".$templates->get('index_custom_status')."\";");
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment