function _bb_list_tag_item($tag, $args)
{
    $url = esc_url(bb_get_tag_link($tag));
    $name = esc_html(bb_get_tag_name($tag));
    if ('list' == $args['format']) {
        $id = 'tag-' . $tag->tag_id . '_' . $tag->user_id;
        return "\t" . '<li id="' . $id . '"' . get_alt_class('topic-tags') . '><a href="' . $url . '" rel="tag">' . $name . '</a> ' . bb_get_tag_remove_link(array('tag' => $tag, 'list_id' => $args['list_id'])) . '</li>' . "\n";
    }
}
 function start_el($output, $forum, $depth)
 {
     $this->forum_id = $forum->forum_id;
     $indent = str_repeat("\t", $depth + 1);
     $output .= $indent . "<li id='forum-{$this->forum_id}'" . get_alt_class('forum', 'forum clear list-block') . ">\n";
     return $output;
 }
        function display($show_search = true, $show_email = false)
        {
            global $wp_roles;
            $r = '';
            $now = date('Y-m-d H:i:s');
            if (isset($this->title)) {
                $title = $this->title;
            } elseif ($this->is_search()) {
                $title = sprintf(__('Users Matching "%s" by Role'), esc_html($this->search_term));
            }
            $h2_role = $this->roles[0];
            $roles = $wp_roles->get_names();
            if (in_array($h2_role, array_keys($roles))) {
                $h2_role = $roles[$h2_role];
            }
            $h2_span = apply_filters('bb_user_search_description', sprintf(__('%1$s%2$s'), $h2_search, $h2_role), $h2_search, $h2_role, $this);
            echo "<h2 class=\"first left\">" . apply_filters('bb_user_search_title', __('Users Waiting for Approval')) . $h2_span . "</h2>\n";
            do_action('bb_admin_notices');
            if ($this->get_results()) {
                if ($this->results_are_paged()) {
                    $r .= "<div class='tablenav'>\n" . $this->paging_text . "</div><div class=\"clear\"></div>\n\n";
                }
                $r .= "<table class='widefat'>\n";
                $r .= "<thead>\n";
                $r .= "\t<tr>\n";
                $r .= "\t\t<th style='width:10;'>&nbsp;</th>\n";
                $r .= "\t\t<th>" . __('Username') . "</th>\n";
                $r .= "\t\t<th>" . __('Email') . "</th>\n";
                $r .= "\t\t<th>" . __('Registered') . "</th>\n";
                $r .= "\t\t<th>" . __('Elapsed') . "</th>\n";
                $r .= "\t</tr>\n";
                $r .= "</thead>\n\n";
                $r .= "<tbody id='role-{$role}'>\n";
                foreach ((array) $this->get_results() as $user_object) {
                    //$r .= bb_user_row($user_object->ID, $role, $show_email);
                    $user = bb_get_user($user_object->ID);
                    $registered = date('Y/m/d H:i:s', bb_offset_time(bb_gmtstrtotime($user->user_registered)));
                    $date_eng = date('H:i:s - d/m/Y', bb_offset_time(bb_gmtstrtotime($user->user_registered)));
                    $difference = strtotime($now) - strtotime($registered);
                    $hours_ago = number_format($difference / 60 / 60, 0);
                    if ($hours_ago < '15') {
                        $reg_compare = '"color: red"';
                        $checked = '';
                    }
                    if ($hours_ago >= '15' && $hours_ago < '24') {
                        $reg_compare = '"color: blue"';
                        $checked = 'checked';
                    }
                    if ($hours_ago >= '24') {
                        $reg_compare = '"color: purple"';
                        $checked = 'checked';
                    }
                    $r .= "\t<tr id='user-{$user->ID}'" . get_alt_class("user-{$role}") . ">\n";
                    $r .= "\t\t<td><input type='checkbox' value='{$user->ID}' name='userids[]' {$checked}/></td>\n";
                    $r .= "\t\t<td><a href='" . get_user_profile_link($user->ID) . "' style=" . $reg_compare . ">" . get_user_name($user->ID) . "</a></td>\n";
                    $email = bb_get_user_email($user->ID);
                    $r .= "\t\t<td><a href='mailto:{$email}'>{$email}</a></td>\n";
                    $r .= "\t\t<td>" . $date_eng . "</td>\n";
                    $r .= "\t\t<td>" . $hours_ago . " hours</td>\n";
                    $r .= "\n\t</tr>";
                }
                $r .= "</tbody>\n";
                $r .= "<tfoot>\n";
                $r .= "\t<tr>\n";
                $r .= "\t\t<th>&nbsp;</th>\n";
                $r .= "\t\t<th>" . __('Username') . "</th>\n";
                $r .= "\t\t<th>" . __('Email') . "</th>\n";
                $r .= "\t\t<th>" . __('Registered') . "</th>\n";
                $r .= "\t\t<th>" . __('Elapsed') . "</th>\n";
                $r .= "\t</tr>\n";
                $r .= "</tfoot>\n\n";
                $r .= "</table>\n";
                $r .= "<p style=\"text-align: right; color: #9f9f9f; font-size: small; font-style: normal;\">Registered: Red: < 15 hours ago. Blue: > 15 hours ago. Purple: > 24 hours ago.</p>";
                if ($this->results_are_paged()) {
                    $r .= "<div class='tablenav bottom'>\n" . $this->paging_text_bottom . "</div><div class=\"clear\"></div>\n\n";
                }
            }
            ?>
			<form class="settings" method="post" name="approve_user_registration_form">
			<?php 
            echo $r;
            ?>
	       	<fieldset class="submit">
	          <input type="submit" class="submit left" name="approve_user_registration_button_approve" value="Approve" />
	          <input type="submit" class="submit left" name="approve_user_registration_button_reject" value="Reject" />
	        </fieldset>
	        </form>
			<?php 
            //			}
        }