Hack Name: Unanswered Posts Description: This hack will do the following: - Add a switch to today.php to show unanswered posts. Compatibility: XMB 1.9.11 Version: 1.0 Code based on coding from: RichJ @ http://forums.xmbforum.com/viewthread.php?tid=772897 Instructions summed up by: Mouser License Note: This mod is released under the GPL License. Give credit where credit is due. Note: For your own safety, backup the effected PHP file and template before proceeding with this hack. Edit PHP File: today.php Find: ---------------------------------------------------------------------- $srchfrom = $onlinetime - (86400 * $daysold); ---------------------------------------------------------------------- Add Below: ---------------------------------------------------------------------- $show = postedVar('show', 'javascript', TRUE, TRUE, TRUE, 'r'); $show_u1sql = $show_u4sql = $show_u2 = $show_u3 = ''; if ( $show == 'unanswered' ) { $show_u1sql = " AND replies = '0' "; $show_u2 = "?show=unanswered"; $show_u3 = "&show=unanswered"; $show_u4sql = " AND t.replies = '0' "; } ---------------------------------------------------------------------- Find: ---------------------------------------------------------------------- $threadcount = $db->result($db->query("SELECT COUNT(*) FROM ".X_PREFIX."threads WHERE lastpost >= $srchfrom AND fid IN ($fids)"), 0); ---------------------------------------------------------------------- Replace With: ---------------------------------------------------------------------- $threadcount = $db->result($db->query("SELECT COUNT(*) FROM ".X_PREFIX."threads WHERE lastpost >= $srchfrom AND fid IN ($fids)$show_u1sql"), 0); ---------------------------------------------------------------------- Find: ---------------------------------------------------------------------- if ($daysold == 1) { $mpage = multipage($threadcount, $tpp, 'today.php'); } else { $mpage = multipage($threadcount, $tpp, 'today.php?daysold='.$daysold); } ---------------------------------------------------------------------- Replace With: ---------------------------------------------------------------------- if ($daysold == 1) { $mpage = multipage($threadcount, $tpp, 'today.php'.$show_u2); } else { $mpage = multipage($threadcount, $tpp, 'today.php?daysold='.$daysold.$show_u3); } ---------------------------------------------------------------------- Find: ---------------------------------------------------------------------- WHERE t.lastpost >= $srchfrom AND t.fid IN ($fids) ---------------------------------------------------------------------- Replace With: ---------------------------------------------------------------------- WHERE t.lastpost >= $srchfrom AND t.fid IN ($fids) $show_u4sql ---------------------------------------------------------------------- Edit Template : today Find: ----------------------------------------------------------------------