| 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" /> <?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" /> <?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" /> <?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" /> <?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" /> <?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> |