wpForo Forum - Version beta-1

Version Description

Download this release

Release Info

Developer Tomdever
Plugin Icon 128x128 wpForo Forum
Version beta-1
Comparing to
See all releases

Version beta-1

Files changed (147) hide show
  1. readme.txt +138 -0
  2. screenshot-1.png +0 -0
  3. screenshot-10.png +0 -0
  4. screenshot-11.png +0 -0
  5. screenshot-12.png +0 -0
  6. screenshot-13.png +0 -0
  7. screenshot-14.png +0 -0
  8. screenshot-15.png +0 -0
  9. screenshot-16.png +0 -0
  10. screenshot-2.png +0 -0
  11. screenshot-3.png +0 -0
  12. screenshot-4.png +0 -0
  13. screenshot-5.png +0 -0
  14. screenshot-6.png +0 -0
  15. screenshot-7.png +0 -0
  16. screenshot-8.png +0 -0
  17. screenshot-9.png +0 -0
  18. wpf-admin/admin.php +58 -0
  19. wpf-admin/css/admin.css +257 -0
  20. wpf-admin/dashboard.php +188 -0
  21. wpf-admin/forum.php +295 -0
  22. wpf-admin/js/admin_notice.js +15 -0
  23. wpf-admin/js/functions.js +100 -0
  24. wpf-admin/member.php +43 -0
  25. wpf-admin/options-tabs/accesses.php +66 -0
  26. wpf-admin/options-tabs/features.php +59 -0
  27. wpf-admin/options-tabs/forums.php +18 -0
  28. wpf-admin/options-tabs/general.php +73 -0
  29. wpf-admin/options-tabs/members.php +69 -0
  30. wpf-admin/options-tabs/plugins.php +33 -0
  31. wpf-admin/options-tabs/posts.php +59 -0
  32. wpf-admin/options-tabs/styles.php +48 -0
  33. wpf-admin/options-tabs/subscriptions.php +77 -0
  34. wpf-admin/options.php +61 -0
  35. wpf-admin/phrase.php +68 -0
  36. wpf-admin/themes.php +113 -0
  37. wpf-admin/usergroup.php +140 -0
  38. wpf-admin/xml/armenian.xml +235 -0
  39. wpf-admin/xml/english.xml +235 -0
  40. wpf-assets/css/font-awesome/css/font-awesome.min.css +4 -0
  41. wpf-assets/css/font-awesome/fonts/FontAwesome.otf +0 -0
  42. wpf-assets/css/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  43. wpf-assets/css/font-awesome/fonts/fontawesome-webfont.svg +685 -0
  44. wpf-assets/css/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  45. wpf-assets/css/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  46. wpf-assets/css/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
  47. wpf-assets/css/font-awesome/less/animated.less +34 -0
  48. wpf-assets/css/font-awesome/less/bordered-pulled.less +25 -0
  49. wpf-assets/css/font-awesome/less/core.less +12 -0
  50. wpf-assets/css/font-awesome/less/fixed-width.less +6 -0
  51. wpf-assets/css/font-awesome/less/font-awesome.less +18 -0
  52. wpf-assets/css/font-awesome/less/icons.less +733 -0
  53. wpf-assets/css/font-awesome/less/larger.less +13 -0
  54. wpf-assets/css/font-awesome/less/list.less +19 -0
  55. wpf-assets/css/font-awesome/less/mixins.less +60 -0
  56. wpf-assets/css/font-awesome/less/path.less +15 -0
  57. wpf-assets/css/font-awesome/less/rotated-flipped.less +20 -0
  58. wpf-assets/css/font-awesome/less/screen-reader.less +5 -0
  59. wpf-assets/css/font-awesome/less/stacked.less +20 -0
  60. wpf-assets/css/font-awesome/less/variables.less +744 -0
  61. wpf-assets/css/font-awesome/scss/_animated.scss +34 -0
  62. wpf-assets/css/font-awesome/scss/_bordered-pulled.scss +25 -0
  63. wpf-assets/css/font-awesome/scss/_core.scss +12 -0
  64. wpf-assets/css/font-awesome/scss/_fixed-width.scss +6 -0
  65. wpf-assets/css/font-awesome/scss/_icons.scss +733 -0
  66. wpf-assets/css/font-awesome/scss/_larger.scss +13 -0
  67. wpf-assets/css/font-awesome/scss/_list.scss +19 -0
  68. wpf-assets/css/font-awesome/scss/_mixins.scss +60 -0
  69. wpf-assets/css/font-awesome/scss/_path.scss +15 -0
  70. wpf-assets/css/font-awesome/scss/_rotated-flipped.scss +20 -0
  71. wpf-assets/css/font-awesome/scss/_screen-reader.scss +5 -0
  72. wpf-assets/css/font-awesome/scss/_stacked.scss +20 -0
  73. wpf-assets/css/font-awesome/scss/_variables.scss +744 -0
  74. wpf-assets/css/font-awesome/scss/font-awesome.scss +18 -0
  75. wpf-assets/images/noavatar.png +0 -0
  76. wpf-assets/images/wpforo-info.png +0 -0
  77. wpf-assets/images/wpforo-logo.png +0 -0
  78. wpf-assets/js/ajax.js +545 -0
  79. wpf-assets/js/frontend.js +174 -0
  80. wpf-assets/js/tinymce-pre.js +30 -0
  81. wpf-includes/class-feed.php +103 -0
  82. wpf-includes/class-forums.php +739 -0
  83. wpf-includes/class-members.php +910 -0
  84. wpf-includes/class-notices.php +137 -0
  85. wpf-includes/class-permissions.php +188 -0
  86. wpf-includes/class-phrases.php +221 -0
  87. wpf-includes/class-posts.php +554 -0
  88. wpf-includes/class-subscribes.php +169 -0
  89. wpf-includes/class-template.php +1070 -0
  90. wpf-includes/class-topics.php +615 -0
  91. wpf-includes/class-usergroups.php +147 -0
  92. wpf-includes/functions-installation.php +520 -0
  93. wpf-includes/functions-integration.php +79 -0
  94. wpf-includes/functions-template.php +536 -0
  95. wpf-includes/functions.php +1003 -0
  96. wpf-includes/install-sql.php +180 -0
  97. wpf-includes/wpf-actions.php +517 -0
  98. wpf-includes/wpf-hooks.php +1108 -0
  99. wpf-themes/classic/404.php +21 -0
  100. wpf-themes/classic/colors.css +350 -0
  101. wpf-themes/classic/css/admin.css +67 -0
  102. wpf-themes/classic/css/jquery-ui.css +1229 -0
  103. wpf-themes/classic/footer.php +76 -0
  104. wpf-themes/classic/functions-wp.php +11 -0
  105. wpf-themes/classic/functions.php +123 -0
  106. wpf-themes/classic/header.php +34 -0
  107. wpf-themes/classic/images/arrow-bottom.png +0 -0
  108. wpf-themes/classic/images/load.GIF +0 -0
  109. wpf-themes/classic/images/smallload.GIF +0 -0
  110. wpf-themes/classic/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  111. wpf-themes/classic/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  112. wpf-themes/classic/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  113. wpf-themes/classic/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  114. wpf-themes/classic/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  115. wpf-themes/classic/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  116. wpf-themes/classic/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  117. wpf-themes/classic/images/ui-bg_spotlight_75_43a6df_600x600.png +0 -0
  118. wpf-themes/classic/images/ui-icons_222222_256x240.png +0 -0
  119. wpf-themes/classic/images/ui-icons_2e83ff_256x240.png +0 -0
  120. wpf-themes/classic/images/ui-icons_454545_256x240.png +0 -0
  121. wpf-themes/classic/images/ui-icons_888888_256x240.png +0 -0
  122. wpf-themes/classic/images/ui-icons_cd0a0a_256x240.png +0 -0
  123. wpf-themes/classic/index.php +213 -0
  124. wpf-themes/classic/layouts/1/forum.php +113 -0
  125. wpf-themes/classic/layouts/1/post.php +77 -0
  126. wpf-themes/classic/layouts/1/topic.php +86 -0
  127. wpf-themes/classic/layouts/2/forum.php +86 -0
  128. wpf-themes/classic/layouts/2/post.php +83 -0
  129. wpf-themes/classic/layouts/2/topic.php +50 -0
  130. wpf-themes/classic/layouts/3/forum.php +120 -0
  131. wpf-themes/classic/layouts/3/post.php +160 -0
  132. wpf-themes/classic/layouts/3/topic.php +48 -0
  133. wpf-themes/classic/login.php +41 -0
  134. wpf-themes/classic/members.php +58 -0
  135. wpf-themes/classic/profile-account.php +149 -0
  136. wpf-themes/classic/profile-activity.php +20 -0
  137. wpf-themes/classic/profile-home.php +181 -0
  138. wpf-themes/classic/profile-subscriptions.php +35 -0
  139. wpf-themes/classic/profile.php +75 -0
  140. wpf-themes/classic/register.php +47 -0
  141. wpf-themes/classic/screenshot.png +0 -0
  142. wpf-themes/classic/search.php +154 -0
  143. wpf-themes/classic/style-rtl.css +930 -0
  144. wpf-themes/classic/style.css +931 -0
  145. wpf-themes/classic/styles/colors.php +18 -0
  146. wpf-themes/classic/styles/css.php +364 -0
  147. wpforo.php +305 -0
readme.txt ADDED
@@ -0,0 +1,138 @@
1
+ === Forum - wpForo ===
2
+ Contributors: gVectors Team
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y4YBFBNBV3R2E
4
+ Tags: forum, community, discussion, bulletin board, question and answers, qa, support
5
+ Requires at least: 4.4
6
+ Tested up to: 4.5
7
+ Stable tag: beta-1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ WordPress forum plugin. Everything you need to run an efficient and professional community. Powerful and beautiful bulletin board with unique features
12
+
13
+ == Description ==
14
+
15
+ New Generation of WordPress forum plugins. Everything you need to run an efficient and professional community. Powerful and beautiful bulletin board with unique features.
16
+
17
+ <blockquote>
18
+ It's on the Beta stage and we're working hard to reach the Gold 1.0.0 version as soon as possible. If you found some issue or bug please open a support topic in plugin page or in our support forum: http://wpforo.com/community/.
19
+ <br/><br/>
20
+ </blockquote>
21
+
22
+ 1. **Extended Layout:**
23
+ Classic forum layout with an unique feature to show one level deeper information. You can see latest topics of each forum on Forum List and latest posts of each topic on Topic List.
24
+ 2. **Simplified Layout:**
25
+ Light, modern and beautiful forum layout with topic and post author avatars on forum and topic lists.
26
+ 3. **Question and Answer Layout:**
27
+ Complete Question & Answers discussion board for professional support and for communities similar to Stack Overflow. Perfect platform for users to ask and answer questions, and, through membership and active participation, to vote up or down.
28
+
29
+ = wpForo Key Features =
30
+
31
+ <blockquote>
32
+ DESIGNED FOR ALL<br/>
33
+ You can use wpForo for small and extremely large communities. We keep improving plugin performance.<br/>
34
+ <br/>
35
+ FORUM LAYOUTS<br/>
36
+ The "Extended", "Simplified" and "Question & Answer" layouts fit almost all type of discussions needs.<br/>
37
+ <br/>
38
+ MOBILE FRIENDLY<br/>
39
+ wpForo is super responsive on all kind of devices. Adapted on all screen sizes. You get perfectly scaled layouts on desktop, tabs and smartphones.<br/>
40
+ <br/>
41
+ SEO FRIENDLY<br/>
42
+ Built-in SEO functions. SEO effective Permalinks, Titles, Meta Data, Open Graph tags, Smart heading, Crawling friendly content.<br/>
43
+ <br/>
44
+ THEME API<br/>
45
+ You can create and install new themes, copy the customized forum theme and keep it in active WordPress theme folder.<br/>
46
+ <br/>
47
+ EXTENDABLE<br/>
48
+ We also develop free (built-in) and paid addons. The first addons "Advanced File Attachments", "Polls", "Private Messages" and "Ad Manager" will be available very soon.<br/>
49
+ <br/>
50
+ MEMBER PROFILE SYSTEM<br/>
51
+ Beautiful, modern and informative profile system, with member statistic, bio, settings, activity and subscriptions pages.<br/>
52
+ <br/>
53
+ MEMBER RATING AND BADGES<br/>
54
+ User rating system based on number of posts. Nice Badges and Member Rating Titles per reputation level. Fully customizable.<br/>
55
+ <br/>
56
+ SUBSCRIPTION AND RSS FEED<br/>
57
+ Built-in forum/topic subscription with double opt-in subscription confirmation function. Separate forum/topic RSS2 feeds.<br/>
58
+ <br/>
59
+ EASY FORUM HIERARCHY<br/>
60
+ Drag and Drop forum management system. Easy to set Parent-Child relationship and forum list order.<br/>
61
+ <br/>
62
+ EASY FORUM MODERATION<br/>
63
+ All necessary moderation tools on each topic and post to make easy forum moderation. Fast and AJAX powered action will make it pleasure.<br/>
64
+ <br/>
65
+ STYLES AND CUSTOMIZATION<br/>
66
+ Styles with different colors, dozens of settings, options, switches to manage and integrate forum with your theme look and feel. Almost everything has its option to make it different.<br/>
67
+ <br/>
68
+ USERGROUPS AND PERMISSIONS<br/>
69
+ Built-in, powerful Usergroup system. Allows to create a new, manage and delete. All Usergroups have according permissions, with separate managing options.<br/>
70
+ <br/>
71
+ FORUM ACCESS ROLES<br/>
72
+ This is a set of access roles named e.g.: "Read Only", "Standard Access", "Moderation Access", "Full Access", etc.. to manage Usergroup accesses for each forum.<br/>
73
+ <br/>
74
+ LANGUAGE API & TRANSLATION<br/>
75
+ wpForo has its own Phrase System, which allows you to translate all phrases through Dashboard.<br/>
76
+ <br/><br/>
77
+ </blockquote>
78
+
79
+ = Currently we're working on =
80
+ * Dark Style...
81
+ * RTL Support...
82
+ * Complete set of front-end phrases...
83
+ * Support of .MO/.PO translation files...
84
+ * Social Network Sharing Buttons...
85
+ * wpForo Anti-Spam...
86
+ * Go2wpForo Migration Tool...
87
+ * wpForo Documentation...
88
+
89
+
90
+ == Installation ==
91
+
92
+ 1. Install the plugin through the WordPress plugins screen directly or upload the plugin files to the `/wp-content/plugins/wpforo` directory
93
+ 2. Activate the plugin through the 'Plugins' screen in WordPress
94
+ 3. wpForo creates a page with /community/ slug. If this slug is used you'll have /community-2/ or /community-3/ slug. You can find the correct one in Forums > Settings > General Tab. Make sure you use WordPress permalinks. wpForo doesn't work with default ?p=1 URL structure.
95
+ 4. If you need to change forum page you should put [wpforo-index] shortcode in new page content and insert the new page URL in Dashboard > Forums > Settings > General Tab > "Forum Base URL" option field.
96
+
97
+ = Getting Started =
98
+
99
+ 1. **Forum Menu:** In Dashboard > Appearance > Menu admin page wpForo creates new navigation menu called "wpForo Navigation (wpForo Menu)" and attaches this menu to wpForo Menu location, it's the main, top forum menu. You can customize forum menu items through Appearance > Menu settings.
100
+ 2. **Forum Sidebar and Widgets:** In Dashboard > Appearance > Widgets wpForo creates forum specific widgets and wpForo Sidebar. if you use wpForo sidebar you should make sure the forum page has not other sidebars, the page Template should be set "Full Width" or "One Column" or "Two Column with Right Sidebar". wpForo Sidebar is a left sidebar.
101
+ 3. **Forum Management:** In Dashboard > Forums > Forums admin page you can manage forums, add/edit/delete/order, set parent-child relationship, manage Forum Access Roles for each Usergroup.
102
+ 4. **Forum Style & Colors:** In Dashboard > Settings > Styles admin page you can set forum Style/Colors. You can choose either "Default (Blue)", "Red", "Green", "Orange", "Grey".
103
+ 5. **Login and Registration** In Dashboard > Settings > Features you can manage Login and Registration URL. You can force those to wpForo page or keep default WordPress pages.
104
+
105
+ == Frequently Asked Questions ==
106
+
107
+ Please make sure you've read the "Getting Started" section in "Installation" Tab.
108
+
109
+ wpForo Support Forum: <http://wpforo.com/community/>
110
+
111
+ == Screenshots ==
112
+
113
+ 1. Forum list - "Extended" layout (layout #1) | Screenshot #1
114
+ 2. Forum list - "Simplified" layout (layout #2) | Screenshot #2
115
+ 3. Forum list - "Question & Answer" layout (layout #3) | Screenshot #3
116
+ 4. Topic list - "Extended" layout | Screenshot #4
117
+ 5. Topic list - "Simplified" layout | Screenshot #5
118
+ 6. Topic list - "Question & Answer" layout | Screenshot #6
119
+ 7. Post list - "Extended" layout | Screenshot #7
120
+ 8. Post list - "Simplified" layout | Screenshot #8
121
+ 9. Post list - "Question & Answer" | Screenshot #9
122
+ 10. Forum Profile Page - integrated with Shop and Profile plugins | Screenshot #10
123
+ 11. Forum Member List | Screenshot #11
124
+ 12. Dashboard - Drag and Drop forum management system. Easy to set Parent-Child relationship and forum order. | Screenshot #12
125
+ 13. Dashboard - General Settings | Screenshot #13
126
+ 14. Dashboard - Members Settings | Screenshot #14
127
+ 15. Dashboard - Forum Styles, Colors | Screenshot #15
128
+ 16. Dashboard - Forum Accesses / Can's | Screenshot #16
129
+
130
+
131
+ == Changelog ==
132
+
133
+ = Beta-1 =
134
+
135
+ * Initial version. It's on the Beta stage and we're working hard to reach the Gold 1.0.0 version as soon as possible. If you found some issue or bug please open a support topic in plugin page or in our support forum.
136
+
137
+
138
+
screenshot-1.png ADDED
Binary file
screenshot-10.png ADDED
Binary file
screenshot-11.png ADDED
Binary file
screenshot-12.png ADDED
Binary file
screenshot-13.png ADDED
Binary file
screenshot-14.png ADDED
Binary file
screenshot-15.png ADDED
Binary file
screenshot-16.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
screenshot-6.png ADDED
Binary file
screenshot-7.png ADDED
Binary file
screenshot-8.png ADDED
Binary file
screenshot-9.png ADDED
Binary file
wpf-admin/admin.php ADDED
@@ -0,0 +1,58 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+
5
+ function wpforo_add_menu(){
6
+ global $wpforo;
7
+ $position = ( isset($wpforo->general_options['menu_position']) && $wpforo->general_options['menu_position'] > 0 ) ? $wpforo->general_options['menu_position'] : 23;
8
+ add_menu_page('Dashboard', 'Forums', 'read', 'wpforo-community', 'wpforo_toplevel_page', 'dashicons-format-chat', $position);
9
+ add_submenu_page('wpforo-community', 'Dashboard', 'Dashboard', 'read', 'wpforo-community', 'wpforo_toplevel_page' );
10
+ if( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'cf' ) && $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'ef' ) && $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'df' ) ) add_submenu_page('wpforo-community', 'Forums', 'Forums', 'read', 'wpforo-forums', 'wpforo_forum_menu');
11
+ if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', 'Settings', 'Settings', 'read', 'wpforo-settings', 'wpforo_settings');
12
+ if( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vm' ) && ( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'em') || $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'dm') ) ) add_submenu_page('wpforo-community', 'Members', 'Members', 'read', 'wpforo-members', 'wpforo_member_menu');
13
+ if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', 'Usergroups', 'Usergroups', 'read', 'wpforo-usergroups', 'wpforo_usergroups_menu');
14
+ if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', 'Phrases', 'Phrases', 'read', 'wpforo-phrases', 'wpforo_phrases');
15
+ if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', 'Themes', 'Themes', 'read', 'wpforo-themes', 'wpforo_themes');
16
+ }
17
+ add_action('admin_menu', 'wpforo_add_menu', 39);
18
+
19
+ function wpforo_toplevel_page(){
20
+ global $wpforo;
21
+ require( WPFORO_DIR . '/wpf-admin/dashboard.php' );
22
+ }
23
+
24
+ function wpforo_forum_menu(){
25
+ global $wpforo;
26
+ require( WPFORO_DIR . '/wpf-admin/forum.php' );
27
+ }
28
+
29
+ function wpforo_member_menu(){
30
+ global $wpforo;
31
+ require( WPFORO_DIR . '/wpf-admin/member.php' );
32
+ }
33
+
34
+ function wpforo_usergroups_menu(){
35
+ global $wpforo;
36
+ require( WPFORO_DIR . '/wpf-admin/usergroup.php' );
37
+ }
38
+
39
+ function wpforo_settings(){
40
+ global $wpforo, $wpdb;
41
+ require( WPFORO_DIR . '/wpf-admin/options.php' );
42
+ }
43
+
44
+ function wpforo_themes(){
45
+ global $wpforo;
46
+ require( WPFORO_DIR . '/wpf-admin/themes.php' );
47
+ }
48
+
49
+ function wpforo_phrases(){
50
+ global $wpforo;
51
+ require( WPFORO_DIR . '/wpf-admin/phrase.php' );
52
+ }
53
+
54
+ function wpforo_integrations(){
55
+ global $wpforo;
56
+ require( WPFORO_DIR . '/wpf-admin/integration.php' );
57
+ }
58
+ ?>
wpf-admin/css/admin.css ADDED
@@ -0,0 +1,257 @@
1
+ #wpf-admin-wrap .menu_edit{
2
+ color: #a7a7a7;
3
+ cursor: pointer;
4
+ }
5
+ #wpf-admin-wrap .menu_edit:hover{
6
+ color: #004eb7;
7
+ cursor: pointer;
8
+ }
9
+
10
+ #wpf-admin-wrap .menu_delete{
11
+ color: #a7a7a7;
12
+ cursor: pointer;
13
+ }
14
+ #wpf-admin-wrap .menu_delete:hover{
15
+ color: #eb3034;
16
+ cursor: pointer;
17
+ }
18
+ #wpf-admin-wrap .forum_width{
19
+ width: 65%;
20
+ }
21
+ #wpf-admin-wrap .forumtitle{
22
+ font-size:14px;
23
+ font-weight:bold;
24
+ width: 52%;
25
+ }
26
+ #wpf-admin-wrap .item-controls{
27
+ font-size:13px;
28
+ }
29
+ #wpf-admin-wrap .root_forum{
30
+ text-decoration: none!important;
31
+ color:#231f1f;
32
+ }
33
+ #wpf-admin-wrap .forum_submit{
34
+ width: 80px!important;
35
+ }
36
+ #wpf-admin-wrap .item-controls{
37
+ top: 10%!important;
38
+ }
39
+ #forum_submit{
40
+ width: 80px!important;
41
+ }
42
+ #usergroup_table{
43
+ width:98%;
44
+ }
45
+ #use_us_cat{
46
+ width: 1%!important;
47
+ }
48
+ #wpf-admin-wrap .form-field textarea{
49
+ width: 100% !important;
50
+ }
51
+ #wpf-admin-wrap .option_box{
52
+ margin: 30px;
53
+ padding: 30px;
54
+ width: 30%;
55
+ height: 20%;
56
+ background: #e9e9eb;
57
+ border: 1px dotted black;
58
+ border-radius: 10px;
59
+ float: left;
60
+ overflow: auto;
61
+ }
62
+
63
+ #wpf-admin-wrap .option_box label{
64
+ margin: 0.5%;
65
+ font-weight: bold;
66
+ }
67
+ #wpf-admin-wrap .wpfadmin_notice{
68
+ cursor: pointer;
69
+ }
70
+
71
+ #wpf-admin-wrap .wpf-table-box-left{ width:30%; margin:0px; padding:10px; border:#CCCCCC 1px dotted; float:left; background:#FDFDFD; }
72
+ #wpf-admin-wrap .wpf-td-label{ font-weight:bold; font-size:13px; line-height:16px; }
73
+ #wpf-admin-wrap .wpf-td-label-left{ font-weight:bold; font-size:13px; line-height:16px; text-align:left; vertical-align:top; }
74
+ #wpf-admin-wrap .wpf-td-label-left-p{ font-weight:bold; font-size:13px; line-height:16px; text-align:left; vertical-align:top; padding:5px 1px; }
75
+ #wpf-admin-wrap .wpf-dw-td{ vertical-align:top; text-align:left; width:40%; font-weight:bold;line-height: 2.1em; }
76
+ #wpf-admin-wrap .wpf-dw-td-nowrap{ vertical-align:top; text-align:left; font-weight:bold; white-space:nowrap; line-height: 2.1em; }
77
+ #wpf-admin-wrap .wpf-dw-td-value{ vertical-align:top; text-align:left;line-height: 2.1em; }
78
+ #wpf-admin-wrap .wpf-dw-td-g{ width:50%; text-align:right; vertical-align:top; padding-right:10px; font-weight:bold; }
79
+ #wpf-admin-wrap .wpf-dw-td-value-b{ vertical-align:bottom; text-align:left; }
80
+ #wpf-admin-wrap .wpf-dw-td-value-p{ vertical-align:top; text-align:left; padding:5px 1px; }
81
+
82
+
83
+
84
+ /****************************************************/
85
+ /************* Admin members bar ********************/
86
+ /****************************************************/
87
+
88
+ .author-rating {
89
+ height: 8px;
90
+ border: 1px solid #E0E0E0;
91
+ background: #F5F5F5;
92
+ width: 90px;
93
+ margin: 15px auto 2px 0px;
94
+ padding: 0px;
95
+ }
96
+ .author-rating .bar{ height:8px; }
97
+
98
+ .wpfw-0 { width:0%; }
99
+ .wpfw-10{ width:10%; }
100
+ .wpfw-20{ width:20%; }
101
+ .wpfw-30{ width:30%; }
102
+ .wpfw-40{ width:40%; }
103
+ .wpfw-50{ width:50%; }
104
+ .wpfw-60{ width:60%; }
105
+ .wpfw-70{ width:70%; }
106
+ .wpfw-80{ width:80%; }
107
+ .wpfw-90{ width:90%; }
108
+ .wpfw-100{ width:100%; }
109
+
110
+ .wpfcl-a{ color:#68A3C1!important; } /* Blue Dark */
111
+ .wpfbg-a{ background-color:#68A3C1!important; }
112
+ .wpfcl-b{ color:#43A6DF!important; } /* Blue Dark */
113
+ .wpfbg-b{ background-color:#43A6DF!important; }
114
+ .wpfcl-0{ color:#999999!important; } /* Grey */
115
+ .wpfbg-0{ background-color:#999999!important; }
116
+ .wpfcl-1{ color:#555555!important; } /* Grey - Black */
117
+ .wpfbg-1{ background-color:#555555!important; }
118
+ .wpfcl-2{ color:#777777!important; } /* Grey */
119
+ .wpfbg-2{ background-color:#777777!important; }
120
+ .wpfcl-3{ color:#ffffff!important; } /* White */
121
+ .wpfbg-3{ background-color:#ffffff!important; }
122
+ .wpfcl-4{ color:#72CCFC!important;} /* Blue Light */
123
+ .wpfbg-4{ background-color:#72CCFC!important; }
124
+ .wpfcl-5{ color:#FF812D!important; } /* Orange */
125
+ .wpfbg-5{ background-color:#FF812D!important; }
126
+ .wpfcl-6{ color:#0099CC!important; } /* Blue */
127
+ .wpfbg-6{ background-color:#0099CC!important; }
128
+ .wpfcl-7{ color:#E6E6E6!important; } /* Grey */
129
+ .wpfbg-7{ background-color:#E6E6E6!important; }
130
+ .wpfcl-8{ color:#4DCA5C!important; } /* Green */
131
+ .wpfbg-8{ background-color:#4DCA5C!important; }
132
+ .wpfcl-9{ color:#f5f5f5!important; } /* Grey */
133
+ .wpfbg-9{ background-color:#f5f5f5!important; }
134
+
135
+
136
+
137
+ /**************************/
138
+ /* Global *****************/
139
+ /**************************/
140
+
141
+ #wpf-admin-wrap{ margin-top:0px; }
142
+ #wpf-admin-wrap .wpf-delete{ color:#aa0000;}
143
+ #wpf-admin-wrap .wpf-delete:hover{ color:#ff0000;}
144
+ .wpforo-themes .wpf-delete{ color:#aa0000;}
145
+ .wpforo-themes .wpf-delete:hover{ color:#ff0000;}
146
+ #wpf-admin-wrap .show-settings { border:none; text-decoration:none; overflow:hidden; outline:none; }
147
+ #wpf-admin-wrap .wpforo-search-box{ display:block; margin:15px 0px 5px 0px; text-align:right; }
148
+ #wpf-admin-wrap .wpf-red{ color:#D74245; }
149
+ #wpf-admin-wrap .wpf-green{ color:#42B720; }
150
+
151
+ /**************************/
152
+ /* Forums *****************/
153
+ /**************************/
154
+ #wpf-admin-wrap .menu-item-bar > .forum_width{ background: #F6F6F6; border-left: 1px dotted #666666; border-right: 1px dotted #666666}
155
+ #wpf-admin-wrap .menu-item-depth-0 > .menu-item-bar > .forum_width .item-controls{ border-left: 1px dotted white; padding-left: 22px}
156
+ #wpf-admin-wrap .menu-item-bar > .forum_width .item-controls{ border-left: 1px dotted #666666; padding-left: 22px}
157
+ #wpf-admin-wrap .menu-item-depth-0 > .menu-item-bar > .forum_width{ background: #43A6DF; color: white}
158
+ #wpf-admin-wrap .menu-item-bar > .forum_width:hover{ border: 1px solid #666666}
159
+ #wpf-admin-wrap .menu-item-depth-0 > .menu-item-bar > .forum_width a{ color: white}
160
+ #wpf-admin-wrap .menu-item-bar > .forum_width .menu_edit a:hover{ color: rgb(175, 116, 7); background-color: #F6F6F6;}
161
+ #wpf-admin-wrap .menu-item-bar > .forum_width .menu_delete a:hover{ color: red; background-color: #F6F6F6;}
162
+ #wpf-admin-wrap .menu-item-bar > .forum_width .menu_view a:hover{ color: green; background-color: #F6F6F6;}
163
+ #wpf-admin-wrap .menu-item-bar > .forum_width .wpforo-cat-layout{ position: absolute; right: 192px; top: 10%}
164
+ #wpf-admin-wrap .inside .main .wpforo-dashboard-logo{ width:220px; height:auto;}
165
+ #wpf-admin-wrap .vert_tab{ display: block; margin: 1px 0px 0px 0px;}
166
+ #wpf-admin-wrap .nav-tab-wrapper.vert_tab{ display: inline-block; width: 17%; border: none; vertical-align: top; margin: 0 !important; padding: 0 !important; float: left; position:relative; z-index:9;}
167
+ #wpf-admin-wrap .nav-tab.vert_tab{ border-bottom: 1px solid #ccc}
168
+ #wpf-admin-wrap .nav-tab-wrapper.vert_tab > a:first-child{ margin-top: 0}
169
+ #wpf-admin-wrap .nav-tab-active.vert_tab{ border-bottom-color: #ccc !important; border-right-color: ghostwhite; background-color: ghostwhite !important}
170
+ #wpf-admin-wrap .plugins-tab-wrap{ width: 83%; min-height: 700px; border: 1px solid #cccccc; background: ghostwhite; display: inline-block; margin-left: -1px; padding: 5px 25px; box-sizing: border-box; float: left}
171
+ #wpf-admin-wrap .nav-tab-wrapper > a.nav-tab:last-child{ float: right}
172
+ #wpf-admin-wrap .nav-tab-wrapper > a.nav-tab.vert_tab{ float: none !important}
173
+ #wpf-admin-wrap .nav-tab-wrapper > a.nav-tab.vert_tab:last-child{ float: none !important}
174
+
175
+
176
+ /**************************/
177
+ /* SETTINGS ***************/
178
+ /**************************/
179
+
180
+ #wpf-admin-wrap .nav-tab{ padding: 7px 12px; }
181
+ #wpf-admin-wrap .nav-tab-active,
182
+ #wpf-admin-wrap .nav-tab-active:hover{ background-color:#FFFFFF; border-bottom-color:#FFFFFF; }
183
+ #wpf-admin-wrap .wpf-info-bar { background: none repeat scroll 0 0 #fff; border: 1px solid #e5e5e5; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05); font-size: 13px; line-height: 2.1em; margin:0px; overflow: auto; padding: 10px 15px 15px 15px; position: relative; border-top:none; }
184
+ #wpf-admin-wrap .major-publishing-actions{ margin-top:20px; }
185
+ #wpf-admin-wrap .wpf-label-big{ font-size:16px; display:table; margin-bottom:5px; }
186
+ #wpf-admin-wrap .wpf-field-small{ width:25% }
187
+ #wpf-admin-wrap .wpf-field-medium{ width:50% }
188
+ #wpf-admin-wrap .wpf-field-full{ width:100% }
189
+ #wpf-admin-wrap .wpf-info{ color:#777; font-size:13px; font-style:italic; font-weight:400; line-height:18px; margin:0px;}
190
+
191
+ .wpforo_settings_table{ width:100%; padding:0px; margin:2px; border-spacing: 0; border-collapse: collapse;}
192
+ .wpforo_settings_table th, .wpforo_settings_table td { padding:8px 10px; text-align:left; vertical-align:top; }
193
+ .wpforo_settings_table th{ font-weight:bold; font-size:14px; width:40%; }
194
+ .wpforo_settings_table tr:nth-child(odd) { background: #f5f5f5; }
195
+ .wpforo_settings_table tr:nth-child(even) { background: #FFFFFF; }
196
+ .wpforo_settings_table input[type="text"],
197
+ .wpforo_settings_table input[type="password"],
198
+ .wpforo_settings_table input[type="email"],
199
+ .wpforo_settings_table input[type="url"],
200
+ .wpforo_settings_table textarea{ padding:5px 10px; width:70%; }
201
+ .wpforo_settings_table select{ min-width:150px;}
202
+ .wpforo_settings_table input[type="number"]{ padding:1px 2px 1px 10px; width:30%; }
203
+ .wpforo_settings_foot{ clear:both; width:100%; text-align:right; padding:15px 0px 5px 0px; margin:0px 0px 0px 0px; border-top:#f8f8f8 solid 3px; }
204
+
205
+ .wpf-switch-field input { display: none;}
206
+ .wpf-switch-field label {float: left;}
207
+ .wpf-switch-field label {display: inline-block; line-height: 20px; width:80px; background-color: #e4e4e4;color:#333;font-size: 13px;font-weight: normal;text-align: center;text-shadow: none;padding: 2px 6px;border: 1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);-webkit-transition: all 0.1s ease-in-out;-moz-transition: all 0.1s ease-in-out;-ms-transition: all 0.1s ease-in-out;-o-transition: all 0.1s ease-in-out;transition: all 0.1s ease-in-out;}
208
+ .wpf-switch-field label:hover {cursor: pointer;}
209
+ .wpf-switch-field input:checked + label {background-color: #43A6DF; -webkit-box-shadow: none; box-shadow: none; color:#fff;} /* #66DD8D */
210
+ /* .wpf-switch-field input:last-of-type:checked + label {background-color:#F77059; -webkit-box-shadow: none; box-shadow: none;} */
211
+ .wpf-switch-field label:first-of-type {border-radius: 4px 0 0 4px;}
212
+ .wpf-switch-field label:last-of-type {border-radius: 0 4px 4px 0;}
213
+
214
+ /**************************/
215
+ /* SETTINGS > GENERAL *****/
216
+ /**************************/
217
+
218
+
219
+ /**************************/
220
+ /* SETTINGS > MEMBERS *****/
221
+ /**************************/
222
+
223
+ #wpf-rating-table{ width:100%; font-size:12px; }
224
+ #wpf-rating-table input{ font-size:12px; height: 24px; width:100%; }
225
+ #wpf-rating-table i{}
226
+ #wpf-rating-table h4{ margin:0px; padding:0px; font-size:14px; font-weight:bold; white-space:nowrap; }
227
+ #wpf-rating-table .wpf-badge-short{ color:#FFFFFF; white-space:nowrap; font-size:15px; line-height:22px; font-weight:bold; text-align:center; display:inline-block; padding:2px 10px; min-width:30px;}
228
+ #wpf-rating-table .wpf-badge-full{ color:#FFFFFF; white-space:nowrap; font-size:15px; line-height:16px; font-weight:bold; text-align:center; display:inline-block; padding:2px 8px; min-width:30px;}
229
+ #wpf-rating-table .wpf-badge-full.wpf-badge-level-6, #wpf-rating-table .wpf-badge-full.wpf-badge-level-7, #wpf-rating-table .wpf-badge-full.wpf-badge-level-8 { font-size:18px!important; }
230
+ #wpf-rating-table .wpf-badge-full.wpf-badge-level-9, #wpf-rating-table .wpf-badge-full.wpf-badge-level-10 { font-size:22px!important; }
231
+
232
+ #wpf-rating-table th{ text-transform:uppercase; font-size:12px;}
233
+ /**************************/
234
+ /* SETTINGS > STYLES ******/
235
+ /**************************/
236
+
237
+ .wpforo-style-color-wrapper{ width:150px; float:left; }
238
+ .wpforo-style-field{ display:block; float:left; width:100px; height:23px; margin-right:10px; text-align:center; font-size:14px; }
239
+ .wpforo-style-field input{ width:100%; border: none; padding: 0; cursor:pointer; }
240
+ .wpforo-style-color{ display:block; color:#333333; font-weight:bold; text-align:center; float:left; width:23px; padding:0px 5px; margin-right:5px; border:#CCCCCC 1px solid; text-align:center; }
241
+
242
+
243
+ /**************************/
244
+ /* THEMES *****************/
245
+ /**************************/
246
+
247
+ .wpforo-themes .wpf-div-table{ display:table!important; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); background:#FFFFFF; width:100%; padding:0px 10px 10px 10px; margin-top:30px; box-sizing:border-box;}
248
+ .wpforo-themes .wpf-div-tr{ display:table-row; }
249
+ .wpforo-themes .wpf-div-td{ display:table-cell; vertical-align:top; padding:15px 10px 10px 15px; }
250
+ .wpforo-themes .wpf-theme-screenshot{ width:250px; height:180px; border:3px solid #ddd; float:left; }
251
+ .wpforo-themes .wpf-theme-info{ margin-left:270px; min-height:185px; }
252
+ .wpforo-themes .wpf-theme-info p{ margin:1px;}
253
+ .wpforo-themes .wpf-layout-info p{ margin:1px;}
254
+ .wpforo-themes .wpf-layout-info a{ text-decoration:none; font-weight:normal; }
255
+ .wpforo-themes .wpf-theme-actions{ display:block; clear:both; margin-top:10px; text-align:right; box-sizing:border-box; padding:2px 20px; }
256
+ .wpforo-themes .wpf-theme-actions .wpf-action{ }
257
+
wpf-admin/dashboard.php ADDED
@@ -0,0 +1,188 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ global $wpforo ?>
5
+
6
+ <div id="wpf-admin-wrap" class="wrap">
7
+ <h1 style="padding:30px 0px 10px 0px;"><?php _e('wpForo Dashboard', 'wpforo'); ?></h1>
8
+ <?php $wpforo->notice->show(FALSE) ?>
9
+
10
+
11
+ <div id="dashboard-widgets-wrap" style="padding-top:10px;">
12
+ <div class="metabox-holder" id="dashboard-widgets">
13
+
14
+
15
+ <div class="postbox-container" id="postbox-container-0" style="width:100%;">
16
+ <div class="meta-box-sortables ui-sortable" id="normal-sortables" style="min-height:60px;">
17
+
18
+ <div class="postbox" id="wpforo_dashboard_widget_0">
19
+ <button aria-expanded="true" class="handlediv button-link" type="button">
20
+ <span class="screen-reader-text">&nbsp;</span>
21
+ <span class="toggle-indicator"></span>
22
+ </button>
23
+ <h2 class="hndle ui-sortable-handle"><span><?php _e('Welcome Message', 'wpforo'); ?></span></h2>
24
+ <div class="inside">
25
+ <div class="main" style="padding:5px 15px 15px 15px;">
26
+ <div style="float:left; vertical-align:top; width:calc(100% - 300px);;">
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>
28
+ <p style="margin:0px; font-size:14px;font-family:'Lucida Bright', 'DejaVu Serif', Georgia, serif"">
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
+ The "Extended", "Simplified" and "Question &amp Answer" layouts fit almost all type of discussions needs. You can use wpForo for small and extremely large communities.
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
+ 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
+ </div>
36
+ <div style="float:right; vertical-align:top; padding-right:20px; width:280px; text-align:right; padding-top:20px;">
37
+ <img class="wpforo-dashboard-logo" src="<?php echo WPFORO_URL ?>/wpf-assets/images/wpforo-logo.png"/>
38
+ <p style="font-size:11px; color:#B1B1B1; font-style:italic; text-align:right; line-height:14px; padding-top:15px; margin:0px;">
39
+ Thank you!<br> Sincerely yours,<br>
40
+ gVectors Team&nbsp;
41
+ </p>
42
+ </div>
43
+ <div style="clear:both;"></div>
44
+ </div>
45
+ </div>
46
+ </div><!-- widget / postbox -->
47
+
48
+ </div>
49
+ </div>
50
+
51
+ <?php if(current_user_can('administrator') || current_user_can('editor') || current_user_can('author') ): ?>
52
+ <div class="postbox-container" id="postbox-container-1">
53
+ <div class="meta-box-sortables ui-sortable" id="normal-sortables">
54
+
55
+ <div class="postbox" id="wpforo_dashboard_widget_1">
56
+ <button aria-expanded="true" class="handlediv button-link" type="button">
57
+ <span class="screen-reader-text">Toggle panel: General Information</span>
58
+ <span class="toggle-indicator"></span>
59
+ </button>
60
+ <h2 class="hndle ui-sortable-handle"><span><?php _e('General Information', 'wpforo'); ?></span></h2>
61
+ <div class="inside">
62
+ <div class="main">
63
+ <ul>
64
+ <li class="post-count"><strong><?php _e('You are currently running', 'wpforo'); ?> wpForo <?php echo esc_html($wpforo->version) ?></strong></li>
65
+ <li class="page-count"><?php _e('Active Theme', 'wpforo'); ?>: Classic</li>
66
+ <li class="page-count"><?php _e('wpForo Website', 'wpforo'); ?>: <a href="http://wpforo.com">wpForo.com</a></li>
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
+ </ul>
69
+ </div>
70
+ </div>
71
+ </div><!-- widget / postbox -->
72
+
73
+ <div class="postbox" id="wpforo_dashboard_widget_server">
74
+ <button aria-expanded="true" class="handlediv button-link" type="button">
75
+ <span class="screen-reader-text">Toggle panel: Server Information</span>
76
+ <span class="toggle-indicator"></span>
77
+ </button>
78
+ <h2 class="hndle ui-sortable-handle"><span><?php _e('Server Information', 'wpforo'); ?></span></h2>
79
+ <div class="inside">
80
+ <div class="main">
81
+ <table style="width:98%; margin:0px auto; text-align:left;">
82
+ <tr class="wpf-dw-tr">
83
+ <td class="wpf-dw-td">USER AGENT</td>
84
+ <td class="wpf-dw-td-value"><?php echo $_SERVER['HTTP_USER_AGENT'] ?></td>
85
+ </tr>
86
+ <tr class="wpf-dw-tr">
87
+ <td class="wpf-dw-td">Web Server / PHP</td>
88
+ <td class="wpf-dw-td-value"><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
89
+ </tr>
90
+ <tr class="wpf-dw-tr">
91
+ <td class="wpf-dw-td">MySQL Version</td>
92
+ <td class="wpf-dw-td-value"><?php echo $wpforo->db->db_version(); ?></td>
93
+ </tr>
94
+ <tr class="wpf-dw-tr">
95
+ <td class="wpf-dw-td">PHP Max Post Size</td>
96
+ <td class="wpf-dw-td-value"><?php echo ini_get('post_max_size'); ?></td>
97
+ </tr>
98
+ <tr class="wpf-dw-tr">
99
+ <td class="wpf-dw-td">PHP Max Upload Size</td>
100
+ <td class="wpf-dw-td-value"><?php echo ini_get('upload_max_filesize'); ?></td>
101
+ </tr>
102
+ <tr class="wpf-dw-tr">
103
+ <td class="wpf-dw-td">PHP Memory Limit</td>
104
+ <td class="wpf-dw-td-value"><?php echo ini_get('memory_limit'); ?></td>
105
+ </tr>
106
+ <tr class="wpf-dw-tr">
107
+ <td class="wpf-dw-td">PHP DateTime Class</td>
108
+ <td class="wpf-dw-td-value"><?php echo (class_exists('DateTime') && class_exists('DateTimeZone')) ? '<span class="wpf-green">' . __('Available', 'wpforo') . '</span>' : '<span class="wpf-red">' . __('Not available', 'wpforo') . '</span> | <a href="http://php.net/manual/en/datetime.installation.php" target="_blank">more info&raquo;</a>'; ?> </td>
109
+ </tr>
110
+ </table>
111
+ </div>
112
+ </div>
113
+ </div><!-- widget / postbox -->
114
+
115
+ </div><!-- normal-sortables -->
116
+ </div><!-- wpforo_postbox_container -->
117
+
118
+ <div class="postbox-container" id="postbox-container-2">
119
+ <div class="meta-box-sortables ui-sortable" id="normal-sortables">
120
+
121
+ <div class="postbox" id="wpforo_dashboard_widget_statistic">
122
+ <button aria-expanded="true" class="handlediv button-link" type="button">
123
+ <span class="screen-reader-text">Toggle panel: Board Statistic</span>
124
+ <span class="toggle-indicator"></span>
125
+ </button>
126
+ <h2 class="hndle ui-sortable-handle"><span><?php _e('Board Statistic', 'wpforo'); ?></span></h2>
127
+ <div class="inside">
128
+ <div class="main">
129
+ <table style="width:98%; margin:0px auto; text-align:left;">
130
+ <?php $statistic = $wpforo->get_statistic(); ?>
131
+ <tr class="wpf-dw-tr">
132
+ <td class="wpf-dw-td"><?php _e('Forums', 'wpforo'); ?></td>
133
+ <td class="wpf-dw-td-value"><?php echo intval($statistic['forums']) ?></td>
134
+ </tr>
135
+ <tr class="wpf-dw-tr">
136
+ <td class="wpf-dw-td"><?php _e('Topics', 'wpforo'); ?></td>
137
+ <td class="wpf-dw-td-value"><?php echo intval($statistic['topics']) ?></td>
138
+ </tr>
139
+ <tr class="wpf-dw-tr">
140
+ <td class="wpf-dw-td"><?php _e('Posts', 'wpforo'); ?></td>
141
+ <td class="wpf-dw-td-value"><?php echo intval($statistic['posts']) ?></td>
142
+ </tr>
143
+ <tr class="wpf-dw-tr">
144
+ <td class="wpf-dw-td"><?php _e('Members', 'wpforo'); ?></td>
145
+ <td class="wpf-dw-td-value"><?php echo intval($statistic['members']) ?></td>
146
+ </tr>
147
+ <tr class="wpf-dw-tr">
148
+ <td class="wpf-dw-td"><?php _e('Members Online', 'wpforo'); ?></td>
149
+ <td class="wpf-dw-td-value"><?php echo intval($statistic['online_members_count']) ?></td>
150
+ </tr>
151
+
152
+ <?php if( isset($statistic['attachments']) && $statistic['attachment_sizes'] ) : ?>
153
+
154
+ <tr class="wpf-dw-tr">
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>
157
+ </tr>
158
+ <tr class="wpf-dw-tr">
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>
161
+ </tr>
162
+
163
+ <?php endif ?>
164
+
165
+ </table>
166
+ </div>
167
+ </div>
168
+ </div><!-- widget / postbox -->
169
+
170
+ </div><!-- normal-sortables -->
171
+ </div><!-- wpforo_postbox_container -->
172
+ <?php endif; ?>
173
+
174
+ <div class="postbox-container" id="postbox-container-3">
175
+ <div class="meta-box-sortables ui-sortable" id="normal-sortables">
176
+
177
+
178
+
179
+ </div><!-- normal-sortables -->
180
+ </div><!-- wpforo_postbox_container -->
181
+
182
+
183
+
184
+ </div><!-- dashboard-widgets -->
185
+ </div><!-- dashboard-widgets-wrap -->
186
+
187
+ </div><!-- wpwrap -->
188
+
wpf-admin/forum.php ADDED
@@ -0,0 +1,295 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+ <!-- Screen Options -->
8
+ <?php if( isset($_GET['action']) && $_GET['action'] == 'add' || isset($_GET['action']) && $_GET['action'] == 'edit') : ?>
9
+
10
+ <div id="screen-meta" class="metabox-prefs" style="display: none; ">
11
+ <div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="Screen Options Tab" style="display: none; ">
12
+ <form id="adv-settings" action="" method="post">
13
+ <h5><?php _e('Show on screen', 'wpforo'); ?></h5>
14
+ <div class="metabox-prefs">
15
+ <label for="forum_cat-hide"><input class="hide-postbox-tog" name="forum_cat-hide" type="checkbox" id="forum_cat-hide" value="forum_cat" checked="checked"><?php _e('Forum Options', 'wpforo'); ?></label>
16
+ <label for="forum_permissions-hide"><input class="hide-postbox-tog" name="forum_permissions-hide" type="checkbox" id="forum_permissions-hide" value="forum_permissions" checked="checked"><?php _e('Permissions', 'wpforo'); ?></label>
17
+ <label for="forum_slug-hide"><input class="hide-postbox-tog" name="forum_slug-hide" type="checkbox" id="forum_slug-hide" value="forum_slug"><?php _e('Slug', 'wpforo'); ?></label>
18
+ <label for="forum_meta-hide"><input class="hide-postbox-tog" name="forum_meta-hide" type="checkbox" id="forum_meta-hide" value="forum_meta" checked="checked"><?php _e('Forum Meta', 'wpforo'); ?></label>
19
+ <br class="clear">
20
+ </div>
21
+ <h5 class="screen-layout"><?php _e('Screen Layout', 'wpforo'); ?></h5>
22
+ <div class="columns-prefs"><?php _e('Number of Columns', 'wpforo'); ?>:
23
+ <label class="columns-prefs-1"><input type="radio" name="screen_columns" value="1">1</label>
24
+ <label class="columns-prefs-2"><input type="radio" name="screen_columns" value="2" checked="checked">2</label>
25
+ </div>
26
+ </form>
27
+ </div>
28
+ </div>
29
+
30
+ <div id="screen-meta-links">
31
+ <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle" style="">
32
+ <button aria-expanded="true" aria-controls="screen-options-wrap" class="button show-settings screen-meta-active" id="show-settings-link" type="button"><?php _e('Screen Options', 'wpforo'); ?></button>
33
+ </div>
34
+ </div>
35
+
36
+ <?php endif; ?>
37
+ <!-- end Screen Options -->
38
+
39
+ <div id="icon-edit" class="icon32 icon32-posts-post"></div>
40
+ <div id="wpf-admin-wrap" class="wrap">
41
+
42
+ <h2 style="padding:30px 0px 10px 0px;line-height: 20px;">
43
+ <?php _e('Categories and Forums', 'wpforo'); ?> &nbsp;
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
+ </h2>
46
+
47
+ <?php $wpforo->notice->show(FALSE) ?>
48
+
49
+ <!-- Forum Hierarchy -->
50
+ <?php if( !isset($_GET['action'])) : ?>
51
+ <?php if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'ef')): ?>
52
+
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>
56
+ </div>
57
+
58
+ <form id="forum-hierarchy" encType="multipart/form-data" method="post" action="">
59
+ <?php wp_nonce_field( 'wpforo-forums-hierarchy' ); ?>
60
+ <input type="hidden" name="forums_hierarchy_submit"/>
61
+ <div id="post-body">
62
+ <ul id="menu-to-edit" class="menu">
63
+
64
+ <?php $wpforo->forum->tree('drag_menu'); ?>
65
+
66
+ </ul>
67
+ </div><br />
68
+ <div class="major-publishing-actions">
69
+ <div class="publishing-action"><input id="save_menu_footer" class="button button-primary menu-save" name="save_menu" value="<?php _e('Save forums order and hierarchy', 'wpforo'); ?>" onclick="get_forums_hierarchy()" type="button"></div>
70
+ </div>
71
+ </form>
72
+ <script>
73
+ var menus = false;
74
+ navMenuL10n.saveAlert = null;
75
+ window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}}
76
+ </script>
77
+ <?php endif; ?><!--checking edit forum permission-->
78
+ <?php endif; ?>
79
+ <!-- end Forum Hierarchy -->
80
+
81
+ <!-- Forum Add || Edit -->
82
+ <?php if( ( isset($_GET['action']) && $_GET['action'] == 'add' ) || ( isset($_GET['action']) && $_GET['action'] == 'edit' ) ) : ?>
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']) );?>
85
+ <div id="poststuff">
86
+ <form name="forum" action="" method="post">
87
+ <?php wp_nonce_field( 'wpforo-forum-addedit' ); ?>
88
+ <div id="post-body" class="metabox-holder columns-2">
89
+ <div id="post-body-content">
90
+ <input type="hidden" name="wpforo_submit" value="1"/>
91
+ <input type="hidden" name="forum[order]" value="<?php echo esc_attr(isset($data['order']) ? $data['order'] : '') ?>"/>
92
+ <div class="form-wrap">
93
+ <div class="form-field form-required" style="margin-bottom:0px; padding-bottom:0px;">
94
+ <div id="titlediv">
95
+ <div id="titlewrap">
96
+ <input id="title" name="forum[title]" type="text" value="<?php echo esc_attr(isset($data['title']) ? $data['title'] : '') ?>" size="40" autocomplete="off" required="TRUE" placeholder="<?php _e('Enter forum title here', 'wpforo'); ?>" />
97
+ </div>
98
+ </div>
99
+ <p>&nbsp;</p>
100
+ <div class="form-field">
101
+ <textarea placeholder="<?php _e('Enter description here . . .', 'wpforo'); ?>" name="forum[description]" rows="5" cols="40" style="padding:10px;"><?php echo esc_textarea(isset($data['description']) ? $data['description'] : '') ?></textarea>
102
+ <p><?php _e('This is a forum description. This content will be displayed under forum title on the forum list.', 'wpforo'); ?></p>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ <div id="postbox-container-1" class="postbox-container">
109
+ <div id="side-sortables" class="meta-box-sortables ui-sortable">
110
+
111
+
112
+ <div id="forum_cat" class="postbox" style="display: block; ">
113
+ <div class="handlediv" title="Click to toggle"><br></div>
114
+ <h3 class="hndle"><span><?php _e('Forum Options', 'wpforo'); ?></span></h3>
115
+ <div class="inside">
116
+ <div class="form-field">
117
+ <p><strong><?php _e('Parent Forum', 'wpforo'); ?></strong></p>
118
+ <p>
119
+ <select id="parent" name="forum[parentid]" class="postform" <?php echo (isset($data['is_cat']) && $data['is_cat'] == 1 ? 'disabled' : '') ?>>
120
+ <option value="0"><?php _e('No parent', 'wpforo'); ?></option>
121
+ <?php $wpforo->forum->tree('select_box'); ?>
122
+ </select>
123
+ </p>
124
+ <p class="form-field">
125
+ <label for="use_us_cat"><?php _e('Use as Category', 'wpforo'); ?> &nbsp;<input id="use_us_cat" onclick="document.getElementById('parent').disabled = this.checked; document.getElementById('cat_layout').disabled = !this.checked;" type="checkbox" name="forum[is_cat]" value="1" <?php echo (isset($data['is_cat']) && $data['is_cat'] == 1 ? 'checked' : '') ?>/> </label>
126
+ </p>
127
+ <p><strong><?php _e('Category Layout', 'wpforo'); ?></strong></p>
128
+ <p>
129
+ <?php $layouts = $wpforo->tpl->find_layouts( WPFORO_THEME ); ?>
130
+ <?php if(!empty($layouts)): ?>
131
+ <select id="cat_layout" name="forum[cat_layout]" class="postform" <?php $data['cat_layout'] = ( isset($data['cat_layout']) ? $data['cat_layout'] : 1 ); echo ( isset($data['is_cat']) && $data['is_cat'] == 1 ? '' : 'disabled="TRUE"' ); ?> >
132
+ <?php foreach( $layouts as $layout ): ?>
133
+ <option value="<?php echo esc_attr(trim($layout['id'])) ?>" <?php echo ( $data['cat_layout'] == $layout['id'] ? 'selected' : '' ); ?> ><?php echo esc_html($layout['name']) ?></option>
134
+ <?php endforeach; ?>
135
+ </select>
136
+ <?php else: ?>
137
+ <p><?php _e('No layout found.', 'wpforo'); ?></p>
138
+ <?php endif; ?>
139
+ </p>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+ <div id="submitdiv" class="postbox" style="display: block; ">
145
+ <div class="handlediv" title="Click to toggle"><br></div>
146
+ <h3 class="hndle"><span><?php _e('Publish', 'wpforo'); ?></span></h3>
147
+ <div class="inside">
148
+ <div id="major-publishing-actions" style="text-align:right;">
149
+ <?php if( $_GET['action'] == 'edit' ) : ?>
150
+ <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> &nbsp;
151
+ <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> &nbsp;
152
+ <?php endif; ?>
153
+ <input type="submit" name="forum[save_edit]" class="button button-primary forum_submit" style="display:inline-block;float:none;" value="<?php _e('Publish', 'wpforo'); ?>">
154
+ <div class="clear"></div>
155
+ </div>
156
+ </div>
157
+ </div>
158
+
159
+
160
+ <div id="forum_permissions" class="postbox" style="display: block; ">
161
+ <div class="handlediv" title="Click to toggle"><br></div>
162
+ <h3 class="hndle"><span>Forum Permissions</span></h3>
163
+ <div class="inside">
164
+ <table>
165
+ <?php $wpforo->forum->permissions(); ?>
166
+ </table>
167
+ </div>
168
+ </div>
169
+
170
+ <?php if( get_option('wpforo_integrate_s2member') == 1 && false ) : ?>
171
+
172
+ <?php
173
+
174
+ if(isset( $_GET['id'] )){
175
+ $srlz = get_option( 'wpforo_s2member_items_levels' );
176
+ $s2member_items_levels = unserialize( $srlz );
177
+
178
+ for( $i = 0; $i < 5; $i++ ){
179
+ $f_ids = explode(',', $s2member_items_levels['level'.$i.'_forums']);
180
+ if(in_array( $_GET['id'], $f_ids)){
181
+ $lvl = $i;
182
+ break;
183
+ }
184
+ unset($f_ids);
185
+ }
186
+ }else{
187
+ $lvl = -1;
188
+ }
189
+
190
+ ?>
191
+
192
+ <div id="ws-plugin--s2member-security" class="postbox " style="display: block; ">
193
+ <div class="handlediv" title="Click to toggle"><br></div>
194
+ <h3 class="hndle"><span>s2MemberĀ®</span></h3>
195
+ <div class="inside">
196
+
197
+ <p style="margin-left:2px;"><strong>Forum Level Restriction?</strong></p>
198
+ <label class="screen-reader-text" for="ws-plugin--s2member-security-meta-box-level">Add Level Restriction?</label>
199
+ <select name="forum[s2member_level]" id="ws-plugin--s2member-security-meta-box-level" style="width:99%;">
200
+ <option value=""></option>
201
+ <option value="0" <?php echo ( $lvl != null && $lvl == 0 ? 'selected' : '' ); ?> >Require Level #0 (or higher)</option>
202
+ <option value="1" <?php echo ( $lvl != null && $lvl == 1 ? 'selected' : '' ); ?> >Require Level #1 (or higher)</option>
203
+ <option value="2" <?php echo ( $lvl != null && $lvl == 2 ? 'selected' : '' ); ?> >Require Level #2 (or higher)</option>
204
+ <option value="3" <?php echo ( $lvl != null && $lvl == 3 ? 'selected' : '' ); ?> >Require Level #3 (or higher)</option>
205
+ <option value="4" <?php echo ( $lvl != null && $lvl == 4 ? 'selected' : '' ); ?> >Require Highest Level #4</option>
206
+ </select><br>
207
+
208
+ </div>
209
+ </div>
210
+
211
+ <?php endif; ?>
212
+
213
+ </div>
214
+ </div>
215
+
216
+ <div id="postbox-container-2" class="postbox-container">
217
+ <div id="normal-sortables" class="meta-box-sortables ui-sortable">
218
+
219
+ <div id="forum_slug" class="postbox hide-if-js" style="display: none; ">
220
+ <div class="handlediv" title="Click to toggle"><br></div>
221
+ <h3 class="hndle"><span><?php _e('Forum Slug', 'wpforo'); ?></span></h3>
222
+ <div class="inside">
223
+ <input name="forum[slug]" type="text" value="<?php echo esc_attr(isset($data['slug']) ? $data['slug'] : '') ?>" size="40" />
224
+ <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 />
225
+ </div>
226
+ </div>
227
+
228
+ <div id="forum_meta" class="postbox hide-if-js" style="display: block; ">
229
+ <div class="handlediv" title="Click to toggle"><br></div>
230
+ <h3 class="hndle"><span><?php _e('Forum SEO', 'wpforo'); ?></span></h3>
231
+ <div class="inside" style="padding-top:10px;">
232
+ <div class="form-field">
233
+ <label for="tag-description" style="display:block; padding-bottom:5px;"><?php _e('Meta Description', 'wpforo'); ?>:</label>
234
+ <textarea name="forum[meta_desc]" rows="3" cols="40"><?php echo esc_html(isset($data['meta_desc']) ? $data['meta_desc'] : '') ?></textarea>
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+ </div>
240
+ <div id="advanced-sortables" class="meta-box-sortables ui-sortable"></div>
241
+ </div>
242
+
243
+ </div>
244
+ </form>
245
+ </div>
246
+ <?php endif; ?><!-- chekcing creat forum permission-->
247
+ <?php endif; ?>
248
+ <!-- end Forum Add || Edit -->
249
+
250
+ <!-- Forum Delete -->
251
+ <?php if( isset($_GET['action']) && $_GET['action'] == 'del') : ?>
252
+
253
+ <form action="" method="post">
254
+ <?php wp_nonce_field( 'wpforo-forum-delete' ); ?>
255
+ <input type="hidden" name="wpforo_delete" value="1"/>
256
+ <div class="form-wrap">
257
+ <div class="form-field form-required">
258
+ <div class="form-field wpf-info-bar" style="padding:25px 20px 15px 20px; margin-top:20px;">
259
+ <table class="wpforo_settings_table">
260
+ <tr>
261
+ <td style="width:50%;">
262
+ <label for="delete_forum" class="menu_delete" style="color: red; font-size:13px; line-height:18px;"><?php _e('This action will also delete all sub-forums, topics and replies.', 'wpforo'); ?></label>
263
+ </td>
264
+ <td width="20px">
265
+ <input id="delete_forum" type="radio" name="forum[delete]" value="1" checked="" onchange="mode_changer('false');"/>
266
+ </td>
267
+ </tr>
268
+ <tr>
269
+ <td>
270
+ <label for="marge" style="font-size:13px; line-height:18px;"><?php _e('If you want to delete this forum and keep its sub-forums, topics and replies, please select a new target forum in dropdown below', 'wpforo'); ?></label>
271
+ </td>
272
+ <td><input id="marge" type="radio" name="forum[delete]" value="0" onchange="mode_changer('true');"/> </td>
273
+ </tr>
274
+ <tr>
275
+ <td colspan="2">
276
+ <select id="forum_select" name="forum[mergeid]" class="postform" disabled="" >
277
+ <?php $wpforo->forum->tree('select_box'); ?>
278
+ </select>
279
+ <p><?php _e('All sub-forums, topics and replies will be attached to selected forum. Layout will be inherited from this forum.', 'wpforo'); ?></p>
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <td colspan="2">
284
+ <input id="forum_submit" type="submit" name="forum[submit]" class="button button-primary" value="Delete" />
285
+ </td>
286
+ </tr>
287
+ </table>
288
+ </div>
289
+ </div>
290
+ </div>
291
+ </form>
292
+ <?php endif; ?>
293
+ <!-- end Forum Delete -->
294
+
295
+ </div><!-- wpwrap -->
wpf-admin/js/admin_notice.js ADDED
@@ -0,0 +1,15 @@
1
+ jQuery(document).ready(function($){
2
+ $(document).on('click','.wpfadmin_notice', function(){
3
+ phrase = $(this).attr('id');
4
+ $.ajax({
5
+ type: 'POST',
6
+ url: wpf_admin_notice_obj.url,
7
+ data: {
8
+ phrase: phrase,
9
+ action: 'wpf_admin_notice_ajax'
10
+ }
11
+ }).done(function( response ){
12
+ $('#' + response).slideUp( 400 );
13
+ });
14
+ });
15
+ });
wpf-admin/js/functions.js ADDED
@@ -0,0 +1,100 @@
1
+ function get_parentid(arr, depth)
2
+ {
3
+ for(var i=arr.length-1; i>=0; i--)
4
+ {
5
+ if (arr[i]['depth'] == depth) return arr[i]['forumid'];
6
+ }
7
+ }
8
+
9
+ function get_forums_hierarchy()
10
+ {
11
+
12
+ var ul_content = document.getElementById('menu-to-edit');
13
+ var lis = ul_content.getElementsByTagName('LI');
14
+
15
+ var forums_hierarchy_arr = new Array();
16
+
17
+ for(var i = 0; i < lis.length; i++)
18
+ {
19
+ forums_hierarchy_arr[i] = new Array();
20
+ forums_hierarchy_arr[i]['forumid'] = lis[i].id.replace('menu-item-', '');
21
+ var depth = lis[i].getAttribute('class').replace('menu-item menu-item-depth-', '');
22
+
23
+ forums_hierarchy_arr[i]['depth'] = depth;
24
+
25
+ if(depth == 0)
26
+ {
27
+ forums_hierarchy_arr[i]['parentid'] = 0;
28
+ }else
29
+ {
30
+ var previous_depth = depth - 1;
31
+ forums_hierarchy_arr[i]['parentid'] = get_parentid(forums_hierarchy_arr, previous_depth);
32
+ }
33
+
34
+ forums_hierarchy_arr[i]['order'] = i + 1;
35
+
36
+ var h_id = 'forumid-' + forums_hierarchy_arr[i]['forumid'];
37
+ var h_parentid = 'parentid-' + forums_hierarchy_arr[i]['forumid'];
38
+ var h_order = 'order-' + forums_hierarchy_arr[i]['forumid'];
39
+
40
+ document.getElementById(h_id).value = forums_hierarchy_arr[i]['forumid'];
41
+ document.getElementById(h_parentid).value = forums_hierarchy_arr[i]['parentid'];
42
+ document.getElementById(h_order).value = forums_hierarchy_arr[i]['order'];
43
+
44
+ }
45
+
46
+ document.getElementById("forum-hierarchy").submit();
47
+
48
+ }
49
+
50
+ function mode_changer(v){
51
+
52
+ if(v=='true'){
53
+ document.getElementById("forum_submit").value= wpforo_admin.phrases.move;
54
+ document.getElementById("forum_select").disabled=false
55
+ }else{
56
+ document.getElementById("forum_submit").value= wpforo_admin.phrases.delete;
57
+ document.getElementById("forum_select").disabled=true
58
+ }
59
+ }
60
+ function select_all(){
61
+
62
+ var sel_all = document.getElementById('cb-select-all-1');
63
+
64
+ if(sel_all.checked){
65
+ var table = document.getElementById('the-list');
66
+ var list=table.getElementsByTagName("INPUT");
67
+
68
+ for (var i=0; i<list.length; i++){
69
+ document.getElementById(list[i].id).checked=true
70
+ }
71
+ }else{
72
+ var table = document.getElementById('the-list');
73
+ var list=table.getElementsByTagName("INPUT");
74
+
75
+ for (var i=0; i<list.length; i++){
76
+ document.getElementById(list[i].id).checked=false
77
+ }
78
+ }
79
+ }
80
+ function costum_or_inherit(){
81
+
82
+ var chack = document.getElementById('custom');
83
+
84
+ if(chack.checked){
85
+ document.getElementById("permis").disabled=true;
86
+ }else{
87
+ document.getElementById("permis").disabled=false;
88
+ }
89
+ }
90
+
91
+ function mode_changer_ug(v){
92
+
93
+ if(v=='true'){
94
+ document.getElementById("ug_select").disabled=false
95
+ }else{
96
+ document.getElementById("ug_select").disabled=true
97
+ }
98
+ }
99
+
100
+
wpf-admin/member.php ADDED
@@ -0,0 +1,43 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+ <div id="wpf-admin-wrap" class="wrap">
8
+ <?php wpforo_screen_option() ?>
9
+ <div id="icon-users" class="icon32"><br></div>
10
+ <h2 style="padding:30px 0px 0px 0px;line-height: 20px;"><?php _e('Members', 'wpforo'); ?></h2>
11
+ <?php $wpforo->notice->show(FALSE) ?>
12
+ <?php if(!isset( $_GET['action'] ) || ( isset( $_GET['action']) && $_GET['action'] == -1 ) ) : ?>
13
+ <?php
14
+ $fields[] = 'display_name';
15
+ $search_fields[] = 'title';
16
+ $search_fields[] = 'display_name';
17
+ $filter_fields = array();
18
+ if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmu')){
19
+ $fields[] = 'user_login';
20
+ $search_fields[] = 'user_login';
21
+ }
22
+ if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmm')){
23
+ $fields[] = 'user_email';
24
+ $search_fields[] = 'user_email';
25
+ }
26
+ if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmg')){
27
+ $fields[] = 'groupid';
28
+ $filter_fields[] = 'groupid';
29
+ }
30
+ if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmr')){
31
+ $fields[] = 'rank';
32
+ }
33
+ if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vms')){
34
+ $search_fields[] = 'signature';
35
+ }
36
+ $actions = array('button');
37
+ if( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'em') ) $actions = array('edit_user', 'edit_profile');
38
+ if( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'dm') ) $actions[] = 'delete';
39
+ wpforo_create_form_table('member', 'userid', $fields, $search_fields, $filter_fields, $actions);
40
+ ?>
41
+ <?php endif; ?>
42
+ </div>
43
+
wpf-admin/options-tabs/accesses.php ADDED
@@ -0,0 +1,66 @@
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($_GET['action']) ): ?>
8
+ <?php $accesses = $wpforo->perm->get_accesses() ?>
9
+ <h2 style="margin-top:0px; margin-bottom:20px;"><a href="?page=wpforo-settings&tab=accesses&action=add" class="add-new-h2"><?php _e('Add New Forum Access', 'wpforo'); ?></a></h2>
10
+ <table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0">
11
+ <thead>
12
+ <tr>
13
+ <th scope="col" id="title" class="manage-column column-title sorted desc" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e('Access names', 'wpforo'); ?></span></th>
14
+ </tr>
15
+ </thead>
16
+ <tbody id="the-list">
17
+ <?php foreach($accesses as $key => $access) : ?>
18
+ <?php $bgcolor = ( $key % 2 ) ? '#FFFFFF' : '#FCFCFC' ; ?>
19
+ <tr id="post-2" class="post-1 type-post status-publish format-standard hentry category-uncategorized alternate iedit author-self" valign="top">
20
+ <td class="post-title page-title column-title" style="border-bottom:1px dotted #CCCCCC; padding-left:20px; background:<?php echo esc_attr($bgcolor) ?>;">
21
+ <strong class="row-title">
22
+ <a href="?page=wpforo-settings&tab=accesses&action=edit&access=<?php echo esc_attr($access['access']) ?>" title="<?php echo esc_attr($access['title']) ?>">
23
+ <?php echo esc_html($access['title']) ?>
24
+ </a>
25
+ </strong>
26
+ <div class="row-actions">
27
+ <span class="edit"><a href="?page=wpforo-settings&tab=accesses&action=edit&access=<?php echo esc_attr($access['access']) ?>"><?php _e('edit', 'wpforo'); ?></a> |</span>
28
+ <span class="trash"><a class="submitdelete" href="<?php echo wp_nonce_url( '?page=wpforo-settings&tab=accesses&action=del&accessid=' . esc_attr($access['accessid']) , 'wpforo_access_delete' ) ?>" onclick = "if (! confirm('<?php _e('Are you sure you want to remove this access set? Usergroups which attached to this access will lost all forum permissions.'); ?>')) { return false; }" ><?php _e('delete', 'wpforo'); ?></a></span>
29
+ </div>
30
+ </td>
31
+ </tr>
32
+ <?php endforeach ?>
33
+ </tbody>
34
+ </table>
35
+ <?php elseif( isset($_GET['action']) && ( $_GET['action'] == 'edit' || $_GET['action'] == 'add' ) ) : ?>
36
+ <div class="form-wrap">
37
+ <div class="form-wrap">
38
+ <form id="add_access" action="" method="post">
39
+ <?php wp_nonce_field( 'wpforo-access-addedit' ); ?>
40
+ <input type="hidden" name="access[action]" value="<?php echo ( $_GET['action'] == 'add' ? 'add' : 'edit' ) ?>" />
41
+ <input type="hidden" name="access[key]" value="<?php echo ( isset($_GET['access']) ? esc_attr(sanitize_text_field($_GET['access'])) : '' ) ?>" />
42
+ <label class="wpf-label-big"><?php _e('Access name', 'wpforo'); ?></label>
43
+ <?php if( isset( $_GET['access'] ) ){ $access = $wpforo->perm->get_access( $_GET['access'] );} ?>
44
+ <input name="access[name]" type="text" size="40" required="TRUE" value="<?php echo ( $_GET['action'] == 'edit' ? esc_attr($access['title']) : '') ?>" style="background:#FDFDFD; width:30%; min-width:320px;">
45
+ <p>&nbsp;</p>
46
+
47
+ <?php
48
+ $access_key = ( isset( $_GET['access'] ) ? $_GET['access'] : 0 );
49
+ $cans = $wpforo->perm->forum_cans_form( $access_key ); ?>
50
+ <?php $n = 0; foreach( $cans as $can => $data ): ?>
51
+ <?php if( $n%4 == 0 ): ?>
52
+ </table>
53
+ <table class="wpf-table-box-left" style="margin-right:15px; margin-bottom:15px; min-width:320px;">
54
+ <?php endif; ?>
55
+ <tr>
56
+ <th class="wpf-dw-td-nowrap"><label class="wpf-td-label" for="wpf-can-<?php echo esc_attr($can) ?>"><?php echo esc_html($data['name']) ?></label></th>
57
+ <td class="wpf-dw-td-value" style="text-align:center;"><input id="wpf-can-<?php echo esc_attr($can) ?>" type="checkbox" name="cans[<?php echo esc_attr($can) ?>]" value="1" <?php echo ( $data['value'] ) ? 'checked="checked"' : ''; ?>></td>
58
+ </tr>
59
+ <?php $n++; endforeach ?>
60
+ </table>
61
+ <div class="clear"></div>
62
+ <input type="submit" class="button button-primary forum_submit" value="<?php echo ( $_GET['action'] == 'add' ? __('Save', 'wpforo') : __('Update', 'wpforo') ) ?>">
63
+ </form>
64
+ </div>
65
+ </div>
66
+ <?php endif ?>
wpf-admin/options-tabs/features.php ADDED
@@ -0,0 +1,59 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+ <?php
8
+ $options = array(
9
+ 'user-admin-bar' => array( 'label' => __('Show Admin Bar for Members', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('This option doesn\'t affect website admins.', 'wpforo') ),
10
+ 'page-title' => array( 'label' => __('Show Forum Page Title', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1 ),
11
+ 'top-bar' => array( 'label' => __('Show Top/Menu Bar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
12
+ 'top-bar-search' => array( 'label' => __('Show Top Search', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
13
+ 'breadcrumb' => array( 'label' => __('Show Breadcrumb', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
14
+ 'footer-stat' => array( 'label' => __('Show Forum Statistic', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
15
+ 'author-link' => array( 'label' => __('Replace Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
16
+ 'comment-author-link' => array( 'label' => __('Replace Comment Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
17
+ 'register-url' => array( 'label' => __('Replace Registration Page URL to Forum URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1 ),
18
+ 'login-url' => array( 'label' => __('Replace Login Page URL to Forum URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
19
+ 'replace-avatar' => array( 'label' => __('Replace Author Avatar with Forum Profile Avatar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
20
+ 'avatars' => array( 'label' => __('Enable Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
21
+ 'custom-avatars' => array( 'label' => __('Enable Custom Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
22
+ 'signature' => array( 'label' => __('Allow Member Signature', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
23
+ 'rating' => array( 'label' => __('Enable Member Rating', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
24
+ 'rating_title' => array( 'label' => __('Enable Member Rating Titles', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
25
+ 'member_cashe' => array( 'label' => __('Enable Member Cashe', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
26
+ 'seo-title' => array( 'label' => __('Enable wpForo SEO for Meta Titles', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
27
+ 'seo-meta' => array( 'label' => __('Enable wpForo SEO for Meta Tags', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
28
+ 'font-awesome' => array( 'label' => __('Enable wpForo Font-Awesome Lib', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
29
+ 'copyright' => array( 'label' => __('Help wpForo to grow, show plugin info', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Please enable this option to help wpForo get more popularity as your thank to the hard work we do for you totally free. This option adds a very small icon in forum footer, which will allow your site visitors recognize the name of forum solution you use.', 'wpforo')),
30
+ );
31
+
32
+ ?>
33
+ <form action="" method="POST" class="validate">
34
+ <?php wp_nonce_field( 'wpforo-features' ); ?>
35
+ <table class="wpforo_settings_table">
36
+ <tbody>
37
+ <?php foreach($options as $key => $option): ?>
38
+ <?php if( !isset($wpforo->features[$key]) ){ $wpforo->features[$key] = ''; } ?>
39
+ <tr>
40
+ <th>
41
+ <label><?php echo esc_html($option['label']); ?></label>
42
+ <p class="wpf-info"><?php if(isset($option['description'])) echo esc_html($option['description']); ?></p>
43
+ </th>
44
+ <td>
45
+ <div class="wpf-switch-field">
46
+ <input type="radio" value="1" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_1" <?php wpfo_check($wpforo->features[$key], 1); ?>><label for="wpf_<?php echo esc_attr($key); ?>_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
47
+ <input type="radio" value="0" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_0" <?php wpfo_check($wpforo->features[$key], 0); ?>><label for="wpf_<?php echo esc_attr($key); ?>_0"><?php _e('No', 'wpforo'); ?></label>
48
+ <?php if($key == 'copyright') echo '<span style="color:#009900; font-weight:400; font-size:14px;">&nbsp;Thank you!</span>'; ?>
49
+ </div>
50
+ </td>
51
+ </tr>
52
+ <?php endforeach; ?>
53
+ <?php do_action( 'wpforo_settings_theme', $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>
wpf-admin/options-tabs/forums.php ADDED
@@ -0,0 +1,18 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+
8
+ <form action="" method="POST" class="validate">
9
+ <?php wp_nonce_field( 'wpforo-settings-forums' ); ?>
10
+ <table class="wpforo_settings_table">
11
+ <tbody>
12
+ <?php do_action( 'wpforo_settings_forums', $wpforo ); ?>
13
+ </tbody>
14
+ </table>
15
+ <div class="wpforo_settings_foot">
16
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
17
+ </div>
18
+ </form>
wpf-admin/options-tabs/general.php ADDED
@@ -0,0 +1,73 @@
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( $_GET['action'] ) ): ?>
8
+
9
+ <form action="" method="POST" class="validate">
10
+ <?php wp_nonce_field( 'wpforo-settings-general' ); ?>
11
+ <table class="wpforo_settings_table">
12
+ <tbody>
13
+ <tr>
14
+ <th><label for="forum_title"><?php _e('Forum Title', 'wpforo'); ?></label></th>
15
+ <td><input id="forum_title" type="text" name="wpforo_general_options[title]" value="<?php if(isset($wpforo->general_options['title'])) wpfo( $wpforo->general_options['title'] ); ?>" required></td>
16
+ </tr>
17
+ <tr>
18
+ <th><label for="forum_description"><?php _e('Forum Description', 'wpforo'); ?></label></th>
19
+ <td><input id="forum_description" type="text" name="wpforo_general_options[description]" value="<?php if(isset($wpforo->general_options['description'])) wpfo( $wpforo->general_options['description'] ); ?>" required></td>
20
+ </tr>
21
+ <tr>
22
+ <th><label for="wpforourl"><?php _e('Forum Base URL', 'wpforo'); ?></label></th>
23
+ <td><input id="wpforourl" type="text" name="wpforo_url" value="<?php echo urldecode( WPFORO_BASE_URL ) ?>"/></td>
24
+ </tr>
25
+ <tr>
26
+ <th>
27
+ <label><?php _e('Dashboard Menu Position', 'wpforo'); ?></label>
28
+ <p class="wpf-info"><?php _e('The position in the menu order wpForo should appear.', 'wpforo'); ?></p>
29
+ <p class="wpf-info" style="font-size:11px; line-height:14px;"><?php _e('Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - below Pages, 25 - below comments, 60 - below first separator, 65 - below Plugins, 70 - below Users, 75 - below Tools, 80 - below Settings, 100 - below second separator', 'wpforo'); ?></p>
30
+ </th>
31
+ <td>
32
+ <input type="number" name="wpforo_general_options[menu_position]" value="<?php if(!isset($wpforo->general_options['menu_position'])) $wpforo->general_options['menu_position'] = 23; wpfo($wpforo->general_options['menu_position']); ?>"/>&nbsp;
33
+ <a href="https://developer.wordpress.org/reference/functions/add_menu_page/" target="_blank" style="text-decoration:none;">More info &raquo;</a>
34
+ </td>
35
+ </tr>
36
+ <tr>
37
+ <th><label for="langid"><?php _e('Forum Language', 'wpforo'); ?></label></th>
38
+ <td>
39
+ <select id="langid" name="wpforo_general_options[lang]" style="float:left;">
40
+ <?php $wpforo->phrase->show_lang_list() ?>
41
+ </select>
42
+ <h2 style="margin: 0;padding: 0;float: left;"><a href="<?php echo admin_url( 'admin.php?page=wpforo-settings&tab=general&action=newlang' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a></h2>
43
+ </td>
44
+ </tr>
45
+ <?php do_action( 'wpforo_settings_general', $wpforo ); ?>
46
+ </tbody>
47
+ </table>
48
+ <div class="wpforo_settings_foot">
49
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
50
+ </div>
51
+ </form>
52
+ <?php endif ?>
53
+
54
+ <?php if(isset( $_GET['action'] ) && $_GET['action'] == 'newlang' ): ?>
55
+ <form action="" method="POST" name="add_lang" class="validate" enctype="multipart/form-data" >
56
+ <?php wp_nonce_field( 'wpforo-settings-language' ); ?>
57
+ <table class="wpforo_settings_table">
58
+ <tbody>
59
+ <tr class="form-field form-required">
60
+ <td>
61
+ <b><label><?php _e('Language XML file', 'wpforo') ?>: </label></b>
62
+ </td>
63
+ <td>
64
+ <input type="file" name="add_lang[xml]" accept="text/xml" />
65
+ </td>
66
+ </tr>
67
+ </tbody>
68
+ </table>
69
+ <div class="wpforo_settings_foot">
70
+ <input type="submit" class="button button-primary" value="<?php _e('Add New Language', 'wpforo'); ?>">
71
+ </div>
72
+ </form>
73
+ <?php endif ?>
wpf-admin/options-tabs/members.php ADDED
@@ -0,0 +1,69 @@
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-settings-members' ); ?>
9
+ <table class="wpforo_settings_table">
10
+ <tbody>
11
+ <?php do_action( 'wpforo_settings_members_top', $wpforo ); ?>
12
+ <tr>
13
+ <th><label><?php _e('Online status timeout', 'wpforo'); ?>:</label></th>
14
+ <td>
15
+ <?php $online_timeout = wpfo($wpforo->member_options['online_status_timeout'], false) ?>
16
+ <input name="wpforo_member_options[online_status_timeout]" type="number" min="1" value="<?php echo intval($online_timeout / 60 ) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo'); ?>
17
+ </td>
18
+ </tr>
19
+ <tr>
20
+ <th><label><?php _e('Members URL structure', 'wpforo'); ?>:</label></th>
21
+ <td>
22
+ <?php $opt_id_attr = ''; $opt_nicename_attr = ''; ?>
23
+ <?php if( wpfo($wpforo->member_options['url_structure'], false) == 'id' ){ $opt_id_attr = 'checked="checked"'; }else{ $opt_nicename_attr = 'checked="checked"'; } ?>
24
+ <input id="id" type="radio" name="wpforo_member_options[url_structure]" value="id" <?php echo $opt_id_attr ?>/><label style="color: gray" for="id"><?php echo WPFORO_BASE_URL ?>profile/<b style="color: #4093bf">USER_ID</b>/</label><br/>
25
+ <input id="nicename" type="radio" name="wpforo_member_options[url_structure]" value="nicename" <?php echo $opt_nicename_attr ?>/><label style="color: gray" for="nicename"><?php echo WPFORO_BASE_URL ?>profile/<b style="color: #4093bf">USER_NICENAME</b>/</label>
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <th colspan="2">
30
+ <h3 style="font-weight:400; padding:5px 0px 10px 0px; margin:0px;"><?php _e('Member Reputation', 'wpforo'); ?></h3>
31
+ </th>
32
+ </tr>
33
+ <tr>
34
+ <td colspan="2" style="padding:5px 0px 0px 0px;">
35
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" id="wpf-rating-table">
36
+ <tbody>
37
+ <tr>
38
+ <th style="width:10%;"><?php _e('Rating Level', 'wpforo'); ?></th>
39
+ <th style="width:15%;"><?php _e('Min Number of Posts', 'wpforo'); ?></th>
40
+ <th style="width:25%;"><?php _e('Member Title', 'wpforo'); ?></th>
41
+ <th style="text-align:center;width:10%;"><?php _e('Short Badge', 'wpforo'); ?></th>
42
+ <th style="text-align:center;width:10%;"><?php _e('Full Badge', 'wpforo'); ?></th>
43
+ <th style="text-align:center;width:10%;"><?php _e('Rating Color', 'wpforo'); ?></th>
44
+ <th style="width:20%;"><?php _e('Rating Icon', 'wpforo'); ?> | <a href="http://fontawesome.io/icons/" target="_blank" style="text-decoration:none;"><?php _e('More', 'wpforo'); ?>&raquo;</a></th>
45
+ </tr>
46
+ <?php $levels = $wpforo->member->levels(); ?>
47
+ <?php foreach( $levels as $level ): ?>
48
+ <tr>
49
+ <td><h4><?php _e('Level', 'wpforo'); ?> <?php echo esc_html($level) ?></h4></td>
50
+ <td><input type="number" value="<?php echo $wpforo->member->rating($level, 'points') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][points]" placeholder="<?php _e('Number of Posts', 'wpforo'); ?>"></td>
51
+ <td style="text-align:center;"><input type="text" value="<?php echo $wpforo->member->rating($level, 'title') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][title]" placeholder="<?php _e('Custom Title', 'wpforo'); ?>"></td>
52
+ <td style="text-align:center;"><div class="wpf-badge-short wpf-badge-level-<?php echo esc_attr($level) ?>" style="background-color:<?php echo $wpforo->member->rating($level, 'color') ?>;"><?php echo $wpforo->member->rating_badge($level, 'short'); ?></div></td>
53
+ <td style="text-align:center;"><div class="wpf-badge-full wpf-badge-level-<?php echo esc_attr($level) ?>" style="color:<?php echo $wpforo->member->rating($level, 'color') ?>;"><?php echo $wpforo->member->rating_badge($level, 'full'); ?></div></td>
54
+ <td style="text-align:center;"><input type="color" value="<?php echo $wpforo->member->rating($level, 'color') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][color]" placeholder="<?php _e('Color', 'wpforo'); ?>"></td>
55
+ <td><input type="text" value="<?php echo $wpforo->member->rating($level, 'icon') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][icon]" placeholder="<?php _e('Badge Icon', 'wpforo'); ?>"></td>
56
+ </tr>
57
+ <?php endforeach; ?>
58
+ </tbody>
59
+ </table>
60
+
61
+ </td>
62
+ </tr>
63
+ <?php do_action( 'wpforo_settings_members_bottom', $wpforo ); ?>
64
+ </tbody>
65
+ </table>
66
+ <div class="wpforo_settings_foot">
67
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
68
+ </div>
69
+ </form>
wpf-admin/options-tabs/plugins.php ADDED
@@ -0,0 +1,33 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+
8
+ <p style="padding:0px 10px 0px 10px; font-style:italic;">
9
+ <?php _e('Thank you for using wpForo. wpForo is a premium forum plugin which will always be available for free. There will never be paid and pro versions of this forum board. However this is a very large and hard project so we also develop paid addons (extensions), which will financially help us to keep improving and adding new features to the free wpForo plugin. Forum addons will also be actively developed. The first addons "Advanced Media Uploader", "Polls", "Private Messages" and "Ad Manager" will be available very soon. Once you got some addon and activated that, you will find settings in vertical subTabs here.', 'wpforo'); ?>
10
+ </p>
11
+ <p>&nbsp;</p>
12
+
13
+ <?php
14
+
15
+ $tabs = array();
16
+ $tabs = apply_filters('wpforo_plugins_tabs_array_filter', $tabs);
17
+ if( !empty($tabs) && isset($_GET['tab']) ){
18
+ $subTab = ( !isset($_GET['subtab']) ) ? key($tabs) : $_GET['subtab'];
19
+ $_GET['subtab'] = $subTab;
20
+ wpforo_admin_options_tabs( $tabs, $_GET['tab'], TRUE, $subTab );
21
+ }
22
+
23
+ $option_files = array();
24
+ $option_files = apply_filters('wpforo_plugins_option_files_array_filter', $option_files);
25
+ if( isset($_GET['subtab']) && isset($option_files[$_GET['subtab']]) ){
26
+ ?>
27
+ <div class="plugins-tab-wrap">
28
+ <?php include_once( $option_files[$_GET['subtab']] ); ?>
29
+ </div>
30
+ <?php
31
+ }
32
+
33
+ ?>
wpf-admin/options-tabs/posts.php ADDED
@@ -0,0 +1,59 @@
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>
wpf-admin/options-tabs/styles.php ADDED
@@ -0,0 +1,48 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+
8
+ <form action="" method="POST" class="validate">
9
+ <?php wp_nonce_field( 'wpforo-settings-styles' ); ?>
10
+ <table style="width:2%; border:none; padding:5px; float:left;">
11
+ <tbody>
12
+ <tr class="form-field form-required">
13
+ <td class="wpf-dw-td-value-p">&nbsp;</td>
14
+ </tr>
15
+ </tbody>
16
+ </table>
17
+ <table style="width:95%; border:none; padding:5px; float:left; margin-left:10px;">
18
+ <tbody>
19
+ <tr class="form-field form-required">
20
+ <td class="wpf-dw-td-value-p">
21
+ <?php foreach( $wpforo->theme_options['styles'] as $style => $colors ): ?>
22
+ <div class="wpforo-style-color-wrapper" style="border-right:2px solid #eee; margin-right:10px; padding-left:5px; background:<?php echo ( $style == $wpforo->theme_options['style'] ) ? '#E8FFE5' : 'transparent'; ?>">
23
+ <ul style="list-style:none;">
24
+ <li style="border-bottom:2px solid #EEEEEE; margin-bottom:5px;">
25
+ <div style="float:left; text-align:center; width:27px;"><input style="margin:0px;" <?php if( $style == $wpforo->theme_options['style'] ) echo ' checked="checked"'; ?> type="radio" name="wpforo_theme_options[style]" value="<?php wpfo($style) ?>" id="wpforo_stle_<?php wpfo($style) ?>" /></div>
26
+ <div style="text-transform:uppercase; text-align:left;float:left; font-weight:bold; font-size:14px;"><label for="wpforo_stle_<?php wpfo($style) ?>">&nbsp;<?php wpfo($style) ?></label></div>
27
+ <div style="clear:both;"></div>
28
+ </li>
29
+ <?php foreach( $colors as $color_key => $color_value ): ?>
30
+ <li>
31
+ <div class="wpforo-style-color"><?php wpfo($color_key); ?></div>
32
+ <div class="wpforo-style-field"><input name="wpforo_theme_options[styles][<?php wpfo($style) ?>][<?php wpfo($color_key); ?>]" type="color" value="<?php wpfo(strtoupper($color_value)); ?>" title="<?php wpfo(strtoupper($color_value)); ?>" /></div>
33
+ <div style="clear:both;"></div>
34
+ </li>
35
+ <?php endforeach; ?>
36
+ </ul>
37
+ </div>
38
+ <?php endforeach; ?>
39
+ <div style="clear:both;"></div>
40
+ </td>
41
+ </tr>
42
+ </tbody>
43
+ </table>
44
+ <div style="clear:both;"></div>
45
+ <div class="wpforo_settings_foot">
46
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
47
+ </div>
48
+ </form>
wpf-admin/options-tabs/subscriptions.php ADDED
@@ -0,0 +1,77 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+
8
+ <form action="" method="POST" class="validate">
9
+ <?php wp_nonce_field( 'wpforo-settings-emails' ); ?>
10
+ <table class="wpforo_settings_table">
11
+ <tbody>
12
+ <tr>
13
+ <th style="width:40%"><label><?php _e('From Name', 'wpforo'); ?>:</label></th>
14
+ <td><input name="wpforo_subscribe_options[from_name]" type="text" value="<?php wpfo($wpforo->subscribe_options['from_name']); ?>" required></td>
15
+ </tr>
16
+ <tr>
17
+ <th><label><?php _e('From Email Address', 'wpforo'); ?>:</label></th>
18
+ <td><input name="wpforo_subscribe_options[from_email]" type="text" value="<?php wpfo($wpforo->subscribe_options['from_email']); ?>" required /></td>
19
+ </tr>
20
+ <tr>
21
+ <th>
22
+ <label><?php _e('Forum Admin Email Addresses', 'wpforo'); ?>:</label>
23
+ <p class="wpf-info"><?php _e('Comma separated email addresses of forum administrators to get forum notifications. For example post report messages.', 'wpforo') ?></p>
24
+ </th>
25
+ <td><input name="wpforo_subscribe_options[admin_emails]" type="text" value="<?php wpfo($wpforo->subscribe_options['admin_emails']); ?>" required /></td>
26
+ </tr>
27
+ <tr>
28
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
29
+ <h3 style="font-weight:400; padding:10px 0px 0px 0px; margin:0px;"><?php _e('Subscription Emails', 'wpforo'); ?></h3>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <th><label><?php _e('Subscribe confirmation email subject', 'wpforo'); ?>:</label></th>
34
+ <td><input name="wpforo_subscribe_options[confirmation_email_subject]" type="text" value="<?php wpfo($wpforo->subscribe_options['confirmation_email_subject']); ?>" required></td>
35
+ </tr>
36
+ <tr>
37
+ <th><label><?php _e('Subscribe confirmation email message', 'wpforo'); ?>:</label></th>
38
+ <td><textarea style="height:190px;" name="wpforo_subscribe_options[confirmation_email_message]" required><?php wpfo($wpforo->subscribe_options['confirmation_email_message'], true, 'esc_textarea'); ?></textarea></td>
39
+ </tr>
40
+ <tr>
41
+ <th><label><?php _e('New topic notification email subject', 'wpforo'); ?>:</label></th>
42
+ <td><input name="wpforo_subscribe_options[new_topic_notification_email_subject]" type="text" value="<?php wpfo($wpforo->subscribe_options['new_topic_notification_email_subject']); ?>" required></td>
43
+ </tr>
44
+ <tr>
45
+ <th><label><?php _e('New topic notification email message', 'wpforo'); ?>:</label></th>
46
+ <td><textarea style="height:190px;" name="wpforo_subscribe_options[new_topic_notification_email_message]" required><?php wpfo($wpforo->subscribe_options['new_topic_notification_email_message'], true, 'esc_textarea'); ?></textarea></td>
47
+ </tr>
48
+ <tr>
49
+ <th><label><?php _e('New reply notification email subject', 'wpforo'); ?>:</label></th>
50
+ <td><input name="wpforo_subscribe_options[new_post_notification_email_subject]" type="text" value="<?php wpfo($wpforo->subscribe_options['new_post_notification_email_subject']); ?>" required></td>
51
+ </tr>
52
+ <tr>
53
+ <th><label><?php _e('New reply notification email message', 'wpforo'); ?>:</label></th>
54
+ <td><textarea style="height:190px;" name="wpforo_subscribe_options[new_post_notification_email_message]" required><?php wpfo($wpforo->subscribe_options['new_post_notification_email_message'], true, 'esc_textarea'); ?></textarea></td>
55
+ </tr>
56
+ <tr>
57
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
58
+ <h3 style="font-weight:400; padding:10px 0px 0px 0px; margin:0px;"><?php _e('Post Reporting Emails', 'wpforo'); ?></h3>
59
+ <p class="wpf-info"><?php _e('This message comes from post reporting pop-up form.', 'wpforo') ?></p>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <th>
64
+ <label><?php _e('Report message subject', 'wpforo'); ?>:</label>
65
+ </th>
66
+ <td><input name="wpforo_subscribe_options[report_email_subject]" type="text" value="<?php wpfo($wpforo->subscribe_options['report_email_subject']); ?>" required></td>
67
+ </tr>
68
+ <tr>
69
+ <th><label><?php _e('Report message body', 'wpforo'); ?>:</label></th>
70
+ <td><textarea style="height:190px;" name="wpforo_subscribe_options[report_email_message]" required><?php wpfo($wpforo->subscribe_options['report_email_message'], true, 'esc_textarea'); ?></textarea></td>
71
+ </tr>
72
+ </tbody>
73
+ </table>
74
+ <div class="wpforo_settings_foot">
75
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
76
+ </div>
77
+ </form>
wpf-admin/options.php ADDED
@@ -0,0 +1,61 @@