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
// CAD URL \\
define('BASE_URL', 'https://localhost/hamzcommuntiy');
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', 'hamzcad'); // 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)