| 1 |
<?php if( ! defined( "ABSPATH" ) ) exit(); ?> |
| 2 |
|
| 3 |
<input type="hidden" name="wpfaction" value="topics_settings_save"> |
| 4 |
|
| 5 |
<?php WPF()->settings->header( 'topics' ); ?> |
| 6 |
|
| 7 |
<div class="wpf-subtitle"> |
| 8 |
<span class="dashicons dashicons-screenoptions"></span> <?php _e( 'Extended Forum Layout', 'wpforo' ) ?> |
| 9 |
</div> |
| 10 |
|
| 11 |
<?php |
| 12 |
WPF()->settings->form_field( 'topics', 'layout_extended_intro_posts_toggle' ); |
| 13 |
WPF()->settings->form_field( 'topics', 'layout_extended_intro_posts_count' ); |
| 14 |
WPF()->settings->form_field( 'topics', 'layout_extended_intro_posts_length' ); |
| 15 |
?> |
| 16 |
|
| 17 |
<div class="wpf-subtitle"> |
| 18 |
<span class="dashicons dashicons-screenoptions"></span> <?php _e( 'Q&A Forum Layout', 'wpforo' ) ?> |
| 19 |
</div> |
| 20 |
|
| 21 |
<?php |
| 22 |
WPF()->settings->form_field( 'topics', 'layout_qa_posts_per_page' ); |
| 23 |
WPF()->settings->form_field( 'topics', 'layout_qa_comments_limit_count' ); |
| 24 |
WPF()->settings->form_field( 'topics', 'layout_qa_first_post_reply' ); |
| 25 |
?> |
| 26 |
|
| 27 |
<div class="wpf-subtitle"> |
| 28 |
<span class="dashicons dashicons-screenoptions"></span> <?php _e( 'Threaded Forum Layout', 'wpforo' ) ?> |
| 29 |
</div> |
| 30 |
|
| 31 |
<?php |
| 32 |
WPF()->settings->form_field( 'topics', 'layout_threaded_posts_per_page' ); |
| 33 |
WPF()->settings->form_field( 'topics', 'layout_threaded_nesting_level' ); |
| 34 |
WPF()->settings->form_field( 'topics', 'layout_threaded_first_post_reply' ); |
| 35 |
?> |
| 36 |
|
| 37 |
<div class="wpf-subtitle"> |
| 38 |
<span class="dashicons dashicons-admin-generic"></span> <?php _e( 'General', 'wpforo' ) ?> |
| 39 |
</div> |
| 40 |
|
| 41 |
<?php |
| 42 |
WPF()->settings->form_field( 'topics', 'include_subforums_topics' ); |
| 43 |
WPF()->settings->form_field( 'topics', 'topics_per_page' ); |
| 44 |
WPF()->settings->form_field( 'topics', 'posts_per_page' ); |
| 45 |
WPF()->settings->form_field( 'topics', 'search_max_results' ); |
| 46 |
?> |
| 47 |
|
| 48 |
<?php $union_first_post = WPF()->settings->info->core['topics']['options']['union_first_post'] ?> |
| 49 |
<div class="wpf-opt-row" data-wpf-opt="union_first_post"> |
| 50 |
<div class="wpf-opt-name"> |
| 51 |
<label><?php echo esc_html( $union_first_post["label"] ) ?></label> |
| 52 |
<p class="wpf-desc"><?php echo esc_html( $union_first_post["description"] ) ?></p> |
| 53 |
</div> |
| 54 |
<div class="wpf-opt-input"> |
| 55 |
<table style="margin-left: -1px;"> |
| 56 |
<tbody> |
| 57 |
<?php if( $layouts = WPF()->tpl->find_layouts() ) : ?> |
| 58 |
<tr> |
| 59 |
<td> |
| 60 |
<table style="margin-left: -1px;"> |
| 61 |
<?php |
| 62 |
foreach( $layouts as $layout ) : |
| 63 |
$name = sprintf( 'topics[union_first_post][%1$d]', $layout['id'] ); |
| 64 |
$value = WPF()->post->get_option_union_first_post( $layout['id'] ); |
| 65 |
?> |
| 66 |
<tr style="background-color: transparent;"> |
| 67 |
<td style="border-bottom: 1px dashed #aaaaaa; padding: 8px 0;"> |
| 68 |
<div class="wpf-switch-field"> |
| 69 |
<input type="radio" value="1" name="<?php echo $name ?>" id="<?php echo sanitize_title( $name ) ?>_1" <?php checked( $value ) ?>><label for="<?php echo sanitize_title( $name ) ?>_1"><?php _e( 'Yes', 'wpforo' ); ?></label> |
| 70 |
<input type="radio" value="0" name="<?php echo $name ?>" id="<?php echo sanitize_title( $name ) ?>_0" <?php checked( $value, false ) ?>><label for="<?php echo sanitize_title( $name ) ?>_0"><?php _e( 'No', 'wpforo' ); ?></label> |
| 71 |
</div> |
| 72 |
</td> |
| 73 |
<th style="border-bottom: 1px dashed #aaaaaa; width: auto;"><label style="font-weight: normal;"><?php echo $layout['name'] ?></label></th> |
| 74 |
</tr> |
| 75 |
<?php endforeach; ?> |
| 76 |
</table> |
| 77 |
</td> |
| 78 |
</tr> |
| 79 |
<?php endif; ?> |
| 80 |
</tbody> |
| 81 |
</table> |
| 82 |
</div> |
| 83 |
<?php echo WPF()->settings->get_doc_link( $union_first_post ) ?> |
| 84 |
</div> |
| 85 |
<!-- Option end --> |
| 86 |
|
| 87 |
<?php |
| 88 |
WPF()->settings->form_field( 'topics', 'recent_posts_type' ); |
| 89 |
WPF()->settings->form_field( 'topics', 'topic_head' ); |
| 90 |
WPF()->settings->form_field( 'topics', 'topic_head_expanded' ); |
| 91 |
|