You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -56,6 +49,20 @@ class SetupCommand extends Command {
56
49
*/
57
50
protected$chatConfig;
58
51
52
+
/**
53
+
* An object containing the forum config details
54
+
*
55
+
* @var string[]
56
+
*/
57
+
protected$forumDetails;
58
+
59
+
/**
60
+
* An object containing the steam config details
61
+
*
62
+
* @var string[]
63
+
*/
64
+
protected$steamDetails;
65
+
59
66
/**
60
67
* The output stream for any artisan commands
61
68
*
@@ -72,9 +79,11 @@ public function __construct()
72
79
{
73
80
parent::__construct();
74
81
75
-
$this->coreDetails = newstdClass();
76
-
$this->chatDetails = newstdClass();
77
-
$this->stream = fopen('php://output', 'w');
82
+
$this->coreDetails = newstdClass();
83
+
$this->chatDetails = newstdClass();
84
+
$this->forumDetails = newstdClass();
85
+
$this->steamDetails = newstdClass();
86
+
$this->stream = fopen('php://output', 'w');
78
87
}
79
88
80
89
/**
@@ -119,6 +128,22 @@ protected function confirmConfig($type)
119
128
return$this->configureChat();
120
129
}
121
130
break;
131
+
case'forum':
132
+
$this->line($this->forumDetails ."\n");
133
+
if (!$this->confirm('Do you want to keep this configuration? [yes|no]')) {
134
+
return$this->setUpForum();
135
+
} else {
136
+
return$this->configureForum();
137
+
}
138
+
break;
139
+
case'steam':
140
+
$this->line($this->steamDetails ."\n");
141
+
if (!$this->confirm('Do you want to keep this configuration? [yes|no]')) {
142
+
return$this->setUpSteam();
143
+
} else {
144
+
return$this->configureSteam();
145
+
}
146
+
break;
122
147
}
123
148
}
124
149
@@ -156,13 +181,19 @@ protected function setUpSyntax($package)
156
181
case'chat':
157
182
return$this->setUpChat();
158
183
break;
184
+
case'forum':
185
+
return$this->setUpForum();
186
+
break;
187
+
case'steam-api':
188
+
return$this->setUpSteam();
189
+
break;
159
190
}
160
191
}
161
192
162
193
protectedfunctionsetUpCore()
163
194
{
164
195
// Set up our syntax config
165
-
$this->comment('Setting up syntax details...');
196
+
$this->comment('Setting up core details...');
166
197
$this->coreDetails->controlRoomDetail = $this->ask('What is this site\'s control room name?');
167
198
$this->coreDetails->siteName = $this->ask('What is this name to display for this site?');
168
199
$this->coreDetails->siteIcon = $this->ask('What is this icon to display for this site? (Use tha last part of the font-awesome icon class)');
@@ -174,7 +205,7 @@ protected function setUpCore()
174
205
protectedfunctionsetUpChat()
175
206
{
176
207
// Set up our syntax config
177
-
$this->comment('Setting up syntax details...');
208
+
$this->comment('Setting up chat details...');
178
209
$this->chatDetails->debug = $this->confirm('Should the chats show debug info? [Hit enter to leave as true]', true) ? true : false;
179
210
$this->chatDetails->port = $this->ask('What is the chat port? [Hit enter to leave as 1337]', 1337);
180
211
$this->chatDetails->backLog = $this->ask('How much back log should the chats get? [Hit enter to leave as 100]', 100);
@@ -187,6 +218,28 @@ protected function setUpChat()
187
218
$this->confirmConfig('chat');
188
219
}
189
220
221
+
protectedfunctionsetUpForum()
222
+
{
223
+
// Set up our syntax config
224
+
$this->comment('Setting up forum details...');
225
+
$this->forumDetails->forumNews = $this->confirm('Will this site use forum posts on the front page? [Hit enter to leave as true]', true) ? true : false;
226
+
227
+
$this->confirmConfig('forum');
228
+
}
229
+
230
+
protectedfunctionsetUpSteam()
231
+
{
232
+
// Set up our syntax config
233
+
$this->comment('Setting up steam api details...');
234
+
$this->steamDetails->steamApiKey = $this->ask('What is your steam api key?');
235
+
236
+
while ($this->steamDetails->steamApiKey == null) {
237
+
$this->steamDetails->steamApiKey = $this->ask('This cannot be empty. What is your steam api key?');
0 commit comments