| 1 |
<?php |
| 2 |
// Exit if accessed directly |
| 3 |
if( !defined( 'ABSPATH' ) ) exit; |
| 4 |
|
| 5 |
|
| 6 |
$items_count = 0; |
| 7 |
$childs = WPF()->forum->get_childs( $cat['forumid'] ); |
| 8 |
$childs[] = $cat['forumid']; |
| 9 |
$args = array( 'row_count' => wpforo_setting( 'forums', 'layout_threaded_intro_topics_count' ), 'forumids' => $childs, 'orderby' => 'type, modified', 'order' => 'DESC' ); |
| 10 |
$topics = WPF()->topic->get_topics( $args, $items_count ); |
| 11 |
$load_more = $items_count >= wpforo_setting( 'forums', 'layout_threaded_intro_topics_count' ); |
| 12 |
if( ! wpforo_setting( 'forums', 'layout_threaded_display_subforums' ) ){ |
| 13 |
$args = array('parentid' => $cat['forumid']); |
| 14 |
$childs = WPF()->forum->get_child_forums($cat['forumid']); |
| 15 |
} |
| 16 |
$childs = apply_filters('wpforo_sub_forum_list_threaded_layout', $childs); |
| 17 |
?> |
| 18 |
|
| 19 |
<div id="wpf-cat-<?php echo $cat['forumid'] ?>" class="wpf-subforums wpfl-4 wpforo-section"> |
| 20 |
<div class="wpforo-category"></div> |
| 21 |
<div id="wpf-forums-<?php echo $cat['forumid'] ?>" class="wpf-cat-forums"> |
| 22 |
<div class="wpf-cat-forum-list"> |
| 23 |
<?php if(!empty($childs)): ?> |
| 24 |
<?php foreach($childs as $child): ?> |
| 25 |
<?php if($child == $cat['forumid'] || !WPF()->perm->forum_can('vf', $child) ) continue; $forum = wpforo_forum( $child ); ?> |
| 26 |
<div class="wpf-forum-item <?php wpforo_unread($child, 'forum'); ?>"> |
| 27 |
<span class="wpf-circle wpf-s" style="color: <?php echo $forum['color'] ?>; display: inline-flex; margin-right: 8px;"> |
| 28 |
<i class="<?php echo $forum['icon'] ?>"></i> |
| 29 |
</span> |
| 30 |
<?php $forum_description = (wpfval($forum, 'description')) ? 'wpf-tooltip="' . esc_attr(strip_tags((string) $forum['description'])) . '" wpf-tooltip-size="long"' : ''; ?> |
| 31 |
<a href="<?php echo esc_url((string) $forum['url']); ?>" <?php echo $forum_description ?>> |
| 32 |
<?php echo esc_html($forum['title']); ?> |
| 33 |
<span class="wpf-forum-item-stat"> <?php echo '<span wpf-tooltip="' . esc_attr(wpforo_phrase('Threads', false)) . '">' . wpforo_print_number($forum['topics']) . '</span> <sep>/</sep> <span wpf-tooltip="' . esc_attr(wpforo_phrase('Posts', false)) . '">' . wpforo_print_number($forum['posts']) . '</span>' ?></span> |
| 34 |
</a> |
| 35 |
</div> |
| 36 |
<?php endforeach; ?> |
| 37 |
<?php else: ?> |
| 38 |
<p><?php wpforo_phrase('No forum found in this category') ?></p> |
| 39 |
<?php endif; ?> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
<!-- wpfl-4 --> |
| 44 |
|