| @@ -38,9 +38,9 @@ | ||
| 38 | 38 | |
| 39 | 39 | <div id="icon-edit" class="icon32 icon32-posts-post"></div> |
| 40 | 40 | <div id="wpf-admin-wrap" class="wrap"> |
| 41 | 41 | |
| 42 | - <h2 style="padding:30px 0px 10px 0px; line-height: 20px;"> | |
| 42 | + <h2 style="padding:30px 0px 10px 0px;line-height: 20px;"> | |
| 43 | 43 | <?php _e('Categories and Forums', 'wpforo'); ?> |
| 44 | 44 | <a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&action=add' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a> |
| 45 | 45 | </h2> |
| 46 | 46 | |
| @@ -47,19 +47,14 @@ | ||
| 47 | 47 | <?php $wpforo->notice->show(FALSE) ?> |
| 48 | 48 | |
| 49 | 49 | <!-- Forum Hierarchy --> |
| 50 | 50 | <?php if( !isset($_GET['action'])) : ?> |
| 51 | - <?php if($wpforo->perm->usergroup_can('ef')): ?> | |
| 51 | + <?php if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'ef')): ?> | |
| 52 | 52 | |
| 53 | - <div class="wpf-info-bar" style="line-height: 1em; clear:both; padding: 5px 30px; font-size:15px; display:block; box-shadow:none; margin: 20px 0 10px 0; font-style: italic; background: #FFFFC6; width:90%;"> | |
| 54 | - <ul style="list-style-type: disc; line-height:18px;"> | |
| 55 | - <li style="list-style:none; margin-left:-17px; font-style:normal; font-weight:bold;"><i class="fa fa-info-circle" aria-hidden="true"></i> <?php _e('Important Tips', 'wpforo'); ?></li> | |
| 56 | - <li><?php _e('Please drag and drop forum panels to set parent-child hierarchy.', 'wpforo'); ?></li> | |
| 57 | - <li><?php _e('If a category (blue panels) does not have forums (grey panels) it will not be displayed on front-end. Each category should contain at least one forum.', 'wpforo'); ?></li> | |
| 58 | - <li><?php _e('Forums can be displayed with different layouts (Extended, Simplified, Q&A), just edit the top (blue panels) category and set the layout you want. Child forums\' layout depends on the top category (blue panels) layout. They cannot have a different layout.', 'wpforo'); ?></li> | |
| 59 | - </ul> | |
| 53 | + | |
| 54 | + <div class="wpf-info-bar" style="box-shadow:none; margin:20px 0px;"> | |
| 55 | + <p style="font-size:15px; padding:0px; margin:10px 0px;"><?php _e('Please drag and drop forum panels to set parent-child hierarchy.', 'wpforo'); ?></p> | |
| 60 | 56 | </div> |
| 61 | - <br style="clear: both;" /> | |
| 62 | 57 | |
| 63 | 58 | <form id="forum-hierarchy" encType="multipart/form-data" method="post" action=""> |
| 64 | 59 | <?php wp_nonce_field( 'wpforo-forums-hierarchy' ); ?> |
| 65 | 60 | <input type="hidden" name="forums_hierarchy_submit"/> |
| @@ -81,13 +76,13 @@ | ||
| 81 | 76 | </script> |
| 82 | 77 | <?php endif; ?><!--checking edit forum permission--> |
| 83 | 78 | <?php endif; ?> |
| 84 | 79 | <!-- end Forum Hierarchy --> |
| 85 | - <br style="clear: both;"/> | |
| 80 | + | |
| 86 | 81 | <!-- Forum Add || Edit --> |
| 87 | 82 | <?php if( ( isset($_GET['action']) && $_GET['action'] == 'add' ) || ( isset($_GET['action']) && $_GET['action'] == 'edit' ) ) : ?> |
| 88 | - <?php if($wpforo->perm->usergroup_can('cf')): ?> | |
| 89 | - <?php if(isset($_GET['id'])) $data = $wpforo->forum->get_forum( array('forumid' => $_GET['id']) ); ?> | |
| 83 | + <?php if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'cf')): ?> | |
| 84 | + <?php if(isset($_GET['id'])) $data = $wpforo->forum->get_forum( array('forumid' => $_GET['id']) );?> | |
| 90 | 85 | <div id="poststuff"> |
| 91 | 86 | <form name="forum" action="" method="post"> |
| 92 | 87 | <?php wp_nonce_field( 'wpforo-forum-addedit' ); ?> |
| 93 | 88 | <div id="post-body" class="metabox-holder columns-2"> |
| @@ -150,9 +145,9 @@ | ||
| 150 | 145 | <div class="inside"> |
| 151 | 146 | <div id="major-publishing-actions" style="text-align:right;"> |
| 152 | 147 | <?php if( $_GET['action'] == 'edit' ) : ?> |
| 153 | 148 | <a class="wpf-delete button" href="?page=wpforo-forums&id=<?php echo intval($data['forumid']) ?>&action=del" onclick="if (!confirm('<?php _e('Are you sure you want to delete this forum?', 'wpforo'); ?>')) { return false; }"><?php _e('Delete', 'wpforo'); ?></a> |
| 154 | - <a class="preview button" href="<?php echo wpforo_home_url( (isset($data['slug']) ? $data['slug'] : '') ) ?>" target="wp-preview" id="post-preview" style="display:inline-block;float:none;"><?php _e('View', 'wpforo'); ?></a> | |
| 149 | + <a class="preview button" href="<?php echo WPFORO_BASE_URL . (isset($data['slug']) ? $data['slug'] : '') ?>" target="wp-preview" id="post-preview" style="display:inline-block;float:none;"><?php _e('View', 'wpforo'); ?></a> | |
| 155 | 150 | <?php endif; ?> |
| 156 | 151 | <input type="submit" name="forum[save_edit]" class="button button-primary forum_submit" style="display:inline-block;float:none;" value="<?php _e('Publish', 'wpforo'); ?>"> |
| 157 | 152 | <div class="clear"></div> |
| 158 | 153 | </div> |
| @@ -227,20 +222,8 @@ | ||
| 227 | 222 | <p><?php _e('The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wpforo'); ?> </p><br /> |
| 228 | 223 | </div> |
| 229 | 224 | </div> |
| 230 | 225 | |
| 231 | - <div id="forum_icon" class="postbox hide-if-js" style="display: block; "> | |
| 232 | - <div class="handlediv" title="Click to toggle"><br></div> | |
| 233 | - <h3 class="hndle"><span><?php _e('Forum Icon', 'wpforo'); ?></span></h3> | |
| 234 | - <div class="inside" style="padding-top:10px;"> | |
| 235 | - <div class="form-field"> | |
| 236 | - <label for="tag-icon" style="display:block; padding-bottom:5px;"><?php _e('Font-awesome Icon', 'wpforo'); ?>:</label> | |
| 237 | - <input name="forum[icon]" value="<?php echo (isset($data['icon']) && $data['icon']) ? esc_attr($data['icon']) : 'fa-comments'; ?>" type="text"/> | |
| 238 | - <p style="margin-bottom:0px; margin-top:5px;"><?php _e('You can find all icons', 'wpforo'); ?> <a href="http://fontawesome.io/icons/" target="_blank"><?php _e('here', 'wpforo'); ?>.</a> <?php _e('Make sure you insert a class of font-awesome icon, it should start with fa- prefix like "fa-comments".', '') ?></p> | |
| 239 | - </div> | |
| 240 | - </div> | |
| 241 | - </div> | |
| 242 | - | |
| 243 | 226 | <div id="forum_meta" class="postbox hide-if-js" style="display: block; "> |
| 244 | 227 | <div class="handlediv" title="Click to toggle"><br></div> |
| 245 | 228 | <h3 class="hndle"><span><?php _e('Forum SEO', 'wpforo'); ?></span></h3> |
| 246 | 229 | <div class="inside" style="padding-top:10px;"> |
| @@ -288,9 +271,9 @@ | ||
| 288 | 271 | </tr> |
| 289 | 272 | <tr> |
| 290 | 273 | <td colspan="2"> |
| 291 | 274 | <select id="forum_select" name="forum[mergeid]" class="postform" disabled="" > |
| 292 | - <?php $wpforo->forum->tree('select_box', false); ?> | |
| 275 | + <?php $wpforo->forum->tree('select_box'); ?> | |
| 293 | 276 | </select> |
| 294 | 277 | <p><?php _e('All sub-forums, topics and replies will be attached to selected forum. Layout will be inherited from this forum.', 'wpforo'); ?></p> |
| 295 | 278 | </td> |
| 296 | 279 | </tr> |