PluginProbe
wpForo Forum / 3.0.9
wpForo Forum v3.0.9
3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.2 All 137 releases
wpforo / admin / settings / styles.php

styles.php in wpForo Forum 3.0.9, at admin/settings/styles.php

154 lines 11.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if( ! defined( "ABSPATH" ) ) exit(); ?>
2
3 <input type="hidden" name="wpfaction" value="styles_settings_save">
4
5 <?php
6 WPF()->settings->header( 'styles' );
7 WPF()->settings->form_field( 'styles', 'font_sizes' );
8 WPF()->settings->form_field( 'styles', 'custom_css' );
9 $colorids = apply_filters( 'wpforo_manageable_colorids', [ 1, 3, 9, 11, 12, 14, 15, 18 ] );
10 ?>
11
12 <h3 style="margin:20px 0 0; padding:10px 0; border-bottom:3px solid #F5F5F5; font-size: 15px;" data-wpf-opt="style"><?php _e( 'Forum Styles', 'wpforo' ); ?> &nbsp;<a href="https://wpforo.com/docs/wpforo-v2/wpforo-settings/style-settings/" title="<?php _e( 'Read the documentation', 'wpforo' ) ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a> &nbsp;|&nbsp; <a href="https://wpforo.com/docs/wpforo-v2/forum-themes/theme-styles/" target="_blank"
13 style="font-size:13px; text-decoration:none;"><?php _e( 'Colors Documentation', 'wpforo' ); ?> &raquo;</a>
14 </h3>
15 <table style="width:95%; border:none; padding:5px; margin-left:10px; margin-top:15px;">
16 <tbody>
17 <tr class="form-field form-required">
18 <td class="wpf-dw-td-value-p">
19 <table class="wpforo-style-color-wrapper" style="margin-right:10px; width:20px;">
20 <tr>
21 <td class="wpfo-settings-style-colorid-hash">#</td>
22 </tr>
23 <?php
24 foreach( $colorids as $colorid ) {
25 printf( '<tr><td><div class="wpfo-settings-style-colorid">%1$d</div></td></tr>', $colorid );
26 }
27 ?>
28 </table>
29 <?php
30 foreach( wpforo_setting( 'styles', 'color_styles' ) as $color_style => $colors ): ?>
31 <table class="wpforo-style-color-wrapper" style="border-right:2px solid #eee; margin-right:10px; padding-left:5px; <?php echo ( $color_style === wpforo_setting( 'styles', 'color_style' ) ) ? 'background: #E8FFE5; width: 130px; text-align: center;' : 'background: transparent'; ?>">
32 <tr>
33 <td>
34 <div style="float: left; text-align: center; width: 27px;">
35 <input style="margin: 0;" <?php checked( $color_style === wpforo_setting( 'styles', 'color_style' ) ) ?> type="radio" name="styles[color_style]" value="<?php wpfo( $color_style ) ?>" id="wpforo_stle_<?php wpfo( $color_style ) ?>">
36 </div>
37 <div style="text-transform: uppercase; text-align: left; float: left; font-weight: bold; font-size: 13px; padding-bottom: 5px;"><label for="wpforo_stle_<?php wpfo( $color_style ) ?>">&nbsp;<?php _e( $color_style, 'wpforo' ); ?></label></div>
38 <div style="clear: both;"></div>
39 </td>
40 </tr>
41 <?php foreach( $colorids as $colorid ) : ?>
42 <tr>
43 <td style="border-bottom:1px solid #ddd;">
44 <div class="wpforo-style-field">
45 <?php if( $color_style === wpforo_setting( 'styles', 'color_style' ) ): ?>
46 <input class="wpforo-color-field" name="styles[color_styles][<?php wpfo( $color_style ) ?>][<?php wpfo( $colorid ) ?>]" type="text" value="<?php wpfo( strtoupper( (string) $colors[ $colorid ] ) ); ?>" title="<?php wpfo( strtoupper( (string) $colors[ $colorid ] ) ); ?>">
47 <?php else: ?>
48 <input style="width:90%; height: 23px; box-sizing: border-box; padding:0;" name="styles[color_styles][<?php wpfo( $color_style ) ?>][<?php wpfo( $colorid ); ?>]" type="color" value="<?php wpfo( strtoupper( (string) $colors[ $colorid ] ) ); ?>" title="<?php wpfo( strtoupper( (string) $colors[ $colorid ] ) ); ?>">
49 <?php endif; ?>
50 </div>
51 </td>
52 </tr>
53 <?php endforeach; ?>
54 </table>
55 <?php endforeach; ?>
56 <div style="clear:both;"></div>
57 <div class="wpf-color-desc">
58 <ul>
59 <li><strong style="text-transform: uppercase;"><?php _e( 'Color', 'wpforo' ) ?> #1</strong>
60 <ul>
61 <li><?php _e( 'Wherever you see white background and white font color', 'wpforo' ) ?></li>
62 </ul>
63 </li>
64 <li><strong style="text-transform: uppercase;"><?php _e( 'Color', 'wpforo' ) ?> #3</strong>
65 <ul>
66 <li><?php _e( 'Post content font color', 'wpforo' ) ?></li>
67 <li><?php _e( 'Forum menu bar background color', 'wpforo' ) ?></li>
68 <li><?php _e( 'Footer top bar background color', 'wpforo' ) ?></li>
69 <li><?php _e( 'Footer bottom "powered by" bar background color', 'wpforo' ) ?></li>
70 </ul>
71 </li>
72 <li><strong style="text-transform: uppercase;"><?php _e( 'Color', 'wpforo' ) ?> #9</strong>
73 <ul>
74 <li><?php _e( 'The light gray background of almost all sections and boxes (header, menu, topic overview, footer, etc...)', 'wpforo' ) ?></li>
75 </ul>
76 </li>
77 <li><span style="color: #3366ff; text-transform: uppercase;"><strong><?php _e( 'Color', 'wpforo' ) ?> #11</strong></span>
78 <ul>
79 <li><?php _e( "Links' hover/active font color", 'wpforo' ) ?></li>
80 <li><?php _e( 'Topic/post action link hover color (reply, quote, like, sticky, closed, move, delete)', 'wpforo' ) ?></li>
81 </ul>
82 </li>
83 <li><span style="color: #3366ff; text-transform: uppercase;"><strong><?php _e( 'Color', 'wpforo' ) ?> #12</strong></span> - <span style="color: #ff0000;"><strong>[ PRIMARY COLOR ]</strong></span>
84 <ul>
85 <li><?php _e( 'Buttons background color', 'wpforo' ) ?></li>
86 <li><?php _e( 'Active menu background color', 'wpforo' ) ?></li>
87 <li><?php _e( 'Category panel background color', 'wpforo' ) ?></li>
88 <li><?php _e( 'Topic list head panel background color', 'wpforo' ) ?></li>
89 <li><?php _e( 'Post list head panel background color', 'wpforo' ) ?></li>
90 <li><?php _e( 'Top right pop-up message background color', 'wpforo' ) ?></li>
91 </ul>
92 </li>
93 <li><span style="color: #3366ff; text-transform: uppercase;"><strong><?php _e( 'Color', 'wpforo' ) ?> #14</strong></span>
94 <ul>
95 <li><?php _e( 'Button border color and button hover background color', 'wpforo' ) ?></li>
96 </ul>
97 </li>
98 <li><span style="color: #3366ff; text-transform: uppercase;"><strong><?php _e( 'Color', 'wpforo' ) ?> #15</strong></span>
99 <ul>
100 <li><?php _e( 'The color of almost all links', 'wpforo' ) ?></li>
101 <li><?php _e( 'Topic and post moderation buttons\' color (reply, quote, like, sticky, closed, move, delete, etc...)', 'wpforo' ) ?></li>
102 </ul>
103 </li>
104 <li><strong style="text-transform: uppercase;"><?php _e( 'Color', 'wpforo' ) ?> #18</strong>
105 <ul>
106 <li><?php _e( 'The lightest gray background of sections and boxes (forum list, members boxes, reply background, etc...)', 'wpforo' ) ?></li>
107 </ul>
108 </li>
109 </ul>
110 </div>
111 </td>
112 </tr>
113 </tbody>
114 </table>
115 <div style="clear: both;"></div>
116 <hr>
117
118 <?php if( $dynamic_css = WPF()->tpl->generate_dynamic_css() ) : ?>
119 <script type="text/javascript">
120 function wpforo_input_select_all_and_copy (t) {
121 t.select()
122 if (document.execCommand('copy')) {
123 jQuery('#dynamic-css-code-wrap').addClass('wpf_copy_animate')
124 setTimeout(function () {
125 jQuery('#dynamic-css-code-wrap').removeClass('wpf_copy_animate')
126 }, 1000)
127 }
128 }
129 </script>
130 <div id="dynamic-css-notice-wrap">
131 <div id="dynamic-css-help-steps-wrap">
132 <p style="font-size: 15px;">
133 <b><i class="fas fa-info-circle" aria-hidden="true"></i> <?php _e( 'Problems with colors?', 'wpforo' ); ?></b><br>
134 <?php printf( __( 'After changing and saving colors, go to the forum front-end and press %s twice. If you don\'t see any change, please follow to the instruction below.', 'wpforo' ), '<b>CTRL+F5</b>' ); ?>
135 </p>
136 <p style="font-size: 15px;"><?php _e( 'In most cases, this problem comes from your server file writing permissions. Files are not permitted to change, thus the forum color provider colors.css file is not updated with your changes. If you cannot fix this issue in hosting server, then the following easy steps can solve your problem:', 'wpforo' ) ?></p>
137 <ol>
138 <li style="font-size: 14px; margin-bottom: 1px; line-height: 1.5"><?php printf( __( 'Create colors.css file or simply download %s file with the CSS code provided in the textarea below,', 'wpforo' ), '<code>colors.css</code>' ) ?></li>
139 <li style="font-size: 14px; margin-bottom: 1px; line-height: 1.5"><?php printf( __( 'Upload and replace %s file in %s directory,', 'wpforo' ), '<code>colors.css</code>', '<code>' . WPF()->tpl->template_dir . DIRECTORY_SEPARATOR . '</code>' ) ?></li>
140 <li style="font-size: 14px; margin-bottom: 1px; line-height: 1.5"><?php printf( __( 'Delete website cache, reset CSS file optimizer and minifier plugins caches, purge CDN data (if you have), then go to the forum front-end and press %s twice.', 'wpforo' ), '<b>CTRL+F5</b>' ) ?></li>
141 </ol>
142 </div>
143 <div id="dynamic-css-code-wrap">
144 <label for="colors_css" class="dynamic-css-fname"><i class="fas fa-file-code"></i>&nbsp;colors.css</label>
145 <textarea id="colors_css" readonly class="dynamic-css-code" rows="10" onclick="wpforo_input_select_all_and_copy(this)"><?php echo $dynamic_css ?></textarea>
146 <div class="wpf_copied_txt"><span><?php _e( 'Copied', 'wpforo' ) ?></span></div>
147 </div>
148 <a style="font-size: 14px; text-decoration: none;" href="<?php echo wp_nonce_url( admin_url( 'admin.php?page=' . wpforo_prefix_slug( 'settings' ) . '&tab=styles&wpfaction=colors_css_download' ), 'dynamic_css_download' ) ?>"><i class="fas fa-file-download"></i> <?php _e( 'Download', 'wpforo' ) ?> colors.css</a>
149 <br style="clear: both">
150 </div>
151 <?php endif; ?>
152
153 <script>jQuery(document).ready(function ($) {$(function () { $('.wpforo-color-field').wpColorPicker() })})</script>
154