Hamz Docs
Search
⌃K

Configuration

Step 1 - Locating the config.php file
Locate the config.php file inside of File Manager. This will be in public_html or the sub folder. When you have located the config file double click it to open the file and edit it.
Step 2 - Base URL
The base url can be located at the top of the config file
// Panel URL \\
define('BASE_URL', 'https://localhost/hamzcad');
Replace the base url with your link. IMPORTANT: Make sure there is no / at the end of the base url.
Step 3 - SQL DATABASE CONNECTION
// SQL DATABASE CONNECTION \\
define('DB_HOST', 'localhost'); // Keep this unless your db is hosted elsewhere
define('DB_USER', 'root'); // Replace root with DB username
define('DB_PASSWORD', ''); // Add DB Password inside of the ''
define('DB_NAME', 'hamzproduct'); // Replace hamzcad with DB name
Step 4 - DISCORD OAUTH2
// DISCORD OAUTH2 \\
define('TOKEN', 'TOKEN-HERE');
define('GUILD_ID', 'GUILD-ID-HERE');
define('OAUTH2_CLIENT_ID', 'CLIENT-ID-HERE');
define('OAUTH2_CLIENT_SECRET', 'CLIENT-SECRET-HERE');
Create a application.
First we will get the bot token. Head to the bot navigation on your application and create the bot. When you have created the bot click on the Copy button under the token.
Now that you have that copied replace TOKEN-HERE with the token you have copied.
Guild ID. = Right click on your servers profile image on discord and press COPY ID if this is not a option you will have to enable developer mode in the discord settings.
Now replace GUILD-ID-HERE with the ID you now have copied.
OAUTH2 CLIENT ID. = On the dev portal head to OAuth2 section.
Now head to the client id and press the copy button.
Now replace the OAUTH2_CLIENT_ID with the ID you have copied.
OAUTH2 CLIENT SECRET = On the dev portal OAuth2 section copy the secret key.
Now replace OAUTH2_CLIENT_SECRET with what you have copied.
Make sure that the application is inside your discord server. You can do that via the below link.
Finally, Set the OAuth2 Redirect here: (link + /actions/register.php)
Step 5 - DISCORD LOGS
// DISCORD LOGS \\
define('LOGS_COLOR', '#00B2FF'); // Change color code
define('LOGS_IMAGE', 'https://imgur.com/yaHpliD.png'); // Replace with a direct image link.
// Add the channel id where you like the log to be send to.
$TIMELOG_CHANNEL_ID = "CHANNELIDHERE";
$SUGGESTIONSLOG_CHANNEL_ID = "CHANNELIDHERE";
$ANOUNCEMENTSLOG_CHANNEL_ID = "CHANNELIDHERE";
$DOCUMENTSLOG_CHANNEL_ID = "CHANNELIDHERE";
$CERTLOG_CHANNEL_ID = "CHANNELIDHERE";
$WARN_CHANNEL_ID = "CHANNELIDHERE";
$NOTE_CHANNEL_ID = "CHANNELIDHERE";
$STRIKE_CHANNEL_ID = "CHANNELIDHERE";
$PRAISE_CHANNEL_ID = "CHANNELIDHERE";
$REMOVEACTION_CHANNEL_ID = "CHANNELIDHERE";
$CALLSIGN_CHANNEL_ID = "CHANNELIDHERE";
Step 6 - GENERAL CONFIGURATION
// GENERAL CONFIGURATION \\
define('ACCENT_COLOR', '#1da06e'); // Change color code
define('DEPARTMENT_NAME', 'BCSO'); // Change dept name here
define('DEPARTMENT_LOGO', 'https://imgur.com/yaHpliD.png'); // Replace with a direct image link.
define('LOGGED_WEEK_LENGTH', '1'); // SHOWS TOTAL TIME LOGGED OVER A PERIOD ON STATS
define('DEPARTMENT_EXAMPLE_CALLSIGN', '4L-30 | H. Hamz'); // Replace with a a example callsign
Step 7 - HEADS TEAM
// HEADS TEAM \\
$HEAD1NAME = "NAME"; // Users name
$HEAD1RANK = "Chief"; // Rank
$HEAD1IMAGE = "https://imgur.com/yaHpliD.png"; // Profile image
$HEAD2NAME = "NAME"; // Users name
$HEAD2RANK = "Deputy Chief"; // Rank
$HEAD2IMAGE = "https://imgur.com/yaHpliD.png"; // Profile image
$HEAD3NAME = "NAME"; // Users name
$HEAD3RANK = "Assistant Chief"; // Rank
$HEAD3IMAGE = "https://imgur.com/yaHpliD.png"; // Profile image
Step 8 - PERMISSIONS
$PERMS = [
"ROLEID" => 1,
"ROLEID" => 2,
"ROLEID" => 3,
"ROLEID" => 4,
"ROLEID" => 5,
];
$PERMSNAME = [
1 => "Head",
2 => "Chain Of Command",
3 => "Supervisor",
4 => "Corporal",
5 => "Officer",
];
8.1 - PERMISSIONS EXPLANATION Head - 1
  • Heads Dashboard - Announcements & Adding Docs
  • + Chain Of Command & Supervisor Perms
Chain Of Command - 2
  • Remove Warnings, Notes, Strikes, Praises, Timelogs, Users.
  • See & Add Strikes
  • See Member Stats Page
  • + Supervisor Perms
Supervisor - 3
  • Add Warnings, Notes, Praises.
  • Change Callsigns
  • Add Certifications
Regular Department Members - 4 +
  • Main Dashboard Stats
  • Timelog
  • Forms
  • Documents
  • Suggestions
Step 9 - FORMS SIDE MENU
Format = "FORM NAME" => "LOCATION",
$FORMS = [
"Time Log" => "forms/timelogform.php",
"Example Form" => "forms/exampleform.php",
];
Step 10 - CERTIFICATIONS
// Rename certifications here or add more by copy and pasting the content on a new line
$CERTS = [
"Pursuit",
"K9",
"MBU",
"AIR",
];