/
SpotTemplateHelper_We1rdo.php
169 lines (152 loc) · 6.38 KB
/
SpotTemplateHelper_We1rdo.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
<?php
class SpotTemplateHelper_We1rdo extends SpotTemplateHelper
{
/*
* Return a list of preferences specific for this template.
*
* When a user changes their template, and changes their
* preferences these settings are lost.
*
* Settings you want to be able to set must always be
* present in this array with a sane default value, else
* the setting will not be saved.
*/
public function getTemplatePreferences()
{
return ['we1rdo' => ['example_setting' => 1],
];
}
// getTemplatePreferences
public function cat2CssClass($spot)
{
$categoryCss = 'spotcat'.$spot['category'];
if (!empty($spot['subcatz'])) {
$categoryCss .= ' spotcat'.$spot['category'].'_'.substr($spot['subcatz'], 0, -1);
} // if
return $categoryCss;
}
// cat2CssClass
public function filter2cat($s)
{
$cat = 0;
if (stripos($s, 'cat0') !== false) {
return 'spotcat0';
} elseif (stripos($s, 'cat1') !== false) {
return 'spotcat1';
} elseif (stripos($s, 'cat2') !== false) {
return 'spotcat2';
} elseif (stripos($s, 'cat3') !== false) {
return 'spotcat3';
} // else
return 'N/A';
}
// filter2cat
public function getFilterIcons()
{
return [
'application' => _('Application'),
'bluray' => _('Blu-Ray'),
'book' => _('Book'),
'controller' => _('Game'),
'custom' => _('Plain'),
'divx' => _('DivX'),
'female' => _('Erotica'),
'film' => _('Movie'),
'hd' => _('HD'),
'ipod' => _('iPod'),
'linux' => _('Linux'),
'apple' => _('Apple'),
'mpg' => _('MPEG'),
'music' => _('Music'),
'nintendo_ds' => _('Nintendo DS'),
'nintendo_wii' => _('Nintendo Wii'),
'phone' => _('Phone'),
'picture' => _('Picture'),
'playstation' => _('Playstation'),
'tv' => _('TV'),
'vista' => _('Vista'),
'windows' => _('Windows'),
'wmv' => _('WMV'),
'xbox' => _('Xbox'),
'dvd' => _('DVD'),
'pda' => _('PDA'),
];
}
// getFilterIconList
public function getSmileyList()
{
return ['biggrin' => 'templates/we1rdo/smileys/biggrin.gif',
'bloos' => 'templates/we1rdo/smileys/bloos.gif',
'buigen' => 'templates/we1rdo/smileys/buigen.gif',
'censored' => 'templates/we1rdo/smileys/censored.gif',
'clown' => 'templates/we1rdo/smileys/clown.gif',
'confused' => 'templates/we1rdo/smileys/confused.gif',
'cool' => 'templates/we1rdo/smileys/cool.gif',
'exactly' => 'templates/we1rdo/smileys/exactly.gif',
'frown' => 'templates/we1rdo/smileys/frown.gif',
'grijns' => 'templates/we1rdo/smileys/grijns.gif',
'heh' => 'templates/we1rdo/smileys/heh.gif',
'huh' => 'templates/we1rdo/smileys/huh.gif',
'klappen' => 'templates/we1rdo/smileys/klappen.gif',
'knipoog' => 'templates/we1rdo/smileys/knipoog.gif',
'kwijl' => 'templates/we1rdo/smileys/kwijl.gif',
'lollig' => 'templates/we1rdo/smileys/lollig.gif',
'maf' => 'templates/we1rdo/smileys/maf.gif',
'ogen' => 'templates/we1rdo/smileys/ogen.gif',
'oops' => 'templates/we1rdo/smileys/oops.gif',
'pijl' => 'templates/we1rdo/smileys/pijl.gif',
'redface' => 'templates/we1rdo/smileys/redface.gif',
'respekt' => 'templates/we1rdo/smileys/respekt.gif',
'schater' => 'templates/we1rdo/smileys/schater.gif',
'shiny' => 'templates/we1rdo/smileys/shiny.gif',
'sleephappy' => 'templates/we1rdo/smileys/sleephappy.gif',
'smile' => 'templates/we1rdo/smileys/smile.gif',
'uitroepteken' => 'templates/we1rdo/smileys/uitroepteken.gif',
'vlag' => 'templates/we1rdo/smileys/vlag.gif',
'vraagteken' => 'templates/we1rdo/smileys/vraagteken.gif',
'wink' => 'templates/we1rdo/smileys/wink.gif', ];
}
// getSmileyList
// Geeft een lijst van onze static files terug die door de static page gelezen wordt
public function getStaticFiles($type)
{
switch ($type) {
case 'js':
return ['js/jquery/jquery.min.js',
'js/jquery/jquery-ui.custom.min.js',
'js/jquery/jquery.cookie.js',
'js/jquery/jquery.hotkeys.js',
'js/jquery/jquery.form.js',
'js/jquery-json/jquery.json-2.3.js',
'js/sha1/jquery.sha1.js',
'templates/we1rdo/js/jquery.address.js',
'js/posting/posting.js',
'js/dynatree/jquery.dynatree.min.js',
'templates/we1rdo/js/scripts.js',
'templates/we1rdo/js/spotdialogs.js',
'templates/we1rdo/js/sabpanel.js',
'templates/we1rdo/js/we1rdopost.js',
'templates/we1rdo/js/treehelper.js',
'templates/we1rdo/js/jquery.ui.nestedSortable.js',
'templates/we1rdo/js/jquery.tipTip.minified.js',
];
break;
// case js
case 'css':
return ['js/dynatree/skin-vista/ui.dynatree.css',
'templates/we1rdo/css/jquery-ui-1.8.23.custom.css',
'templates/we1rdo/css/spoticons.css',
'templates/we1rdo/css/style.css',
'templates/we1rdo/css/tipTip.css',
];
break;
// case css
case 'ico':
return ['images/favicon.ico'];
break;
// case 'ico'
} // switch
return [];
}
// getStaticFiles
} // class We1rdoTemplateHelper