Exemplo n.º 1
0
if ($search_author) {
    $user = BoincUser::lookup_id($search_author);
}
// First search thread titles; if we get a hit there it's probably relevant
//
$threads = search_thread_titles($search_list, $forum, $user, $min_timestamp, round($limit / 7), $search_sort, $show_hidden_posts);
// Display the threads while we search for posts
if (count($threads)) {
    echo "<span class=title>" . tra("Thread titles matching your query:") . "</span>";
    show_thread_and_context_header();
    $i = 0;
    foreach ($threads as $thread) {
        if ($thread->hidden) {
            continue;
        }
        show_thread_and_context($thread, $logged_in_user, $i++);
    }
    end_table();
    echo "<br /><br />";
}
// Look in a post content as well
//
$posts = search_post_content($search_list, $forum, $user, $min_timestamp, $limit, $search_sort, $show_hidden_posts);
if (count($posts)) {
    echo "<span class=title>" . tra("Messages matching your query:") . "</span>";
    start_table();
    $n = 1;
    $options = get_output_options($logged_in_user);
    $options->setHighlightTerms($search_list);
    foreach ($posts as $post) {
        $thread = BoincThread::lookup_id($post->thread);
Exemplo n.º 2
0
    $forum = BoincForum::lookup("parent_type=1 and category={$user->teamid}");
    if ($forum) {
        show_forum_summary($forum, $i++);
    }
}
end_table();
if ($user) {
    $subs = BoincSubscription::enum("userid={$user->id}");
    if (count($subs)) {
        echo "<p><span class=title>" . tra("Subscribed threads") . "</span><p>";
        show_thread_and_context_header();
        $i = 0;
        foreach ($subs as $sub) {
            $thread = BoincThread::lookup_id($sub->threadid);
            if (!$thread) {
                BoincSubscription::delete($user->id, $sub->threadid);
                continue;
            }
            if ($thread->hidden) {
                continue;
            }
            show_thread_and_context($thread, $user, $i++);
        }
        end_table();
    }
}
page_tail();
flush();
BoincForumLogging::cleanup();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit