PluginProbe
wpForo Forum / 2.2.9
wpForo Forum v2.2.9
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 / admin / tools-tabs / misc.php

misc.php in wpForo Forum 2.2.9, at admin/tools-tabs/misc.php

117 lines 7.1 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 <form action="" method="POST" class="validate">
8 <?php wp_nonce_field( 'wpforo-tools-misc' ) ?>
9 <input type="hidden" name="wpfaction" value="misc_options_save">
10 <div class="wpf-tool-box" style="width:98%; margin-left: 1%; margin-top: 15px; border: none;">
11 <h3><?php _e( 'Admin Note', 'wpforo' ); ?>
12 <p class="wpf-info"></p>
13 </h3>
14 <div style="margin-top:10px; clear:both;">
15 <table style="width:100%;">
16 <tbody style="padding:10px;">
17 <tr>
18 <td colspan="2">
19 <label style="padding-bottom:5px; display:block; font-weight: 600;"><?php _e( 'Admin message on forum front page', 'wpforo' ); ?></label>
20 <p class="wpf-info"><?php _e( 'If you have something important to say on forum front page, you can use this editor. The text will be displayed under forum breadcrumb menu, above forum and topic titles.', 'wpforo' ); ?></p>
21 <br>
22 <?php
23 $value = WPF()->tools_misc['admin_note'];
24 $args = [
25 'teeny' => false,
26 'media_buttons' => true,
27 'textarea_rows' => '8',
28 'tinymce' => true,
29 'quicktags' => [ 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ],
30 'textarea_name' => 'wpforo_tools_misc[admin_note]',
31 ];
32 wp_editor( wp_unslash( $value ), 'wpforo_tools_misc_admin_note', $args ); ?>
33
34 </td>
35 </tr>
36 <tr>
37 <th style="vertical-align: top; padding: 10px;">
38 <label style="font-weight: 600"><?php _e( 'Display for Usergroups', 'wpforo' ); ?></label>
39 </th>
40 <td>
41 <?php
42 $usergroups = WPF()->usergroup->get_usergroups();
43 $admin_note_groups = WPF()->tools_misc['admin_note_groups'];
44 ?>
45 <?php if( ! empty( $usergroups ) ): ?>
46 <?php foreach( $usergroups as $usergroup ): ?>
47 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
48 <input type="checkbox"
49 name="wpforo_tools_misc[admin_note_groups][]"
50 value="<?php echo intval( $usergroup['groupid'] ) ?>"
51 <?php echo ( ! empty( $admin_note_groups ) && in_array( $usergroup['groupid'], $admin_note_groups ) ) ? 'checked="checked"' : ''; ?>>&nbsp;
52 <?php echo esc_html( $usergroup['name'] ); ?>
53 </label>
54 <?php endforeach; ?>
55 <?php endif; ?>
56 </td>
57 </tr>
58 <tr>
59 <th style="vertical-align: top; padding: 10px;">
60 <label style="font-weight: 600"><?php _e( 'Display on forum pages', 'wpforo' ); ?></label>
61 </th>
62 <td>
63 <?php $pages = WPF()->tools_misc['admin_note_pages'];
64 if( empty( $pages ) ) $pages = []; ?>
65 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
66 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'forum', $pages ) ) echo 'checked' ?> value="forum" type="checkbox">&nbsp;
67 <?php _e( 'Forums', 'wpforo' ) ?>
68 </label>
69 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
70 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'topic', $pages ) ) echo 'checked' ?> value="topic" type="checkbox">&nbsp;
71 <?php _e( 'Forum (topic list)', 'wpforo' ) ?>
72 </label>
73 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
74 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'post', $pages ) ) echo 'checked' ?> value="post" type="checkbox">&nbsp;
75 <?php _e( 'Topic (post list)', 'wpforo' ) ?>
76 </label>
77 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
78 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'recent', $pages ) ) echo 'checked' ?> value="recent" type="checkbox">&nbsp;
79 <?php _e( 'Recent Posts', 'wpforo' ) ?>
80 </label>
81 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
82 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'tags', $pages ) ) echo 'checked' ?> value="tags" type="checkbox">&nbsp;
83 <?php _e( 'Tags', 'wpforo' ) ?>
84 </label>
85 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
86 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'members', $pages ) ) echo 'checked' ?> value="members" type="checkbox">&nbsp;
87 <?php _e( 'Members', 'wpforo' ) ?>
88 </label>
89 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
90 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'profile', $pages ) ) echo 'checked' ?> value="profile" type="checkbox">&nbsp;
91 <?php _e( 'Profile Home', 'wpforo' ) ?>
92 </label>
93 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
94 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'account', $pages ) ) echo 'checked' ?> value="account" type="checkbox">&nbsp;
95 <?php _e( 'Profile Account', 'wpforo' ) ?>
96 </label>
97 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
98 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'activity', $pages ) ) echo 'checked' ?> value="activity" type="checkbox">&nbsp;
99 <?php _e( 'Profile Activity', 'wpforo' ) ?>
100 </label>
101 <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
102 <input name="wpforo_tools_misc[admin_note_pages][]" <?php if( in_array( 'subscriptions', $pages ) ) echo 'checked' ?> value="subscriptions" type="checkbox">&nbsp;
103 <?php _e( 'Profile Subscriptions', 'wpforo' ) ?>
104 </label>
105
106 </td>
107 </tr>
108 </tbody>
109 </table>
110 </div>
111 </div>
112 <div class="wpforo_settings_foot" style="clear:both; margin-top:20px;">
113 <input type="submit" class="button button-primary" value="<?php _e( 'Update Options', 'wpforo' ); ?>"/>
114 <input type="submit" class="button" value="<?php _e( 'Reset Options', 'wpforo' ); ?>" name="reset" onclick="return confirm('<?php wpforo_phrase( 'Do you really want to reset options?' ) ?>')"/>
115 </div>
116 </form>
117