-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_skin.class.php
executable file
·1636 lines (1511 loc) · 81.9 KB
/
_skin.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* This file implements a class derived of the generic Skin class in order to provide custom code for
* the skin in this folder.
*
* This file is part of the b2evolution project - {@link http://b2evolution.net/}
*
* @package skins
* @subpackage starter_skin
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
/**
* Specific code for this skin.
*
* ATTENTION: if you make a new skin you have to change the class name below accordingly
*/
class cuboid_blog_Skin extends Skin
{
var $version = '6.0.0';
/**
* Do we want to use style.min.css instead of style.css ?
*/
var $use_min_css = 'check'; // true|false|'check' Set this to true for better optimization
// Note: we leave this on "check" in the bootstrap_blog_skin so it's easier for beginners to just delete the .min.css file
// But for best performance, you should set it to true.
/**
* Get default name for the skin.
* Note: the admin can customize it.
*/
function get_default_name()
{
return 'Cuboid Blog Skin';
}
/**
* Get default type for the skin.
*/
function get_default_type()
{
return 'normal';
}
/**
* What evoSkins API does has this skin been designed with?
*
* This determines where we get the fallback templates from (skins_fallback_v*)
* (allows to use new markup in new b2evolution versions)
*/
function get_api_version()
{
return 6;
}
/**
* Get supported collection kinds.
*
* This should be overloaded in skins.
*
* For each kind the answer could be:
* - 'yes' : this skin does support that collection kind (the result will be was is expected)
* - 'partial' : this skin is not a primary choice for this collection kind (but still produces an output that makes sense)
* - 'maybe' : this skin has not been tested with this collection kind
* - 'no' : this skin does not support that collection kind (the result would not be what is expected)
* There may be more possible answers in the future...
*/
public function get_supported_coll_kinds()
{
$supported_kinds = array(
'main' => 'partial',
'std' => 'yes', // Blog
'photo' => 'Yes',
'forum' => 'no',
'manual' => 'maybe',
'group' => 'maybe', // Tracker
// Any kind that is not listed should be considered as "maybe" supported
);
return $supported_kinds;
}
/**
* Judge if the file is the image we want to use
*
* @param string filepath: the path of a file
* array arr_types: the file type we want to use
* @return array
*/
function isImage( $filepath, $arr_types=array( ".gif", ".jpeg", ".png", ".bmp" ) )
{
if(file_exists($filepath)) {
$info = getimagesize($filepath);
$ext = image_type_to_extension($info['2']);
return in_array($ext,$arr_types);
} else {
return false;
}
}
/**
* Get the pictures of one local folder as an array
*
* @param string img_folder; the image folder;
* string img_folder_url; folder url, we would like to show the img of this folder on the screen for user viewing;
* int thumb_width: thumb image whdth shown on the skin setting page
* int thumb_height: thumb image height shown on the skin setting page
* @return array
*/
function get_arr_pics_from_folder( $img_folder, $img_folder_url, $thumb_width = 50, $thumb_height = 50 )
{
$arr_filenames = $filesnames =array();
if(file_exists($img_folder))
{
$filesnames = scandir($img_folder);
}
$count = 0;
foreach ( $filesnames as $name )
{
$count++;
if ( $name != "." && $name != ".." && $name != "_evocache" && $this->isImage($img_folder.$name) ) //not the folder and other files
{
$arr_filenames[] = array( $img_folder_url.$name,
"<a href='".$img_folder_url.$name."' target='blank'><img src='".$img_folder_url.$name."' width=".$thumb_width."px heigh=".$thumb_height."px /></a>" );
}
if ($count==30) break; // The max number of the images we want to show
}
$arr_filenames[] = array("none",T_("Transparent"));
return $arr_filenames;
}
/**
* Get definitions for editable params
*
* @see Plugin::GetDefaultSettings()
* @param local params like 'for_editing' => true
*/
function get_param_definitions( $params )
{
global $Blog;
// Load to use function get_available_thumb_sizes()
load_funcs( 'files/model/_image.funcs.php' );
// System provide bg images
$bodybg_cat = 'assets/images/bodybg/'; // Background images folder relative to this skin folder
$arr_bodybg = $this -> get_arr_pics_from_folder( $this->get_path().$bodybg_cat, $this->get_url().$bodybg_cat, 60, 60 );
// User Custom bg images
$custom_bodybg_cat = "bodybg/"; // Background images folder which created by users themselves, and it's relative to collection media dir
$arr_custom_bodybg = $this->get_arr_pics_from_folder( $Blog->get_media_dir().$custom_bodybg_cat, $Blog->get_media_url().$custom_bodybg_cat, 65 ,65);
$r = array_merge( array(
'general_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('General Settings').' (All disps)',
),
// Layout
'layout' => array(
'label' => T_('Front Page Layout'),
'note' => '',
'defaultvalue' => 'right_sidebar',
'type' => 'select',
'options' => array(
'single_column' => T_('Single Column Large'),
'single_column_normal' => T_('Single Column'),
'single_column_narrow' => T_('Single Column Narrow'),
'single_column_extra_narrow' => T_('Single Column Extra Narrow'),
'left_sidebar' => T_('Left Sidebar'),
'right_sidebar' => T_('Right Sidebar'),
),
),
'max_image_height' => array(
'label' => T_('Max image height'),
'note' => 'px',
'defaultvalue' => '',
'type' => 'integer',
'allow_empty' => true,
),
'color_schemes' => array(
'label' => T_('Color Schemes'),
'note' => T_('Default value is').' #1ABC9C',
'defaultvalue' => '#1ABC9C',
'type' => 'color',
),
'background_type' => array(
'label' => T_('Site Background Style'),
'note' => T_('Select your favorite').' <code>Background Style</code> '.T_('for your site.'),
'type' => 'select',
'options' => array(
'color' => T_('Site Background Color'),
'images' => T_('Background Image Pattern'),
'custom_images' => T_('Custom Background Image'),
),
'defaultvalue' => 'images',
),
'site_background_color' => array(
'label' => T_('Site Background Color'),
'note' => T_('Default value is').' #F5F7F9',
'defaultvalue' => '#F5F7F9',
'type' => 'color',
),
'bg_image' => array(
'label' => T_('Background Image Pattern'),
'note' => T_('Choose your favorite background image pattern'),
'type' => 'radio',
'options' => $arr_bodybg,
'defaultvalue' => reset($arr_bodybg[0]),
),
'bg_image_custom' => array(
'label' => T_('User Custom Background Image'),
'note' => T_('(Please create a folder named').' <code>'.str_replace("/","",$custom_bodybg_cat).'</code> '. T_('in your collection media folder and put the images into it. Now').' <a href="admin.php?ctrl=files" target="_blank"><i>'.T_( 'Create folder or Upload images ').'</i></a>.',
'type' => 'radio',
'options' => $arr_custom_bodybg,
'defaultvalue' => reset($arr_custom_bodybg[0]),
),
'bg_image_custom_attach' => array(
'label' => T_('Custom Background Attachment'),
'note' => T_('Select the Background Attachment for Custom Background Image.'),
'type' => 'select',
'options' => array(
'initial' => T_('Initial'),
'fixed' => T_('Fixed'),
),
'defaultvalue' => 'initial',
),
'bg_image_custom_size' => array(
'label' => T_('Custom Background Size'),
'note' => T_('Select the background size for Custom Background Image.'),
'type' => 'select',
'defaultvalue' => 'auto',
'options' => array(
'auto' => T_('Auto'),
'contain' => T_('Contain'),
'cover' => T_('Cover'),
),
),
// Back To Top
'bt_top' => array(
'label' => T_('Display Button Back To Top'),
'note' => T_('Check to enable button back to top.'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'bg_wrap_content' => array(
'label' => T_( 'Content Background Wrapper' ),
'note' => T_( 'Change Background wrapper for Posts, Widget, Search Results and other. Default value is' ).' <code>#FFFFFF</code>',
'type' => 'color',
'defaultvalue' => '#FFFFFF',
),
'general_settings_end' => array(
'layout' => 'end_fieldset',
),
/* Page Setting
* ========================================================================== */
'page_setting_start' => array(
'layout' => 'begin_fieldset',
'label' => T_( 'Page Settings' ).' (All disps)',
),
'page_content_color' => array(
'label' => T_('Page Content Color'),
'note' => T_('Default value is blank'),
'defaultvalue' => '',
'type' => 'color',
),
'page_heading_color' => array(
'label' => T_( 'Page Heading Color' ),
'note' => T_( 'Default value is' ).' <code>#555555</code>',
'type' => 'color',
'defaultvalue' => '#555555',
),
'page_font_size' => array(
'label' => T_( 'Font Size Page' ),
'note' => T_( 'px. Change font size for content all page.' ),
'type' => 'integer',
'defaultvalue' => '',
'size' => 5,
'allow_empty' => true,
),
'page_info_color' => array(
'label' => T_('Page Info Text Color'),
'note' => T_('Default value is').' <code>#777777</code>',
'defaultvalue' => '#777777',
'type' => 'color',
),
'page_info_link' => array(
'label' => T_('Page Info Link Color'),
'note' => T_('Default value is').' <code>#A9A9A9</code>',
'defaultvalue' => '#A9A9A9',
'type' => 'color',
),
'page_setting_end' => array(
'layout' => 'end_fieldset',
),
/**
* ============================================================================
* Header Settings
* ============================================================================
*/
'header_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Header settings').' (All disps)',
),
'head_center_mode' => array(
'label' => T_('Max Width Header Center Mode'),
'note' => T_('px - Set Max Width for Header Center Mode. Default').' <code>(992px)</code>'. T_(', example:').' <code>1170px</code>',
'defaultvalue' => '992',
'size' => '5',
'type' => 'integer',
'allow_empty' => true,
),
'header_bg_color' => array(
'label' => T_('Header Background Color'),
'note' => T_('Default value is').' <code>#262626</code>',
'defaultvalue' => '#262626',
'type' => 'color',
),
'nav_color_link' => array(
'label' => T_('Navigation Link Color'),
'note' => T_('Default value is').' <code>#FFFFFF</code>',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'nav_color_hovlink' => array(
'label' => T_('Navigation Hover Link Color'),
'note' => T_('Default value is').' <code>#FFFFFF</code>',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'header_settings_end' => array(
'layout' => 'end_fieldset',
),
// End Header Settings
/**
* ============================================================================
* Posts Disp
* ============================================================================
*/
'posts_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Posts Settings').' (disp=posts)',
),
'posts_layout' => array(
'label' => T_('Posts Layout'),
'note' => T_('Select "Single Column Large" Layout for Post 3 Column'),
'type' => 'select',
'options' => array(
'single_column' => T_('Single Column Large'),
'single_column_normal' => T_('Single Column'),
'single_column_narrow' => T_('Single Column Narrow'),
'single_column_extra_narrow' => T_('Single Column Extra Narrow'),
'left_sidebar' => T_('Left Sidebar'),
'right_sidebar' => T_('Right Sidebar'),
),
'defaultvalue' => 'right_sidebar',
),
'posts_column' => array(
'label' => T_('Posts Columns'),
'note' => T_('( Number of posts columns in posts disp. )'),
'type' => 'select',
'options' => array(
'one' => T_('1 Column'),
'two' => T_('2 Columns'),
'three' => T_('3 Columns'),
),
'defaultvalue' => 'one',
),
'pagination_layout' => array(
'label' => T_('Pagination Layout'),
'note' => T_('Select Layout for Pagination'),
'type' => 'select',
'options' => array(
'left' => T_('Left'),
'center' => T_('Centers'),
'right' => T_('Right'),
),
'defaultvalue' => 'center',
),
'posts_title_color' => array(
'label' => T_('Posts Title Color'),
'note' => T_('Default value is').' <code>#555555</code>',
'defaultvalue' => '#555555',
'type' => 'color',
),
'posts_settings_end' => array(
'layout' => 'end_fieldset',
),
// End Single Disp
/**
* ============================================================================
* Tags Layout
* ============================================================================
*/
'tags_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Tags Layout Settings').' (All disps)',
),
'tags_color' => array(
'label' => T_('Tags Text Color'),
'note' => T_('Default value is').' <code>#FFFFFF</code>',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'tags_bg' => array(
'label' => T_('Tags Background Color'),
'note' => T_('Default value is').' <code>#333333</code>',
'defaultvalue' => '#333333',
'type' => 'color',
),
'tags_icon' => array(
'label' => T_('Show Icon Tags'),
'note' => T_('Check to show icon tags.'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'tags_settings_end' => array(
'layout' => 'end_fieldset',
),
// End Single Disp
/**
* ============================================================================
* Single Disp
* ============================================================================
*/
'single_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Single and Page Disp Settings').' (disp=single and disp=page)',
),
// Single Layout
'single_layout' => array(
'label' => T_('Single and Page Layout'),
'note' => '',
'defaultvalue' => 'single_column',
'type' => 'select',
'options' => array(
'single_column' => T_('Single Column Large'),
'single_column_normal' => T_('Single Column'),
'single_column_narrow' => T_('Single Column Narrow'),
'single_column_extra_narrow' => T_('Single Column Extra Narrow'),
'left_sidebar' => T_('Left Sidebar'),
'right_sidebar' => T_('Right Sidebar'),
),
),
'single_settings_end' => array(
'layout' => 'end_fieldset',
),
// End Single Disp
/**
* ============================================================================
* Sidebar Options
* ============================================================================
*/
'sidebar_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Sidebar Settings').' (All disps)',
),
'side_widget_title' => array(
'label' => T_('Widget Title Color'),
'note' => T_('Default value is').' <code>#555555</code>',
'defaultvalue' => '#555555',
'type' => 'color',
),
'side_widget_content' => array(
'label' => T_('Widget Content Color'),
'note' => T_('Default value is').' <code>#6F6F6F</code>',
'defaultvalue' => '#6F6F6F',
'type' => 'color',
),
'side_widget_link' => array(
'label' => T_('Widget Link Color'),
'note' => T_('Default value is').'<strong> Empty</strong>'.T_('. The empty value link color will be follow Color Schemes.'),
'defaultvalue' => '',
'type' => 'color',
'allow_empty' => true,
),
'side_border' => array(
'label' => T_('Widget Border Color'),
'note' => T_('Default value is').' <code>#EEEEEE</code>',
'defaultvalue' => '#EEEEEE',
'type' => 'color',
),
'sidebar_settings_end' => array(
'layout' => 'end_fieldset',
),
// End Single Disp
/* Special Widget Settings (All Disps)
* ========================================================================== */
'uil_widget_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_( 'Special Widget Settings' ).' (All Disps)',
),
'uil_widget_readmore' => array(
'label' => T_( 'List-type Widgets "Read more" button' ),
'note' => T_( 'Check to display the "Read more" button after content on all list-type widgets (Excerpt and Teaser)' ),
'type' => 'checkbox',
'defaultvalue' => 1,
),
'uil_widget_settings_end' => array(
'layout' => 'end_fieldset',
),
/**
* ============================================================================
* Footer Settings
* ============================================================================
*/
'footer_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Footer Settings').' (All disps)',
),
'footer_widget' => array(
'label' => T_('Display Footer Widget'),
'note' => T_('Check to enable footer widget.'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'footer_bg_color' => array(
'label' => T_('Footer Main Background Color'),
'note' => T_('Default value is').' <code>#262626</code>',
'defaultvalue' => '#262626',
'type' => 'color',
),
'footer_widget_title' => array(
'label' => T_('Footer Widget Title Color'),
'note' => T_('Default value is').' <code>#FFFFFF</code>',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'footer_widget_content' => array(
'label' => T_('Footer Widget Content Color'),
'note' => T_('Default value is').' <code>#FFFFFF</code>',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'footer_widget_link' => array(
'label' => T_('Footer Widget Link Color'),
'note' => T_('Default value is ').'<strong>'.T_('Empty').'</strong>.',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'footer_border_color' => array(
'label' => T_('Footer Border Color'),
'note' => T_('Default value is').' <code>#3C3C3C</code>',
'defaultvalue' => '#3C3C3C',
'type' => 'color',
),
'footer_tags_bg' => array(
'label' => T_('Tags Widget Background Color'),
'note' => T_('Default value is'). ' <code>#333333</code>',
'defaultvalue' => '#333333',
'type' => 'color',
),
'footer_user_link' => array(
'label' => T_('Display Footer User Links'),
'note' => T_('Check to enable widget user links.'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'footer_sm_color' => array(
'label' => T_('Social Media Icon Color'),
'note' => T_('Default value is').' <code>#FFFFFF</code>',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'footer_sm_bgcolor' => array(
'label' => T_('Social Media Background Color'),
'note' => T_('Default value is').' <code>#212121</code>',
'defaultvalue' => '#212121',
'type' => 'color',
),
'footer_copyright' => array(
'label' => T_('Display Footer Copyright'),
'note' => T_('Check to display footer copyright.'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'footer_copyright_content' => array(
'label' => T_('Copyright Content Color'),
'note' => T_('Default value is').' <code>#FFFFFF</code>',
'defaultvalue' => '#FFFFFF',
'type' => 'color',
),
'footer_copyright_link' => array(
'label' => T_('Copyright Link Color'),
'note' => T_('Default value is ').'<strong>'.T_('Empty').'</strong>.'.T_('The color follow Color Schemes.'),
'defaultvalue' => '',
'type' => 'color',
'allow_empty' => true,
),
'footer_settings_end' => array(
'layout' => 'end_fieldset',
),
// End Footer Settings
/**
* ============================================================================
* Mediaidx Posts
* ============================================================================
*/
'section_media_start' => array(
'layout' => 'begin_fieldset',
'label' => T_( 'Media Posts Settings' ).' (disp=mediaidx)',
),
// Single Layout
'mediaidx_layout' => array(
'label' => T_('Media Posts Layout'),
'note' => '',
'defaultvalue' => 'single_column',
'type' => 'select',
'options' => array(
'single_column' => T_('Single Column Large'),
'single_column_normal' => T_('Single Column'),
'single_column_narrow' => T_('Single Column Narrow'),
'single_column_extra_narrow' => T_('Single Column Extra Narrow'),
'left_sidebar' => T_('Left Sidebar'),
'right_sidebar' => T_('Right Sidebar'),
),
),
'mediaidx_thumb_size' => array(
'label' => T_('Thumbnail size for media index'),
'note' => '',
'defaultvalue' => 'crop-480x320',
'options' => get_available_thumb_sizes(),
'type' => 'select',
),
'mediaidx_grid' => array(
'label' => T_('Column'),
'note' => '',
'defaultvalue' => 'three_column',
'type' => 'select',
'options' => array(
'one_column' => T_('1 Column'),
'two_column' => T_('2 Column'),
'three_column' => T_('3 Column'),
),
),
'padding_column' => array(
'label' => T_('Padding Image Column'),
'note' => T_('px ( default padding').'15px'.T_(' )'),
'defaultvalue' => '15',
'type' => 'integer',
'allow_empty' => true,
),
'section_media_end' => array(
'layout' => 'end_fieldset',
),
/**
* ============================================================================
* Single Disp
* ============================================================================
*/
'user_settings_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('User Disp Layout').' (All disps)',
),
// Single Layout
'user_layout' => array(
'label' => T_('Page Layout'),
'note' => '',
'defaultvalue' => 'single_column_normal',
'type' => 'select',
'options' => array(
'single_column_normal' => T_('Single Column'),
'left_sidebar' => T_('Left Sidebar'),
'right_sidebar' => T_('Right Sidebar'),
),
),
'user_settings_end' => array(
'layout' => 'end_fieldset',
),
// End Single Disp
/**
* ============================================================================
* Colorbox Image Zoom
* ============================================================================
*/
'section_colorbox_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Colorbox Image Zoom').' (All disps)',
),
'colorbox' => array(
'label' => T_('Colorbox Image Zoom'),
'note' => T_('Check to enable javascript zooming on images (using the colorbox script)'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'colorbox_vote_post' => array(
'label' => T_('Voting on Post Images'),
'note' => T_('Check this to enable AJAX voting buttons in the colorbox zoom view'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'colorbox_vote_post_numbers' => array(
'label' => T_('Display Votes'),
'note' => T_('Check to display number of likes and dislikes'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'colorbox_vote_comment' => array(
'label' => T_('Voting on Comment Images'),
'note' => T_('Check this to enable AJAX voting buttons in the colorbox zoom view'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'colorbox_vote_comment_numbers' => array(
'label' => T_('Display Votes'),
'note' => T_('Check to display number of likes and dislikes'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'colorbox_vote_user' => array(
'label' => T_('Voting on User Images'),
'note' => T_('Check this to enable AJAX voting buttons in the colorbox zoom view'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'colorbox_vote_user_numbers' => array(
'label' => T_('Display Votes'),
'note' => T_('Check to display number of likes and dislikes'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'section_colorbox_end' => array(
'layout' => 'end_fieldset',
),
'section_username_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('Username options').' (All disp)',
),
'gender_colored' => array(
'label' => T_('Display gender'),
'note' => T_('Use colored usernames to differentiate men & women.'),
'defaultvalue' => 0,
'type' => 'checkbox',
),
'bubbletip' => array(
'label' => T_('Username bubble tips'),
'note' => T_('Check to enable bubble tips on usernames'),
'defaultvalue' => 0,
'type' => 'checkbox',
),
'autocomplete_usernames' => array(
'label' => T_('Autocomplete usernames'),
'note' => T_('Check to enable auto-completion of usernames entered after a "@" sign in the comment forms'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'section_username_end' => array(
'layout' => 'end_fieldset',
),
'section_access_start' => array(
'layout' => 'begin_fieldset',
'label' => T_('When access is denied or requires login').' (disp=access_denied and disp=access_requires_login)',
),
'access_login_containers' => array(
'label' => T_('Display on login screen'),
'note' => '',
'type' => 'checklist',
'options' => array(
array( 'header', sprintf( T_('"%s" container'), NT_('Header') ), 1 ),
array( 'sidebar', sprintf( T_('"%s" container'), NT_('Sidebar') ), 0 ),
array( 'footer', sprintf( T_('"%s" container'), NT_('Footer') ), 1 ) ),
),
'section_access_end' => array(
'layout' => 'end_fieldset',
),
), parent::get_param_definitions( $params ) );
return $r;
}
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
global $Messages, $debug, $disp;
// Request some common features that the parent function (Skin::display_init()) knows how to provide:
parent::display_init( array(
'jquery', // Load jQuery
'font_awesome', // Load Font Awesome (and use its icons as a priority over the Bootstrap glyphicons)
'bootstrap', // Load Bootstrap (without 'bootstrap_theme_css')
'bootstrap_evo_css', // Load the b2evo_base styles for Bootstrap (instead of the old b2evo_base styles)
'bootstrap_messages', // Initialize $Messages Class to use Bootstrap styles
'style_css', // Load the style.css file of the current skin
'colorbox', // Load Colorbox (a lightweight Lightbox alternative + customizations for b2evo)
'bootstrap_init_tooltips', // Inline JS to init Bootstrap tooltips (E.g. on comment form for allowed file extensions)
'disp_auto', // Automatically include additional CSS and/or JS required by certain disps (replace with 'disp_off' to disable this)
) );
// Include Masonry Grind for MediaIdx
if ( $disp == 'mediaidx' || $disp == 'posts' ) {
require_js( 'assets/js/masonry.pkgd.min.js', 'relative' );
require_js( 'assets/js/imagesloaded.pkgd.min.js', 'relative');
}
if( $disp == 'posts' ) {
add_js_headline("
jQuery( document ).ready( function($) {
$('.main_item_posts').imagesLoaded().done( function( instance ) {
$('.main_item_posts').masonry({
// options
itemSelector: '.item_posts',
percentPosition: true,
});
});
});
");
}
if ( $disp == 'mediaidx' ) {
add_js_headline("
jQuery( document ).ready( function($) {
$('.evo_image_index').imagesLoaded().done( function( instance ) {
$('.evo_image_index').masonry({
// options
itemSelector: '.grid-item',
percentPosition: true,
});
});
});
");
}
require_js( 'assets/js/script.js', 'relative' );
// Skin specific initializations:
// Limit images by max height:
$max_image_height = intval( $this->get_setting( 'max_image_height' ) );
if( $max_image_height > 0 )
{
add_css_headline( '.evo_image_block img { max-height: '.$max_image_height.'px; width: auto; }' );
}
// Skin specific initializations:
// Add custom CSS:
$custom_css = '';
/**
* ============================================================================
* General Settings Output
* ============================================================================
*/
if ( $color = $this->get_setting( 'color_schemes' ) ) {
// General
$custom_css .= '
a, a:hover, a:active, a:focus,
.disp_search #main-content .search_result .search_content_wrap .search_title a:hover, .disp_search #main-content .search_result .search_content_wrap .search_title a:active, .disp_search #main-content .search_result .search_content_wrap .search_title a:focus,
.widget_plugin_evo_Calr .bCalendarTable tfoot a:hover, #main-content .evo_post .small.text-muted a:hover span, #main-content .evo_featured_post .small.text-muted a:hover span
{ color: '.$color.'; }
/* Header */
.navbar-collapse .nav.nav-tabs li a::after, .navbar-collapse ul li.active a
{ background-color: '.$color.'; }
/* Posts */
#content .evo_post_title h2 a:hover,
#main-content .evo_post .small.text-muted a:hover, #main-content .evo_featured_post .small.text-muted a:hover,
.disp_search #main-content .search_result .search_result_score.dimmed
{ color: '.$color.'; }
#main-content .evo_intro_post, #main-content .featurepost,
.pagination > .active > span, .pagination > .active > span:hover, .pagination > li > a:hover,
#main-content .post_tags a:hover, #main-content .post_tags a:active, #main-content .post_tags a:focus,
#main-content .evo_post .evo_post__full .evo_post_more_link a:hover, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:hover, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:hover, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:hover, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:hover, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:hover, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:hover, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:hover, #main-content .evo_post .evo_post__full .evo_post_more_link a:active, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:active, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:active, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:active, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:active, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:active, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:active, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:active, #main-content .evo_post .evo_post__full .evo_post_more_link a:focus, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:focus, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:focus, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:focus, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:focus, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:focus, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:focus, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:focus,
.disp_front #main-content .widget_core_coll_featured_intro .jumbotron,
.disp_front #main-content .widget_core_poll .btn-default.active, .disp_front #main-content .widget_core_poll .btn-default.focus, .disp_front #main-content .widget_core_poll .btn-default:active, .disp_front #main-content .widget_core_poll .btn-default:focus, .disp_front #main-content .widget_core_poll .btn-default:hover, .disp_front #main-content .widget_core_poll .open > .dropdown-toggle.btn-default,
.disp_search #main-content .search_result .search_result_score.dimmed::after,
.disp_threads #main-content .SaveButton.btn-primary, .disp_messages #main-content .SaveButton.btn-primary, .disp_contacts #main-content .SaveButton.btn-primary,
.disp_contacts .form_send_contacts .btn-default:hover, .disp_contacts .form_send_contacts .btn-default:active, .disp_contacts .form_send_contacts .btn-default:focus,
.filters .btn-info,
.disp_threads #main-content .results .action_icon.btn-primary, .disp_messages #main-content .results .action_icon.btn-primary, .disp_contacts #main-content .results .action_icon.btn-primary,
.btn-success, .pagination li.active a:hover, .pagination li.active span:hover, .pagination li.active a:active, .pagination li.active span:active, .pagination li.active a:focus, .pagination li.active span:focus, .pagination li.active a, .pagination li.active span, .pagination li a:hover, .pagination li span:hover, .pagination li a:active, .pagination li span:active, .pagination li a:focus, .pagination li span:focus,
.disp_profile #main-content .profile_tabs li.active a, .disp_avatar #main-content .profile_tabs li.active a, .disp_pwdchange #main-content .profile_tabs li.active a, .disp_userprefs #main-content .profile_tabs li.active a, .disp_subs #main-content .profile_tabs li.active a,
.disp_profile #main-content .profile_tabs a:hover, .disp_avatar #main-content .profile_tabs a:hover, .disp_pwdchange #main-content .profile_tabs a:hover, .disp_userprefs #main-content .profile_tabs a:hover, .disp_subs #main-content .profile_tabs a:hover, .disp_profile #main-content .profile_tabs a:active, .disp_avatar #main-content .profile_tabs a:active, .disp_pwdchange #main-content .profile_tabs a:active, .disp_userprefs #main-content .profile_tabs a:active, .disp_subs #main-content .profile_tabs a:active, .disp_profile #main-content .profile_tabs a:focus, .disp_avatar #main-content .profile_tabs a:focus, .disp_pwdchange #main-content .profile_tabs a:focus, .disp_userprefs #main-content .profile_tabs a:focus, .disp_subs #main-content .profile_tabs a:focus,
.disp_profile #main-content .evo_form .panel-heading, .disp_avatar #main-content .evo_form .panel-heading, .disp_pwdchange #main-content .evo_form .panel-heading, .disp_userprefs #main-content .evo_form .panel-heading, .disp_subs #main-content .evo_form .panel-heading,
.evo_panel__login .btn.btn-success, .evo_panel__lostpass .btn.btn-success, .evo_panel__register .btn.btn-success, .evo_panel__activation .btn.btn-success,
.disp_edit #item_checkchanges .panel .panel-heading
{ background-color: '.$color.'; }
.disp_front #main-content .widget_core_poll .btn-default.active, .disp_front #main-content .widget_core_poll .btn-default.focus, .disp_front #main-content .widget_core_poll .btn-default:active, .disp_front #main-content .widget_core_poll .btn-default:focus, .disp_front #main-content .widget_core_poll .btn-default:hover, .disp_front #main-content .widget_core_poll .open > .dropdown-toggle.btn-default,
.disp_search #main-content .search_result .search_result_score.dimmed,
.disp_threads #main-content .SaveButton.btn-primary, .disp_messages #main-content .SaveButton.btn-primary, .disp_contacts #main-content .SaveButton.btn-primary,
.disp_contacts .form_send_contacts .btn-default:hover, .disp_contacts .form_send_contacts .btn-default:active, .disp_contacts .form_send_contacts .btn-default:focus,
.filters .btn-info,
.disp_threads #main-content .results .action_icon.btn-primary, .disp_messages #main-content .results .action_icon.btn-primary, .disp_contacts #main-content .results .action_icon.btn-primary,
.disp_threads #main-content .evo_form__thread input:focus, .disp_messages #main-content .evo_form__thread input:focus, .disp_contacts #main-content .evo_form__thread input:focus, .disp_threads #main-content .evo_form__thread textarea:focus, .disp_messages #main-content .evo_form__thread textarea:focus, .disp_contacts #main-content .evo_form__thread textarea:focus,
.btn-success, .pagination li.active a:hover, .pagination li.active span:hover, .pagination li.active a:active, .pagination li.active span:active, .pagination li.active a:focus, .pagination li.active span:focus, .disp_msgform #main-content .form_text_input:hover, .disp_msgform #main-content .form_textarea_input:hover, .disp_msgform #main-content .form_text_input:active, .disp_msgform #main-content .form_textarea_input:active, .disp_msgform #main-content .form_text_input:focus, .disp_msgform #main-content .form_textarea_input:focus,
.disp_profile #main-content .evo_form .panel-body .form-control:hover, .disp_avatar #main-content .evo_form .panel-body .form-control:hover, .disp_pwdchange #main-content .evo_form .panel-body .form-control:hover, .disp_userprefs #main-content .evo_form .panel-body .form-control:hover, .disp_subs #main-content .evo_form .panel-body .form-control:hover, .disp_profile #main-content .evo_form .panel-body .form-control:active, .disp_avatar #main-content .evo_form .panel-body .form-control:active, .disp_pwdchange #main-content .evo_form .panel-body .form-control:active, .disp_userprefs #main-content .evo_form .panel-body .form-control:active, .disp_subs #main-content .evo_form .panel-body .form-control:active, .disp_profile #main-content .evo_form .panel-body .form-control:focus, .disp_avatar #main-content .evo_form .panel-body .form-control:focus, .disp_pwdchange #main-content .evo_form .panel-body .form-control:focus, .disp_userprefs #main-content .evo_form .panel-body .form-control:focus, .disp_subs #main-content .evo_form .panel-body .form-control:focus,
#login_form input:focus:invalid:focus, #login_form select:focus:invalid:focus, #login_form textarea:focus:invalid:focus, .evo_panel__login .btn.btn-success, .evo_panel__lostpass .btn.btn-success, .evo_panel__register .btn.btn-success, .evo_panel__activation .btn.btn-success, .form-control:focus,
.disp_edit #item_checkchanges .panel
{ border-color: '.$color.'; }
.disp_posts #content .evo_featured_post
{ border-left-color: '.$color.'; }
/* Sidebar - Widget - Single */
.evo_widget a:hover, .evo_widget a:active, .evo_widget a:focus,
#main-footer .main_widget a:hover, #main-footer .main_widget a:active, #main-footer .main_widget a:focus,
.evo_comment .evo_comment_info .delete_link:hover, .evo_comment__preview .evo_comment_info .delete_link:hover, .evo_comment .evo_comment_info .edit_link:hover, .evo_comment__preview .evo_comment_info .edit_link:hover, .evo_comment .evo_comment_info .delete_link:active, .evo_comment__preview .evo_comment_info .delete_link:active, .evo_comment .evo_comment_info .edit_link:active, .evo_comment__preview .evo_comment_info .edit_link:active, .evo_comment .evo_comment_info .delete_link:focus, .evo_comment__preview .evo_comment_info .delete_link:focus, .evo_comment .evo_comment_info .edit_link:focus, .evo_comment__preview .evo_comment_info .edit_link:focus,
.disp_comments #main-content .evo_comment .evo_comment_title.first a,
.evo_comment .evo_comment_title a:hover, .evo_comment__preview .evo_comment_title a:hover
{ color: '.$color.'; }
.widget_core_coll_search_form .search .search_submit,
.tag_cloud a:hover, .tag_cloud a:active, .tag_cloud a:focus,
.widget_plugin_evo_Calr .bCalendarTable #bCalendarToday,
#main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:hover, #main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:active, #main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:focus,
.bt-top:hover, .bt-top:focus, .bt-top:active,
.disp_single #feedbacks .evo_comment__meta_info a:hover, .disp_page #feedbacks .evo_comment__meta_info a:hover,
#comment_form .evo_form .submit,
#comment_form .evo_form .preview:hover, #comment_form .evo_form .preview:focus, #comment_form .evo_form .preview:active,
.widget_core_user_login .submit:hover, .widget_core_user_register .submit:hover,
.disp_single #main-content .pager .previous a::before, .disp_page #main-content .pager .previous a::before, .disp_single #main-content .pager .next a::before, .disp_page #main-content .pager .next a::before,
.evo_post_comment_notification .btn:hover, .evo_post_comment_notification .btn:active, .evo_post_comment_notification .btn:focus,
.disp_threads #main-content .submit, .disp_messages #main-content .submit, .disp_contacts #main-content .submit, .disp_msgform #main-content .submit,
.disp_user #main-content .pager a:hover, .disp_user #main-content .pager a:focus, .disp_user #main-content .pager a:active
{ background-color: '.$color.'; }
.widget_core_coll_search_form .search .search_field,
.widget_core_coll_search_form .search .search_submit,
.bt-top:hover, .bt-top:focus, .bt-top:active,
.disp_single #feedbacks .evo_comment__meta_info a:hover, .disp_page #feedbacks .evo_comment__meta_info a:hover,
#comment_form .evo_form .form_text_input:focus, #comment_form .evo_form .form_textarea_input:focus,
#comment_form .evo_form .submit,
#comment_form .evo_form .preview:hover, #comment_form .evo_form .preview:focus, #comment_form .evo_form .preview:active,
.widget_core_user_login .submit:hover, .widget_core_user_register .submit:hover,
.disp_single #main-content .pager .previous a:hover, .disp_page #main-content .pager .previous a:hover, .disp_single #main-content .pager .next a:hover, .disp_page #main-content .pager .next a:hover,
.evo_post_comment_notification .btn:hover, .evo_post_comment_notification .btn:active, .evo_post_comment_notification .btn:focus,
.disp_threads #main-content .submit, .disp_messages #main-content .submit, .disp_contacts #main-content .submit, .disp_msgform #main-content .submit
{ border-color: '.$color.'; }
';
}
// Site Background
if ( $this->get_setting( 'background_type' ) == 'color' ) {
$color = $this->get_setting( 'site_background_color' );
$custom_css .= '#skin_wrapper {background-color: '.$color.';}';
}
$bg_image = $this->get_setting( 'bg_image' );
if ( $this->get_setting( 'background_type' ) == 'images' && $bg_image ) {
if($bg_image == "none") {
$custom_css .= "#skin_wrapper { background: transparent; }";
} else {
$custom_css .= "#skin_wrapper { background-image: url('".$bg_image."');}";
}
}
// User custom bg images setting
$bg_image_custom = $this->get_setting( 'bg_image_custom' );
if ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom ) {
if($bg_image_custom == "none")
{
$custom_css .= "#skin_wrapper { background: transparent; }";
} else {
$custom_css .= "#skin_wrapper { background-image: url('".$bg_image_custom."');}";
}
}
$bg_image_custom_attach = $this->get_setting( 'bg_image_custom_attach' );
if ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom_attach ) {
if ( $bg_image_custom_attach == 'initial' ) {
$custom_css .= "#skin_wrapper { background-attachment: initial; }";
} else {
$custom_css .= "#skin_wrapper { background-attachment: fixed; }";
}
}
$bg_image_custom_size = $this->get_setting( 'bg_image_custom_size' );
if ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom_size ) {
if ( $bg_image_custom_size == 'auto' ) {