| 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 class="wpforo_settings_table"> |
| 11 |
<tbody> |
| 12 |
<tr> |
| 13 |
<th style="width:30%;"><label><?php _e('Font Sizes', 'wpforo'); ?>:</label></th> |
| 14 |
<td> |
| 15 |
<label style="display:inline-block; text-align:center; font-size:14px;"> |
| 16 |
<span><?php _e('Forums','wpforo'); ?>:</span> |
| 17 |
<select name="wpforo_style_options[font_size_forum]" style="min-width:80px;"> |
| 18 |
<?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( WPF()->tpl->style['font_size_forum'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?> |
| 19 |
</select> |
| 20 |
</label> |
| 21 |
<label style="display:inline-block; text-align:center; font-size:14px;"> |
| 22 |
<span><?php _e('Topics','wpforo'); ?>:</span> |
| 23 |
<select name="wpforo_style_options[font_size_topic]" style="min-width:80px;"> |
| 24 |
<?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( WPF()->tpl->style['font_size_topic'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?> |
| 25 |
</select> |
| 26 |
</label> |
| 27 |
<label style="display:inline-block; text-align:center; font-size:14px;"> |
| 28 |
<span><?php _e('Post Content','wpforo'); ?>:</span> |
| 29 |
<select name="wpforo_style_options[font_size_post_content]" style="min-width:80px;"> |
| 30 |
<?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( WPF()->tpl->style['font_size_post_content'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?> |
| 31 |
</select> |
| 32 |
</label> |
| 33 |
</td> |
| 34 |
</tr> |
| 35 |
<tr> |
| 36 |
<th style="width:30%;"><label><?php _e('Custom CSS Code', 'wpforo'); ?>:</label></th> |
| 37 |
<td> |
| 38 |
<textarea name="wpforo_style_options[custom_css]" style="width:90%; height:130px; font-family:Consolas, 'Andale Mono', 'Lucida Console'; color:#666666; background:#fdfdfd;"><?php echo esc_textarea(stripslashes(WPF()->tpl->style['custom_css'])); ?></textarea> |
| 39 |
</td> |
| 40 |
</tr> |
| 41 |
</tbody> |
| 42 |
</table> |
| 43 |
<h3 style="margin:0px 20px 0px 20px; padding:10px 0px; border-bottom:3px solid #F5F5F5;"><?php _e('Forum Color Styles', 'wpforo'); ?> | <a href="https://wpforo.com/docs/root/forum-themes/theme-styles/" target="_blank" style="font-size:13px; text-decoration:none;"><?php _e('Documentation', 'wpforo'); ?> »</a></h3> |
| 44 |
<table style="width:95%; border:none; padding:5px; margin-left:10px; margin-top:15px;"> |
| 45 |
<tbody> |
| 46 |
<tr class="form-field form-required"> |
| 47 |
<td class="wpf-dw-td-value-p"> |
| 48 |
<table class="wpforo-style-color-wrapper" style="border-right:2px solid #eee; margin-right:10px; padding-left:5px; width:40px;"> |
| 49 |
<tr> |
| 50 |
<td style="border-bottom:2px solid #EEEEEE; margin-bottom:5px;"> |
| 51 |
#<div style="clear:both;"></div> |
| 52 |
</td> |
| 53 |
</tr> |
| 54 |
<?php foreach( WPF()->tpl->options['styles']['default'] as $color_key => $color_value ): ?> |
| 55 |
<tr> |
| 56 |
<td> |
| 57 |
<div style="line-height:31px; min-height:32px; font-size:14px; font-weight:bold;"><?php wpfo($color_key); ?></div> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
<?php endforeach; ?> |
| 61 |
</table> |
| 62 |
<?php foreach( WPF()->tpl->options['styles'] as $style => $colors ): ?> |
| 63 |
<table class="wpforo-style-color-wrapper" style="border-right:2px solid #eee; margin-right:10px; padding-left:5px; <?php echo ( $style == WPF()->tpl->options['style'] ) ? 'background: #E8FFE5; width: 200px; text-align: center;' : 'background: transparent'; ?>"> |
| 64 |
<tr> |
| 65 |
<td> |
| 66 |
<div style="float:left; text-align:center; width:27px;"><input style="margin:0px;" <?php if( $style == WPF()->tpl->options['style'] ) echo ' checked="checked"'; ?> type="radio" name="wpforo_theme_options[style]" value="<?php wpfo($style) ?>" id="wpforo_stle_<?php wpfo($style) ?>" /></div> |
| 67 |
<div style="text-transform:uppercase; text-align:left;float:left; font-weight:bold; font-size:14px;"><label for="wpforo_stle_<?php wpfo($style) ?>"> <?php wpfo($style) ?></label></div> |
| 68 |
<div style="clear:both;"></div> |
| 69 |
</td> |
| 70 |
</tr> |
| 71 |
<?php foreach( $colors as $color_key => $color_value ): ?> |
| 72 |
<tr> |
| 73 |
<td style="border-bottom:1px solid #ddd;"> |
| 74 |
<div class="wpforo-style-field"> |
| 75 |
<?php if( $style == WPF()->tpl->options['style'] ): ?> |
| 76 |
<input class="wpforo-color-field" name="wpforo_theme_options[styles][<?php wpfo($style) ?>][<?php wpfo($color_key); ?>]" type="text" value="<?php wpfo(strtoupper($color_value)); ?>" title="<?php wpfo(strtoupper($color_value)); ?>" /> |
| 77 |
<?php else: ?> |
| 78 |
<input style="width:90%;height: 22.5px; box-sizing:border-box; padding:0px;" 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)); ?>" /> |
| 79 |
<?php endif; ?> |
| 80 |
</div> |
| 81 |
</td> |
| 82 |
</tr> |
| 83 |
<?php endforeach; ?> |
| 84 |
</table> |
| 85 |
<?php endforeach; ?> |
| 86 |
<div style="clear:both;"></div> |
| 87 |
</td> |
| 88 |
</tr> |
| 89 |
</tbody> |
| 90 |
</table> |
| 91 |
<div style="clear:both;"></div> |
| 92 |
<div class="wpforo_settings_foot"> |
| 93 |
<input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" /> |
| 94 |
</div> |
| 95 |
</form> |
| 96 |
<script language="javascript">jQuery(document).ready(function($){$(function () { $('.wpforo-color-field').wpColorPicker(); });});</script> |