| @@ -1,10 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | // Exit if accessed directly |
| 3 | 3 | if( !defined( 'ABSPATH' ) ) exit; |
| 4 | - | |
| 5 | - global $wpforo; | |
| 6 | -?> | |
| 4 | + global $wpforo ?> | |
| 7 | 5 | |
| 8 | 6 | <div id="wpf-admin-wrap" class="wrap"> |
| 9 | 7 | <h1 style="padding:30px 0px 10px 0px;"><?php _e('wpForo Dashboard', 'wpforo'); ?></h1> |
| 10 | 8 | <?php $wpforo->notice->show(FALSE) ?> |
| @@ -25,11 +23,13 @@ | ||
| 25 | 23 | <h2 class="hndle ui-sortable-handle"><span><?php _e('Welcome Message', 'wpforo'); ?></span></h2> |
| 26 | 24 | <div class="inside"> |
| 27 | 25 | <div class="main" style="padding:5px 15px 15px 15px;"> |
| 28 | 26 | <div style="float:left; vertical-align:top; width:calc(100% - 300px);;"> |
| 29 | - <p style="font-size:30px; margin:0px 0px 10px 0px; font-family:Constantia, 'Lucida Bright', 'DejaVu Serif', Georgia, serif">Welcome to wpForo <?php echo esc_html(WPFORO_VERSION) ?></p> | |
| 27 | + <p style="font-size:30px; margin:0px 0px 10px 0px; font-family:Constantia, 'Lucida Bright', 'DejaVu Serif', Georgia, serif">Welcome to wpForo <?php echo esc_html($wpforo->version) ?></p> | |
| 30 | 28 | <p style="margin:0px; font-size:14px;font-family:'Lucida Bright', 'DejaVu Serif', Georgia, serif""> |
| 31 | - <?php _e('Thank you for using wpForo! wpForo is a professional bulletin board for WorPress, and the only forum software which comes with Multi-layout template system. | |
| 29 | + <?php _e('Thank you for trying wpForo! This forum development was started on 2013 and we were using it for our support community. Now it\'s ready for WordPress community as well. | |
| 30 | + It\'s on the Beta stage and we\'re working hard to reach the Gold 1.0.0 version as soon as possible. | |
| 31 | + wpForo is a professional bulletin board for WorPress, and the only forum software which comes with Multi-layout template system. | |
| 32 | 32 | The "Extended", "Simplified" and "Question & Answer" layouts fit almost all type of discussions needs. You can use wpForo for small and extremely large communities. |
| 33 | 33 | <br />If you found some issue or bug please open a support topic in plugin page or in our support forum at gVectors.com. If you liked wpForo please leave some good review for this plugin. We really need your good reviews. |
| 34 | 34 | If you didn\'t like wpForo please leave a list of issues and requirements you\'d like us to fix and add in near future. We\'re here to help you and improve wpForo as much as possible.', 'wpforo'); ?></p> |
| 35 | 35 | </div> |
| @@ -60,9 +60,9 @@ | ||
| 60 | 60 | <h2 class="hndle ui-sortable-handle"><span><?php _e('General Information', 'wpforo'); ?></span></h2> |
| 61 | 61 | <div class="inside"> |
| 62 | 62 | <div class="main"> |
| 63 | 63 | <ul> |
| 64 | - <li class="post-count"><strong><?php _e('You are currently running', 'wpforo'); ?> wpForo <?php echo esc_html(WPFORO_VERSION) ?></strong></li> | |
| 64 | + <li class="post-count"><strong><?php _e('You are currently running', 'wpforo'); ?> wpForo <?php echo esc_html($wpforo->version) ?></strong></li> | |
| 65 | 65 | <li class="page-count"><?php _e('Active Theme', 'wpforo'); ?>: Classic</li> |
| 66 | 66 | <li class="page-count"><?php _e('wpForo Website', 'wpforo'); ?>: <a href="http://wpforo.com">wpForo.com</a></li> |
| 67 | 67 | <li class="page-count"><?php _e('Support Forum', 'wpforo'); ?>: <a href="https://wordpress.org/support/plugin/<?php echo WPFORO_FOLDER; ?>/">WordPress.org Forum</a></li> |
| 68 | 68 | </ul> |
| @@ -83,16 +83,12 @@ | ||
| 83 | 83 | <td class="wpf-dw-td">USER AGENT</td> |
| 84 | 84 | <td class="wpf-dw-td-value"><?php echo $_SERVER['HTTP_USER_AGENT'] ?></td> |
| 85 | 85 | </tr> |
| 86 | 86 | <tr class="wpf-dw-tr"> |
| 87 | - <td class="wpf-dw-td">Web Server</td> | |
| 87 | + <td class="wpf-dw-td">Web Server / PHP</td> | |
| 88 | 88 | <td class="wpf-dw-td-value"><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td> |
| 89 | 89 | </tr> |
| 90 | 90 | <tr class="wpf-dw-tr"> |
| 91 | - <td class="wpf-dw-td">PHP Version</td> | |
| 92 | - <td class="wpf-dw-td-value"><?php echo phpversion(); ?></td> | |
| 93 | - </tr> | |
| 94 | - <tr class="wpf-dw-tr"> | |
| 95 | 91 | <td class="wpf-dw-td">MySQL Version</td> |
| 96 | 92 | <td class="wpf-dw-td-value"><?php echo $wpforo->db->db_version(); ?></td> |
| 97 | 93 | </tr> |
| 98 | 94 | <tr class="wpf-dw-tr"> |
| @@ -115,10 +111,8 @@ | ||
| 115 | 111 | </div> |
| 116 | 112 | </div> |
| 117 | 113 | </div><!-- widget / postbox --> |
| 118 | 114 | |
| 119 | - <?php do_action( 'wpforo_dashboard_widgets_col1', $wpforo ); ?> | |
| 120 | - | |
| 121 | 115 | </div><!-- normal-sortables --> |
| 122 | 116 | </div><!-- wpforo_postbox_container --> |
| 123 | 117 | |
| 124 | 118 | <div class="postbox-container" id="postbox-container-2"> |
| @@ -132,9 +126,9 @@ | ||
| 132 | 126 | <h2 class="hndle ui-sortable-handle"><span><?php _e('Board Statistic', 'wpforo'); ?></span></h2> |
| 133 | 127 | <div class="inside"> |
| 134 | 128 | <div class="main"> |
| 135 | 129 | <table style="width:98%; margin:0px auto; text-align:left;"> |
| 136 | - <?php $statistic = $wpforo->statistic(); ?> | |
| 130 | + <?php $statistic = $wpforo->get_statistic(); ?> | |
| 137 | 131 | <tr class="wpf-dw-tr"> |
| 138 | 132 | <td class="wpf-dw-td"><?php _e('Forums', 'wpforo'); ?></td> |
| 139 | 133 | <td class="wpf-dw-td-value"><?php echo intval($statistic['forums']) ?></td> |
| 140 | 134 | </tr> |
| @@ -153,61 +147,21 @@ | ||
| 153 | 147 | <tr class="wpf-dw-tr"> |
| 154 | 148 | <td class="wpf-dw-td"><?php _e('Members Online', 'wpforo'); ?></td> |
| 155 | 149 | <td class="wpf-dw-td-value"><?php echo intval($statistic['online_members_count']) ?></td> |
| 156 | 150 | </tr> |
| 157 | - <?php | |
| 158 | - $size_da = 0; $size_aa = 0; | |
| 159 | - $upload_dir = wp_upload_dir(); | |
| 160 | - if( is_dir( $upload_dir['basedir'] . '/wpforo/avatars/') ) $size_avatar = wpforo_dir_size( $upload_dir['basedir'] . '/wpforo/avatars' ); | |
| 161 | - if( is_dir( $upload_dir['basedir'] . '/wpforo/default_attachments/') ) $size_da = wpforo_dir_size( $upload_dir['basedir'] . '/wpforo/default_attachments' ); | |
| 162 | - ?> | |
| 163 | - <tr class="wpf-dw-tr"> | |
| 164 | - <td class="wpf-dw-td"><?php _e('Avatars Size', 'wpforo'); ?></td> | |
| 165 | - <td class="wpf-dw-td-value"><?php echo wpforo_human_filesize( $size_avatar ); ?></td> | |
| 166 | - </tr> | |
| 167 | - <tr class="wpf-dw-tr"> | |
| 168 | - <td class="wpf-dw-td"><?php _e('Default Attachments Size', 'wpforo'); ?></td> | |
| 169 | - <td class="wpf-dw-td-value"><?php echo wpforo_human_filesize( $size_da ); ?></td> | |
| 170 | - </tr> | |
| 151 | + | |
| 171 | 152 | <?php if( isset($statistic['attachments']) && $statistic['attachment_sizes'] ) : ?> |
| 172 | - <?php $size_aa = 0; $upload_dir = wp_upload_dir(); if( is_dir( $upload_dir['basedir'] . '/wpforo/attachments/') ) $size_aa = wpforo_dir_size( $upload_dir['basedir'] . '/wpforo/attachments' ); ?> | |
| 153 | + | |
| 173 | 154 | <tr class="wpf-dw-tr"> |
| 174 | - <td class="wpf-dw-td"><?php _e('Advanced Attachments', 'wpforo'); ?></td> | |
| 175 | - <td class="wpf-dw-td-value"><?php echo esc_html($statistic['attachments']) ?> <?php _e('file(s)', 'wpforo'); ?></td> | |
| 155 | + <td class="wpf-dw-td"><?php _e('Attachments', 'wpforo'); ?></td> | |
| 156 | + <td class="wpf-dw-td-value"><?php echo esc_html($statistic['attachments']) ?></td> | |
| 176 | 157 | </tr> |
| 177 | 158 | <tr class="wpf-dw-tr"> |
| 178 | - <td class="wpf-dw-td"><?php _e('Advanced Attachments Size', 'wpforo'); ?></td> | |
| 179 | - <td class="wpf-dw-td-value"><?php echo wpforo_human_filesize( $size_aa ); ?></td> | |
| 159 | + <td class="wpf-dw-td"><?php _e('Attachments Size', 'wpforo'); ?></td> | |
| 160 | + <td class="wpf-dw-td-value"><?php echo wpforo_human_filesize( $statistic['attachment_sizes'] ); ?></td> | |
| 180 | 161 | </tr> |
| 162 | + | |
| 181 | 163 | <?php endif ?> |
| 182 | - <tr class="wpf-dw-tr"> | |
| 183 | - <td class="wpf-dw-td"><?php _e('Total Size', 'wpforo'); ?></td> | |
| 184 | - <td class="wpf-dw-td-value"> | |
| 185 | - <strong style="font-size:14px;"><?php $total = (int)$size_avatar + (int)$size_da + ((isset($size_aa))?(int)$size_aa:0); echo wpforo_human_filesize( $total ); ?></strong> | |
| 186 | - </td> | |
| 187 | - </tr> | |
| 188 | - <tr> | |
| 189 | - <td colspan="2"> | |
| 190 | - <p class="hndle" style="padding:25px 0px 5px 0px; margin:0px; font-size:14px; font-weight:bold;"> | |
| 191 | - <?php _e('Forum Maintenance', 'wpforo'); ?> | |
| 192 | - </p> | |
| 193 | - <p class="wpf-info" style="padding:5px 0px;"><?php _e("This process may take a few seconds or dozens of minutes, please be patient and don't close this page. If you got 500 Server Error please don't worry, the data updating process is still working in MySQL server.", 'wpforo'); ?></p> | |
| 194 | - <div style="width:100%; padding:7px 0px;"> | |
| 195 | - <?php | |
| 196 | - $reset_cache = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_cache' ), 'wpforo_reset_cache' ); | |
| 197 | - $reset_forums_stat_url = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_fstat' ), 'wpforo_reset_forums_stat' ); | |
| 198 | - $reset_users_stat_url = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_ustat' ), 'wpforo_reset_users_stat' ); | |
| 199 | - $reset_phrase_cache = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_phrase_cache' ), 'wpforo_reset_phrase_cache' ); | |
| 200 | - $reset_user_cache = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_user_cache' ), 'wpforo_reset_user_cache' ); | |
| 201 | - ?> | |
| 202 | - <a href="<?php echo esc_url($reset_cache); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Delete All Caches', 'wpforo'); ?></a> | |
| 203 | - <a href="<?php echo esc_url($reset_forums_stat_url); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Update Forums Statistic', 'wpforo'); ?></a> | |
| 204 | - <a href="<?php echo esc_url($reset_users_stat_url); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Update Users Statistic', 'wpforo'); ?></a> | |
| 205 | - <a href="<?php echo esc_url($reset_phrase_cache); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Delete Phrase Cache', 'wpforo'); ?></a> | |
| 206 | - <a href="<?php echo esc_url($reset_user_cache); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Delete User Cache', 'wpforo'); ?></a> | |
| 207 | - </div> | |
| 208 | - </td> | |
| 209 | - </tr> | |
| 210 | 164 | |
| 211 | 165 | </table> |
| 212 | 166 | </div> |
| 213 | 167 | </div> |
| @@ -212,10 +166,8 @@ | ||
| 212 | 166 | </div> |
| 213 | 167 | </div> |
| 214 | 168 | </div><!-- widget / postbox --> |
| 215 | 169 | |
| 216 | - <?php do_action( 'wpforo_dashboard_widgets_col2', $wpforo ); ?> | |
| 217 | - | |
| 218 | 170 | </div><!-- normal-sortables --> |
| 219 | 171 | </div><!-- wpforo_postbox_container --> |
| 220 | 172 | <?php endif; ?> |
| 221 | 173 | |
| @@ -221,9 +173,9 @@ | ||
| 221 | 173 | |
| 222 | 174 | <div class="postbox-container" id="postbox-container-3"> |
| 223 | 175 | <div class="meta-box-sortables ui-sortable" id="normal-sortables"> |
| 224 | 176 | |
| 225 | - <?php do_action( 'wpforo_dashboard_widgets_col3', $wpforo ); ?> | |
| 177 | + | |
| 226 | 178 | |
| 227 | 179 | </div><!-- normal-sortables --> |
| 228 | 180 | </div><!-- wpforo_postbox_container --> |
| 229 | 181 | |