-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_skin.class.php
120 lines (110 loc) · 3.02 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
<?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 pixel
*
* @version $Id: _skin.class.php,v 1.3 2009/05/24 21:14:38 fplanque Exp $
*/
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 pixel_Skin extends Skin
{
var $version = '1.1.1';
/**
* Get default name for the skin.
* Note: the admin can customize it.
*/
function get_default_name()
{
return 'Pixel Skin';
}
/**
* Get default type for the skin.
*/
function get_default_type()
{
return 'normal';
}
/**
* Get definitions for editable params
*
* @see Plugin::GetDefaultSettings()
* @param local params like 'for_editing' => true
*/
function get_param_definitions( $params )
{
$r = array_merge( array(
'colorbox' => array(
'label' => T_('Colorbox Image Zoom'),
'note' => T_('Check to enable javascript zooming on images (using the colorbox script)'),
'defaultvalue' => 1,
'type' => 'checkbox',
),
'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',
),
'html5_support' => array(
'label' => T_('HTML5'),
'defaultvalue' => '1',
'note' => 'activate HTML5 support across all browsers (as of 08/08/2009)',
'type' => 'checkbox'
),
), parent::get_param_definitions( $params ) );
return $r;
}
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
// call parent:
parent::display_init();
// Add CSS:
require_css( 'basic_styles.css', 'blog' ); // the REAL basic styles
require_css( 'basic.css', 'blog' ); // Basic styles
require_css( 'blog_base.css', 'blog' ); // Default styles for the blog navigation
require_css( 'item_base.css', 'blog' ); // Default styles for the post CONTENT
require_css( 'rsc/css/item.css', 'relative' );
require_css( 'rsc/css/style.css', 'relative' );
// Add custom CSS:
$custom_css = '';
$html5support = '';
if( $this->get_setting('html5_support') == '1' )
{ // HTML5 Support
$html5support .= '
<!--[if IE]>
<script src="rsc/js/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="rsc/css/html5.css" type="text/css" />
';
}
$custom_css = ''.$html5support."\n";
add_headline( $custom_css );
// Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images:
if( $this->get_setting("colorbox") )
{
require_js_helper( 'colorbox', 'blog' );
}
}
}
?>