PluginProbe
wpForo Forum / 1.4.11
wpForo Forum v1.4.11
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 / wpf-admin / options-tabs / posts.php

posts.php in wpForo Forum 1.4.11, at wpf-admin/options-tabs/posts.php

90 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( !defined( 'ABSPATH' ) ) exit;
4 if( !current_user_can('administrator') ) exit;
5 ?>
6
7 <?php if(!isset(WPF()->post->options['max_upload_size'])){ $upload_max_filesize = @ini_get('upload_max_filesize'); $upload_max_filesize = wpforo_human_size_to_bytes($upload_max_filesize); if( !$upload_max_filesize || $upload_max_filesize > 10485760 ) $upload_max_filesize = 10485760; WPF()->post->options['max_upload_size'] = $upload_max_filesize; } ?>
8 <form action="" method="POST" class="validate">
9 <?php wp_nonce_field( 'wpforo-settings-posts' ); ?>
10 <table class="wpforo_settings_table">
11 <tbody>
12 <?php do_action( 'wpforo_settings_post_top'); ?>
13 <tr>
14 <th><label><?php _e('Recent Posts Display Type','wpforo'); ?></label></th>
15 <td>
16 <div class="wpf-switch-field">
17 <input id="rpt-topics" type="radio" name="wpforo_post_options[recent_posts_type]" value="topics" <?php wpfo_check(WPF()->post->options['recent_posts_type'], 'topics'); ?>/><label for="rpt-topics"><?php _e('Topics','wpforo'); ?></label> &nbsp;
18 <input id="rpt-posts" type="radio" name="wpforo_post_options[recent_posts_type]" value="posts" <?php wpfo_check(WPF()->post->options['recent_posts_type'], 'posts'); ?>/><label for="rpt-posts"><?php _e('Posts','wpforo'); ?></label>
19 </div>
20 </td>
21 </tr>
22 <tr>
23 <th><label for="topics_per_page"><?php _e('Number of Topics per Page', 'wpforo'); ?></label></th>
24 <td><input id="topics_per_page" type="number" min="1" name="wpforo_post_options[topics_per_page]" value="<?php wpfo(WPF()->post->options['topics_per_page']) ?>" class="wpf-field-small" /></td>
25 </tr>
26 <tr>
27 <th>
28 <label for="eot_durr"><?php _e('Allow Edit Own Topic for', 'wpforo'); ?></label>
29 <p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
30 </th>
31 <td><input id="eot_durr" type="number" name="wpforo_post_options[eot_durr]" value="<?php wpfo(WPF()->post->options['eot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
32 </tr>
33 <tr>
34 <th>
35 <label for="dot_durr"><?php _e('Allow Delete Own Topic for', 'wpforo'); ?></label>
36 <p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
37 </th>
38 <td><input id="dot_durr" type="number" name="wpforo_post_options[dot_durr]" value="<?php wpfo(WPF()->post->options['dot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
39 </tr>
40 <tr>
41 <th><label for="posts_per_page"><?php _e('Number of Posts per Page', 'wpforo'); ?></label></th>
42 <td><input id="posts_per_page" type="number" min="1" name="wpforo_post_options[posts_per_page]" value="<?php wpfo(WPF()->post->options['posts_per_page']) ?>" class="wpf-field-small" /></td>
43 </tr>
44 <tr>
45 <th>
46 <label for="eor_durr"><?php _e('Allow Edit Own Post for', 'wpforo'); ?></label>
47 <p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
48 </th>
49 <td><input id="eor_durr" type="number" name="wpforo_post_options[eor_durr]" value="<?php wpfo(WPF()->post->options['eor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
50 </tr>
51 <tr>
52 <th>
53 <label for="dor_durr"><?php _e('Allow Delete Own post for', 'wpforo'); ?></label>
54 <p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
55 </th>
56 <td><input id="dor_durr" type="number" name="wpforo_post_options[dor_durr]" value="<?php wpfo(WPF()->post->options['dor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
57 </tr>
58
59 <tr>
60 <th>
61 <label><?php _e('Maximum upload file size', 'wpforo'); ?></label>
62 <p class="wpf-info"><?php _e('You can not set this value more than "upload_max_filesize" and "post_max_size". If you want to increase server parameters please contact to your hosting service support.', 'wpforo'); ?></p>
63 </th>
64 <td>
65 <input type="number" min="1" name="wpforo_post_options[max_upload_size]" value="<?php echo wpforo_print_size(WPF()->post->options['max_upload_size'], false) ?>" class="wpf-field-small" />&nbsp; <?php _e('MB', 'wpforo') ?>
66 <p class="wpf-info">
67 <?php
68 _e('Server "upload_max_filesize" is '); echo ini_get('upload_max_filesize') . '<br/>';
69 _e('Server "post_max_size" is '); echo ini_get('post_max_size');
70 ?>
71 </p>
72 </td>
73 </tr>
74
75 <tr>
76 <th>
77 <label><?php _e('Attachment click - message for non-permitted users', 'wpforo'); ?></label>
78 <p class="wpf-info"><?php _e('This message will be displayed when a non-permitted forum member clicks on attached file link in topic and posts.', 'wpforo'); ?></p>
79 </th>
80 <td>
81 <textarea name="wpforo_post_options[attach_cant_view_msg]"><?php echo esc_textarea( ( !empty( WPF()->post->options['attach_cant_view_msg'] ) ? WPF()->post->options['attach_cant_view_msg'] : '' ) ) ?></textarea>
82 </td>
83 </tr>
84 <?php do_action('wpforo_settings_post_bottom'); ?>
85 </tbody>
86 </table>
87 <div class="wpforo_settings_foot">
88 <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
89 </div>
90 </form>