Jump to content

Nimbus

Contributors
  • Posts

    31
  • Joined

  • Last visited

Recent Profile Visitors

1,939 profile views

Nimbus's Achievements

  1. Looks clean man! Definitely going to check it out xD
  2. Hello There! I have been developing BitScape Crusade for the past 3 years in my spare time. I have done everything through the Intersect Engine and have upgraded verions over the years (Kudos to the Intersect team!). The game is nearing the stage for public launch and I really want to have some things in place beforehand. I recently paid for hosting on HostKoala since I saw JC and some other devs recommend it (Pricing and CPanel is hard to beat from what I've seen). Up until this stage I have hosted the game server and everything else locally on one of my personal pcs, and I am ready to use HostKoala to set up some other things but I don't have the know how. Here are the things I need done on HostKoala: -CMS-API Website linked to Game DB's -Auto Updater I just need someone to help me do the initial setup and show me how to manage it correctly and I can make all the changes needed visually etc. ***I tried for 2 days setting up CMS on my personal PC with XAMPP and Laragon and kept getting different errors. That is why I have decided to go the HostKoala route ________________________________________________________________________________________________ Additionally I am also looking to have some other systems implemented into BitScape: -Mini Map -Guilds -Player Housing If you are experienced with any of these things and are willing to help and get paid for it please contact me! (Insane Pricing will be ignored - Let's be realistic xD) Thanks so much!! -Nimbo
  3. Getting this error now. Fatal error: Uncaught Error: Class 'App\Preferences' not found in C:\laragon\www\BSC\application\App\ContainerFactory.php:23 Stack trace: #0 C:\laragon\www\BSC\public\index.php(40): App\ContainerFactory::create('C:\\laragon\\www\\...') #1 {main} thrown in C:\laragon\www\BSC\application\App\ContainerFactory.php on line 23
  4. I think I'm getting somewhere xD
  5. I had it done in XAMPP but I can't figure out how to import databases on Laragon.
  6. preferences.php <?php declare(strict_types=1); namespace App; /** * This class contains the preferences for the application. * * @package App */ class Preferences { /** * @var string */ private $rootPath; private $themeName; private $baseURL; private $apiUsername; private $apiPassword; private $apiServer; private $apiToken; private $cmsSettings; private $dbIp = "127.0.0.1"; private $dbUser = "root"; private $dbPassword = ""; private $dbPort = "5400"; private $dbName = "BSC"; /** * Preferences constructor. * * @param string $rootPath */ public function __construct(string $rootPath) { $this->rootPath = $rootPath; } /** * @return string */ public function getRootPath(): string { return $this->rootPath; } /** * @return string */ public function getThemeName(): string { return $this->themeName; } /** * @return string */ public function setThemeName($themeName) { $this->themeName = $themeName; } /** * @return string */ public function getDbIp(): string { return $this->dbIp; } /** * @return string */ public function getDbUser(): string { return $this->dbUser; } /** * @return string */ public function getDbPassword(): string { return $this->dbPassword; } /** * @return string */ public function getDbPort(): string { return $this->dbPort; } /** * @return string */ public function getDbName(): string { return $this->dbName; } /* Config API */ /** * @return string */ public function getApiUser(): string { return $this->apiUsername; } public function setApiUser($username) { $this->apiUsername = $username; } /** * @return string */ public function getApiPassword(): string { return $this->apiPassword; } public function setApiPassword($password) { $this->apiPassword = $password; } /** * @return string */ public function getApiServer(): string { return $this->apiServer; } public function setApiServer($server) { $this->apiServer = $server; } /** * @return string */ public function getApiToken() { return $this->apiToken; } public function setApiToken($token) { $this->apiToken = $token; } /** * @return array */ public function getCmsSettings() { return $this->cmsSettings; } public function setCmsSettings($settings) { $this->cmsSettings = $settings; } public function getApiData() { // API login $postData = array( 'grant_type' => "password", 'username' => $this->getApiUser(), 'password' => hash('sha256', $this->getApiPassword()) ); return $postData; } /** * @return string */ public function getBaseURL(): string { return $this->baseURL; } public function setBaseURL($server) { $this->baseURL = $server; } /* Function API */ public function APIcall_POST($server, $postData, $access_token, $calltype) { $ch = curl_init('http://' . $server . $calltype); curl_setopt_array($ch, array( CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'authorization:Bearer ' . $access_token, // "authorization:Bearer", et non pas "authorization: Bearer" 'Content-Type:application/json' // "Content-Type:application/json", et non pas "Content-Type: application/json" ) , CURLOPT_POSTFIELDS => json_encode($postData) )); $response = curl_exec($ch); if ($response === false) { return (curl_error($ch)); } $responseData = json_decode($response, true); return $responseData; } // Permet de récupérer des données depuis la BDD via l'API : liste des joueurs, etc public function APIcall_GET($server, $access_token, $calltype) { $ch = curl_init('http://' . $server . $calltype); curl_setopt_array($ch, array( CURLOPT_HTTPGET => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'authorization:Bearer ' . $access_token, // "authorization:Bearer", et non pas "authorization: Bearer" 'Content-Type:application/json' // "Content-Type:application/json", et non pas "Content-Type: application/json" ) , )); $response = curl_exec($ch); if ($response === false) { return (curl_error($ch)); } $responseData = json_decode($response, true); return $responseData; }
  7. Ok I got that figured out and received the same error as in XAMPP Fatal error: Uncaught PDOException: Could not connect to database (test_rpg). in C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php:440 Stack trace: #0 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php(161): RedBeanPHP\Driver\RPDO->connect() #1 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php(464): RedBeanPHP\Driver\RPDO->runQuery('SELECT * FROM c...', Array) #2 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Adapter\DBAdapter.php(118): RedBeanPHP\Driver\RPDO->GetAll('SELECT * FROM c...', Array) #3 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Facade.php(158): RedBeanPHP\Adapter\DBAdapter->get('SELECT * FROM c...', Array) #4 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Facade.php(1226): RedBeanPHP\Facade::query('get', 'SELECT * FROM c...', Array) #5 C:\laragon\www\BSC\public\index.php(63): RedBeanPHP\Facade::getAll('SELECT * FROM c...') #6 {main} thrown in C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php on line 440
  8. Gotcha! I downloaded Laragon but I'm not sure entirely what needs to be done. It's setup is quite different than XAMPP and I used that because there was a english guide that I could follow easily.
  9. It auto brings up dashboard now everytime
  10. Hello xD I believe so. I am doing everything locally first to get it working.
×
×
  • Create New...