// [START HACK='Yet Another Award System' AUTHOR='HacNho'] if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply')) { global $db, $vbulletin; { if (THIS_SCRIPT == 'private') { $this->post['userid'] =& $post['fromuserid']; } if (($vbulletin->options['aw_postbit']) AND ($this->post['userid'])) { if ($vbulletin->options['aw_postbitawardorder'] == 1) { $awardsdisplayorder = "ORDER BY au.issue_time ASC"; } else if ($vbulletin->options['aw_postbitawardorder'] == 2) { $awardsdisplayorder = "ORDER BY a.award_displayorder ASC"; } else if ($vbulletin->options['aw_postbitawardorder'] == 3) { $awardsdisplayorder = "ORDER BY a.award_displayorder DESC"; } else { $awardsdisplayorder = "ORDER BY au.issue_time DESC"; } $post['userawards'] = ''; // Obtain list of awards for current user $alluserawards = $db->query_read(" SELECT a.*, au.* FROM " . TABLE_PREFIX . "award a, " . TABLE_PREFIX . "award_user au WHERE (au.userid = ".$this->post['userid'].") AND (a.award_id=au.award_id) $awardsdisplayorder "); $post['showuserawards'] = false; if ($post['num_awards'] = $db->num_rows($alluserawards)) { require_once(DIR . '/includes/class_bbcode.php'); $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); $aw_i = 0; while ($award = $db->fetch_array($alluserawards)) { $aw_i++; if ($aw_i <= $vbulletin->options['aw_display_limit']) { $award['issue_reason'] = $bbcode_parser->parse($award['issue_reason']); $award['award_desc'] = $bbcode_parser->parse($award['award_desc']); eval('$post[userawards] .= "' . fetch_template('awards_bit') . '";'); } } $post['showuserawards'] = true; $db->free_result($alluserawards); } } } } // [END HACK='Yet Another Award System' AUTHOR='HacNho'] if ($this->registry->products['ipinfo'] AND $this->post['userid']) { $show['ipfile'] = 'ipinfo'; } else { $show['ipfile'] = 'postings'; }