Пример #1
0
                $status_text[] = '<span class="label label-danger">' . __('Closed', 'luna') . '</span>';
                $item_status .= ' iclosed';
            }
            if (!$ghost_topic && $cur_topic['last_post'] > $luna_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_topic['id']]) || $tracked_topics['topics'][$cur_topic['id']] < $cur_topic['last_post']) && (!isset($tracked_topics['forums'][$fid]) || $tracked_topics['forums'][$fid] < $cur_topic['last_post'])) {
                $item_status .= ' inew';
                $icon_type = 'icon icon-new';
                $subject = '<strong>' . $subject . '</strong>';
                $subject_new_posts = '<span class="newtext">[ <a href="../viewtopic.php?id=' . $cur_topic['id'] . '&amp;action=new" title="' . __('Go to the first new comment in the thread.', 'luna') . '">' . __('New', 'luna') . '</a> ]</span>';
            } else {
                $subject_new_posts = null;
            }
            // Insert the status text before the subject
            $subject = implode(' ', $status_text) . ' ' . $subject;
            $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $luna_user['disp_posts']);
            if ($num_pages_topic > 1) {
                $subject_multipage = '<span class="inline-pagination"> ' . simple_paginate($num_pages_topic, -1, '../viewtopic.php?id=' . $cur_topic['id']) . '</span>';
            } else {
                $subject_multipage = null;
            }
            // Should we show the "New comments" and/or the multipage links?
            if (!empty($subject_new_posts) || !empty($subject_multipage)) {
                $subject .= !empty($subject_new_posts) ? ' ' . $subject_new_posts : '';
                $subject .= !empty($subject_multipage) ? ' ' . $subject_multipage : '';
            }
            ?>
					<div class="list-group-item <?php 
            echo $item_status;
            if ($cur_topic['soft'] == true) {
                echo ' soft';
            }
            ?>
Пример #2
0
function draw_search_results()
{
    global $search_set, $cur_search, $luna_user, $luna_config, $thread_count, $cur_thread, $subject_status, $last_comment_date, $tracked_threads, $start_from;
    foreach ($search_set as $cur_search) {
        $forum = '<a href="viewforum.php?id=' . $cur_search['forum_id'] . '">' . luna_htmlspecialchars($cur_search['forum_name']) . '</a>';
        if ($luna_config['o_censoring'] == '1') {
            $cur_search['subject'] = censor_words($cur_search['subject']);
        }
        /* if ($show_as == 'comments') {
        			require get_view_path('comment.php');
        		} else { */
        ++$thread_count;
        $status_text = array();
        $item_status = $thread_count % 2 == 0 ? 'roweven' : 'rowodd';
        $icon_type = 'icon';
        $subject = '<a href="thread.php?id=' . $cur_search['tid'] . '#p' . $cur_search['pid'] . '">' . luna_htmlspecialchars($cur_search['subject']) . '</a>';
        $by = '<span class="byuser">' . __('by', 'luna') . ' ' . luna_htmlspecialchars($cur_search['commenter']) . '</span>';
        if ($cur_search['pinned'] == '1') {
            $item_status .= ' pinned-item';
            $status_text[] = '<span class="label label-warning"><span class="fa fa-fw fa-thumb-tack"></span></span>';
        }
        if ($cur_search['closed'] != '0') {
            $status_text[] = '<span class="label label-danger"><span class="fa fa-fw fa-lock"></span></span>';
            $item_status .= ' closed-item';
        }
        if (!$luna_user['is_guest'] && $cur_search['last_comment'] > $luna_user['last_visit'] && (!isset($tracked_threads['threads'][$cur_search['tid']]) || $tracked_threads['threads'][$cur_search['tid']] < $cur_search['last_comment']) && (!isset($tracked_threads['forums'][$cur_search['forum_id']]) || $tracked_threads['forums'][$cur_search['forum_id']] < $cur_search['last_comment'])) {
            $item_status .= ' new-item';
            $icon_type = 'icon icon-new';
            $subject = '<strong>' . $subject . '</strong>';
            $status_text[] = '<a href="thread.php?id=' . $cur_thread['id'] . '&amp;action=new" title="' . __('Go to the first new comment in the thread.', 'luna') . '" class="label label-default label-new"><span class="fa fa-fw fa-bell"></span></a>';
        }
        // Insert the status text before the subject
        $subject = implode(' ', $status_text) . ' ' . $subject;
        $num_pages_thread = ceil(($cur_search['num_replies'] + 1) / $luna_user['disp_comments']);
        if ($num_pages_thread > 1) {
            $subject_multipage = '<span class="pagestext">' . simple_paginate($num_pages_thread, -1, 'thread.php?id=' . $cur_search['tid']) . '</span>';
        } else {
            $subject_multipage = null;
        }
        if ($cur_search['last_commenter_id'] > '1' && $luna_user['g_view_users'] == '1') {
            $last_commenter = '<a href="thread.php?pid=' . $cur_search['last_comment_id'] . '#p' . $cur_search['last_comment_id'] . '">' . format_time($cur_search['last_comment']) . '</a> <span class="byuser">' . __('by', 'luna') . '</span> <a href="profile.php?id=' . $cur_search['last_commenter_id'] . '">' . luna_htmlspecialchars($cur_search['last_commenter']) . '</a>';
        } else {
            $last_commenter = '<a href="thread.php?pid=' . $cur_search['last_comment_id'] . '#p' . $cur_search['last_comment_id'] . '">' . format_time($cur_search['last_comment']) . '</a> <span class="byuser">' . __('by', 'luna') . '</span> ' . luna_htmlspecialchars($cur_search['last_commenter']);
        }
        require get_view_path('search-thread.php');
        // }
    }
}
Пример #3
0
                $status_text[] = '<span class="label label-danger">' . __('Closed', 'luna') . '</span>';
                $item_status .= ' iclosed';
            }
            if (!$ghost_thread && $cur_thread['last_comment'] > $luna_user['last_visit'] && (!isset($tracked_threads['threads'][$cur_thread['id']]) || $tracked_threads['threads'][$cur_thread['id']] < $cur_thread['last_comment']) && (!isset($tracked_threads['forums'][$fid]) || $tracked_threads['forums'][$fid] < $cur_thread['last_comment'])) {
                $item_status .= ' inew';
                $icon_type = 'icon icon-new';
                $subject = '<strong>' . $subject . '</strong>';
                $subject_new_comments = '<span class="newtext">[ <a href="../thread.php?id=' . $cur_thread['id'] . '&amp;action=new" title="' . __('Go to the first new comment in the thread.', 'luna') . '">' . __('New', 'luna') . '</a> ]</span>';
            } else {
                $subject_new_comments = null;
            }
            // Insert the status text before the subject
            $subject = implode(' ', $status_text) . ' ' . $subject;
            $num_pages_thread = ceil(($cur_thread['num_replies'] + 1) / $luna_user['disp_comments']);
            if ($num_pages_thread > 1) {
                $subject_multipage = '<span class="inline-pagination"> ' . simple_paginate($num_pages_thread, -1, '../thread.php?id=' . $cur_thread['id']) . '</span>';
            } else {
                $subject_multipage = null;
            }
            // Should we show the "New comments" and/or the multipage links?
            if (!empty($subject_new_comments) || !empty($subject_multipage)) {
                $subject .= !empty($subject_new_comments) ? ' ' . $subject_new_comments : '';
                $subject .= !empty($subject_multipage) ? ' ' . $subject_multipage : '';
            }
            ?>
					<div class="list-group-item <?php 
            echo $item_status;
            if ($cur_thread['soft'] == true) {
                echo ' soft';
            }
            ?>