Configuration
Configuring the config.php file
Firstly, find the config.php file within the File Manager. Right-click, and click Edit.
1 - Base URL
On line 7, you will find:
You need to replace the domain with your domain, where you want your players to access the CAD from. For example, https://cad.hamzcad.com - please ensure you do not put a slash /
at the end of the domain.
2 - MySQL Database
On line 9, you will find:
If you're using SimplisticNode, you can keep the DB_HOST
as localhost
, however, if you're using a third party, confirm with them what their host needs to be.
IMPORTANT: If you are using cPanel web hosting, ensure you put the full username and database user/name. Example: coobikxy_cad
Next, enter your MySQL database info in the table. If you haven't already created one, click here to be taken to that documentation.
3 - Discord OAuth
On line 15, you will find:
Similar to the MySQL Database information above, enter your Discord bot information as per your Developer portal.
Token - This is your Bot token, found within Discord Developers > Bot > Token
Guild ID - Ensure you have Developer mode turned on in Discord, right-click the server icon, click Copy Server ID, and paste it into the table.
OAuth Client ID - This is your Bot token, found within Discord Developers > OAuth2 > General > Client ID
OAuth Client Secret - This is your Bot token, found within Discord Developers > OAuth2 > General > Client Secret
Whilst we're here, you can also go ahead and add your Redirect link for the CAD.
Click Add Redirect on the OAuth2 page
In the URL box, using the Base URL above, copy that link but add the following to it:
So, once it's fully put together it'll look like https://cad.hamzcad.com/actions/register.php
4 - Discord Admin Permissions
Replace RoleIDHERE
with a Discord Role ID which will be granted full administrator access.
5 - Discord Logs
Replace CHANNELID
with the Channel ID to which you want that specific log to report. Please ensure the bot you previously created has the ability to view and type in that channel.
6 - General Settings
7 - 10 Codes
Enter your community's 10 codes that fit your server. Please make sure to keep the format.
"10Code | Explination" => "#HEXColour"
Example: "10-11 | Traffic Stop" => "#FF0000"
9 - Fire & EMS Apparatus
Ensure to keep the same format.
10 - LEO Statuses
Ensure to keep the same format.
11 - Fire & EMS Statuses
Ensure to keep the same format.
12 - Servers
Configure your server information, here. Please ensure it's correct as it can produce slowness on the CAD system performance if incorrect.
13 - Colouring
14 - API Key
define('SECRET_KEY', 'apitest123'); // Used in some API's
Replace apitest123 with any key you want, this can include letters and numbers.
Last updated