PluginProbe
wpForo Forum / beta-4
wpForo Forum vbeta-4
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 1.4.2 All 137 releases
wpforo / wpf-admin / options-tabs / posts.php

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

59 lines 3.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($wpforo->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; $wpforo->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', $wpforo ); ?>
13 <tr>
14 <th><label for="topics_per_page"><?php _e('Number of Topics per Page', 'wpforo'); ?></label></th>
15 <td><input id="topics_per_page" type="number" min="1" name="wpforo_post_options[topics_per_page]" value="<?php wpfo($wpforo->post_options['topics_per_page']) ?>" class="wpf-field-small" /></td>
16 </tr>
17 <tr>
18 <th><label for="eot_durr"><?php _e('Allow Edit Own Topic for', 'wpforo'); ?></label></th>
19 <td><input id="eot_durr" type="number" min="1" name="wpforo_post_options[eot_durr]" value="<?php wpfo($wpforo->post_options['eot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
20 </tr>
21 <tr>
22 <th><label for="dot_durr"><?php _e('Allow Delete Own Topic for', 'wpforo'); ?></label></th>
23 <td><input id="dot_durr" type="number" min="1" name="wpforo_post_options[dot_durr]" value="<?php wpfo($wpforo->post_options['dot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
24 </tr>
25 <tr>
26 <th><label for="posts_per_page"><?php _e('Number of Posts per Page', 'wpforo'); ?></label></th>
27 <td><input id="posts_per_page" type="number" min="1" name="wpforo_post_options[posts_per_page]" value="<?php wpfo($wpforo->post_options['posts_per_page']) ?>" class="wpf-field-small" /></td>
28 </tr>
29 <tr>
30 <th><label for="eor_durr"><?php _e('Allow Edit Own Post for', 'wpforo'); ?></label></th>
31 <td><input id="eor_durr" type="number" min="1" name="wpforo_post_options[eor_durr]" value="<?php wpfo($wpforo->post_options['eor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
32 </tr>
33 <tr>
34 <th><label for="dor_durr"><?php _e('Allow Delete Own post for', 'wpforo'); ?></label></th>
35 <td><input id="dor_durr" type="number" min="1" name="wpforo_post_options[dor_durr]" value="<?php wpfo($wpforo->post_options['dor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
36 </tr>
37
38 <tr>
39 <th>
40 <label><?php _e('Maximum upload file size', 'wpforo'); ?></label>
41 <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>
42 </th>
43 <td>
44 <input type="number" min="1" name="wpforo_post_options[max_upload_size]" value="<?php echo wpforo_print_size($wpforo->post_options['max_upload_size'], false) ?>" class="wpf-field-small" />&nbsp; <?php _e('MB', 'wpforo') ?>
45 <p class="wpf-info">
46 <?php
47 _e('Server "upload_max_filesize" is '); echo ini_get('upload_max_filesize') . '<br/>';
48 _e('Server "post_max_size" is '); echo ini_get('post_max_size');
49 ?>
50 </p>
51 </td>
52 </tr>
53 <?php do_action( 'wpforo_settings_post_bottom', $wpforo ); ?>
54 </tbody>
55 </table>
56 <div class="wpforo_settings_foot">
57 <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
58 </div>
59 </form>