Exemple #1
0
     $session_displayed = ' (' . $forum['session_name'] . ')';
 } else {
     $session_displayed = '';
 }
 $forum['forum_of_group'] == 0 ? $groupid = '' : ($groupid = $forum['forum_of_group']);
 $number_threads = isset($forum['number_of_threads']) ? $forum['number_of_threads'] : 0;
 $number_posts = isset($forum['number_of_posts']) ? $forum['number_of_posts'] : 0;
 $html .= '<div class="row">';
 $html .= '<div class="col-md-6">';
 $html .= '<div class="col-md-3">';
 $html .= '<div class="number-post">' . $forum_image . '<p>' . $number_posts . ' ' . get_lang('Posts') . '</p>' . '</div>';
 $html .= '</div>';
 $html .= '<div class="col-md-9">';
 $iconForum = Display::return_icon('forum_yellow.png', get_lang($forumCategory['cat_title']), null, ICON_SIZE_MEDIUM);
 $linkForum = '';
 $linkForum .= Display::tag('a', $forum['forum_title'], array('href' => 'viewforum.php?' . api_get_cidreq() . '&gidReq=' . intval($groupid) . '&forum=' . intval($forum['forum_id']), 'class' => return_visible_invisible(strval(intval($forum['visibility'])))));
 $html .= '<h3 class="title">' . $iconForum . $linkForum . '</h3>';
 $html .= Display::tag('p', strip_tags($forum['forum_comment']), array('class' => 'description'));
 $html .= '</div>';
 $html .= '</div>';
 $iconEmpty = '';
 // The number of topics and posts.
 if ($forum['forum_of_group'] !== '0') {
     $newPost = '';
     if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
         $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
     } else {
         $newPost = $iconEmpty;
     }
 } else {
     if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
     $session_displayed = ' (' . $forum['session_name'] . ')';
 } else {
     $session_displayed = '';
 }
 // the number of topics and posts
 $my_number_threads = isset($forum['number_of_threads']) ? $forum['number_of_threads'] : 0;
 $my_number_posts = isset($forum['number_of_posts']) ? $forum['number_of_posts'] : 0;
 $html .= '<div class="row">';
 $html .= '<div class="col-md-6">';
 $html .= '<div class="col-md-3">';
 $html .= '<div class="number-post">' . $forum_image . '<p>' . $my_number_posts . ' ' . get_lang('Posts') . '</p></div>';
 $html .= '</div>';
 $html .= '<div class="col-md-9">';
 $iconForum = Display::return_icon('forum_yellow.png', get_lang($forum_category['cat_title']), null, ICON_SIZE_MEDIUM);
 $linkForum = '';
 $linkForum .= Display::tag('a', $forum['forum_title'] . $session_displayed, array('href' => 'viewforum.php?' . api_get_cidreq() . "&gidReq={$forum['forum_of_group']}&forum={$forum['forum_id']}&origin={$origin}&search=" . Security::remove_XSS(urlencode(isset($_GET['search']) ? $_GET['search'] : '')), 'class' => return_visible_invisible($forum['visibility'])));
 $html .= Display::tag('h3', $linkForum . ' ' . $forum_title_group_addition, array('class' => 'title'));
 $html .= Display::tag('p', strip_tags($forum['forum_comment']), array('class' => 'description'));
 $html .= '</div>';
 $html .= '</div>';
 $html .= '<div class="col-md-6">';
 $iconEmpty = '';
 // The number of topics and posts.
 if ($forum['forum_of_group'] !== '0') {
     $newPost = '';
     if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
         $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
     } else {
         $newPost = $iconEmpty;
     }
 } else {