-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathCmsSettingsSeeder.php
More file actions
265 lines (261 loc) · 8.36 KB
/
CmsSettingsSeeder.php
File metadata and controls
265 lines (261 loc) · 8.36 KB
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
<?php
namespace Database\Seeders;
use App\Models\CmsSetting;
use Illuminate\Database\Seeder;
class CmsSettingsSeeder extends Seeder
{
/**
* The default settings.
* **Order: [key, value, comment]**
*
* @var array
*/
public function getDefaultSettings(): array
{
return [
[
'hotel_name',
'Habbo',
'The name of the hotel'
],
[
'default_cms_mode',
'light',
'Determines the default CMS mode (dark/light)'
],
[
'start_credits',
'50000',
'The amount of credits a user starts with'
],
[
'start_duckets',
'10000',
'The amount of duckets a user starts with'
],
[
'start_diamonds',
'0',
'The amount of diamonds a user starts with'
],
[
'start_points',
'0',
'The amount of points a user starts with'
],
[
'start_motto',
'I love to play Habbo hotel.',
'The default motto a user starts with'
],
[
'figure_imager',
'https://www.habbo.com/habbo-imaging/avatarimage?figure=',
'The imager base URL to render the user look on the CMS (by figure)'
],
[
'username_imager',
'/api/avatar/',
'The imager base URL to render the user look on the CMS (by username)'
],
[
'start_female_look',
'hr-540-45-61.hd-600-1-.ch-665-1408-61.lg-720-72-61.sh-730-1408-61',
'The default look a female user starts with'
],
[
'start_male_look',
'hr-3090-42-61.hd-180-10-61.ch-804-82-61.lg-281-1408-61.sh-295-80-61',
'The default look a male user starts with'
],
[
'discord_invite',
'https://discord.com/invite/Kb7USXupCT',
'The Discord invite link to show on the CMS'
],
[
'facebook_link',
'https://www.facebook.com/',
'The Facebook link to show on the CMS'
],
[
'twitter_link',
'https://twitter.com/',
'The Twitter link to show on the CMS'
],
[
'instagram_link',
'https://www.instagram.com/',
'The Instagram link to show on the CMS'
],
[
'disable_registrations',
'0',
'Disable CMS user registrations'
],
[
'beta_period',
'0',
'Determines if the hotel is in the beta testing period'
],
[
'discord_widget_id',
'1099836667780665364',
'Hotel Discord Server ID Widget'
],
[
'register_username_regex',
'/^[a-zA-Z0-9_.-]+$/u',
'Determines which characters can be used in the username field when registering'
],
[
'maintenance',
'0',
'Determines the hotel maintenance (0 disabled, 1 enabled)'
],
[
'min_rank_to_maintenance_login',
'5',
'Minimum rank to login during maintenance'
],
[
'maintenance_reason',
'Habbo is under maintenance and will undergo some improvements.',
'Maintenance Reason (showed on the maintenance page)'
],
[
'max_accounts_per_ip',
'4',
'The maximum number of accounts allowed per IP.'
],
[
'vpn_protection',
'1',
'Enables protection against BOTs and VPN hosting services'
],
[
'start_room_id',
'0',
'The default room a user starts with'
],
[
'rcon_ip',
'127.0.0.1',
'RCON Server IP to send RCON commands'
],
[
'rcon_port',
'3001',
'RCON Server PORT to send RCON commands'
],
[
'min_rank_to_housekeeping_login',
'4',
'Minimum rank to login into housekeeping'
],
[
'badges_path',
'https://images.habbo.com/c_images/album1584/',
'The base URL to render the badges on the CMS'
],
[
'min_list_rank',
'4',
'The minimum rank to show on CMS lists (Eg. rankings, staff pages)'
],
[
'group_badges_path',
'https://images.habbo.com/c_images/groups/',
'The base URL to render the group badges on the CMS'
],
[
'min_rank_to_view_client_errors',
'7',
'The minimum rank to visualize client errors'
],
[
'default_avatar_background',
'https://i.imgur.com/wP1rnDY.gif',
'The default avatar background to show on the CMS'
],
[
'furniture_icon_path',
'https://localhost/static/dcr/hof_furni/icons/',
'The base URL to render the furniture icons on the CMS'
],
[
'hk_top_navigation_enabled',
'0',
'Determines whether panel navigations should be on the side or top'
],
[
'header_background_image',
'https://i.imgur.com/XLnDlUr.png',
'The header background image to show on the CMS. Recommended size: 1920x340'
],
[
'logo_image',
'https://i.imgur.com/ZqE16Ph.png',
'The logo image to show on the CMS'
],
[
'logo_size',
'263x59',
"Your logo size. Format: WIDTHxHEIGHT (without px). Example: 263x59"
],
[
'findretros_enabled',
'0',
'Determines if the FindRetros voting system is enabled'
],
[
'findretros_name',
'Habbo',
'Your hotel name on the FindRetros voting system'
],
[
'min_rank_to_bypass_findretros_vote',
'5',
'The minimum rank to bypass the FindRetros vote'
],
[
'vpn_checker_enabled',
'0',
'Determines if the VPN checker is enabled'
],
[
'min_rank_to_bypass_vpn_checker',
'5',
'The minimum rank to bypass the VPN checker'
],
[
'vpn_threat_data_fields',
'is_anonymous,is_known_attacker,is_known_abuser,is_threat,is_bogon,is_tor,is_vpn',
'The VPN threat data fields to be validated in the VPN scanner. (comma separated without spaces)'
],
[
'using_nitro_imager',
'0',
'Determines if the hotel is using the Nitro imager'
],
[
'force_housekeeping_two_factor',
'1',
'Determines if the staff should be forced to use two-factor authentication to login into the housekeeping'
]
];
}
/**
* Run the database seeds.
*/
public function run(): void
{
foreach($this->getDefaultSettings() as $setting) {
[$key, $value, $comment] = $setting;
CmsSetting::firstOrCreate(['key' => $key], [
'value' => $value,
'comment' => $comment
]);
}
}
}