PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
wpforo / themes / classic / forum.php

forum.php in wpForo Forum 3.1.6, at themes/classic/forum.php

56 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if( ! $forum = WPF()->current_object['forum'] ) : ?>
3 <h1 id="wpforo-title">
4 <?php echo esc_html( WPF()->board->get_current( 'settings' )['title'] ) ?>
5 <div class="wpforo-feed">
6 <span class="wpf-unread-posts">
7 <a href="<?php echo esc_url( wpforo_home_url( wpforo_settings_get_slug( 'recent' ) . '?view=unread' ) ) ?>">
8 <i class="fas fa-layer-group" style="padding-right: 1px; font-size: 13px;"></i> <span><?php wpforo_phrase( 'Unread Posts' ) ?></span>
9 </a>
10 </span>
11 <?php wpforo_feed_link( 'home' ) ?>
12 </div>
13 </h1>
14 <?php elseif( $forum['is_cat'] ) : ?>
15 <div class="wpf-head-bar">
16 <div class="wpf-head-bar-left">
17 <h1 id="wpforo-title"><?php echo esc_html( $forum['title'] ) ?></h1>
18 <?php if( $forum['description'] ): ?>
19 <div id="wpforo-description"><?php echo wp_kses_post( $forum['description'] ) ?></div>
20 <?php endif; ?>
21 <div class="wpf-action-link">
22 <?php do_action( 'wpforo_template_forum_head_bar_action_links', $forum ); ?>
23 <?php wpforo_feed_link( 'forum' ) ?>
24 </div>
25 </div>
26 <div class="wpf-clear"></div>
27 </div>
28 <?php endif;
29 if( $cats = WPF()->current_object['categories'] ) :
30 $forum_template = 'forum.php';
31 if( WPF()->current_object['template'] == 'topic' && WPF()->current_object['layout'] == 4 ) {
32 $forum_template = 'forum-sub.php';
33 }
34 foreach( $cats as $key => $cat ) {
35 if( WPF()->perm->forum_can( 'vf', $cat['forumid'] ) ) {
36 $args = [ "parentid" => $cat['forumid'], "type" => 'forum' ];
37 $forums = WPF()->forum->get_forums( $args );
38 if( ! empty( $forums ) ) {
39 $layout = ( $cat['layout'] ? intval( $cat['layout'] ) : 1 );
40 do_action( 'wpforo_category_loop_start', $cat, $key );
41 $template_path = wpftpl( 'layouts/' . $layout . '/' . $forum_template );
42 if( file_exists( $template_path ) ) {
43 include( $template_path );
44 }
45 do_action( 'wpforo_category_loop_end', $cat, $key );
46 }else{
47 do_action( 'wpforo_category_loop_no_forums', $cat, $key );
48 }
49 }
50 }
51 else : ?>
52 <p class="wpf-p-error">
53 <?php wpforo_phrase( 'No forums were found here.' ) ?>
54 </p>
55 <?php endif;
56