Sim Posted April 7, 2020 Posted April 7, 2020 Since I am just starting to use GL, I will be tearing this code apart line by line at one point or another so when I encounter anything that seems out of the ordinary, I will post here. Since the majority of them will be dumb things like the one below. Forgotpassword_admin says "Theme options updated". I'm sure it ment username options updated or something of the likes. Quote
ags_cs4 Posted April 7, 2020 Posted April 7, 2020 lol, but for me i got another error all the page dont exist in the admin pannel Quote
Dave Posted April 7, 2020 Posted April 7, 2020 I believe you could post issues on the GL GitHub to help @Dayo manage the issues 😌 1 Quote
URBANZ Posted April 7, 2020 Posted April 7, 2020 the major issue i have come across is when method_exists is called on module loading it break the whole game layout. If the action of the module is undefined it returns null but if you try returning something like a 404 page it breaks admin module actions as they run on a different loader to the main modules. Quote
Sim Posted April 7, 2020 Author Posted April 7, 2020 4 hours ago, Dave said: I believe you could post issues on the GL GitHub to help @Dayo manage the issues 😌 I'm to lazy to do that from a cellphone. This will have to work. As long as people don't post a thousand dumb replies, all would be well. Quote
Glock1533 Posted April 7, 2020 Posted April 7, 2020 (edited) I noticed that pages like Login, Registration, Forgot password are still accessible to users, even if they are logged in if($this->user->loggedin){ header("Location:?page=" . $this->page->landingPage); exit; } more when you put this code in and if you are not logged in, it says that “logged in” is not an object. Edited April 7, 2020 by Glock1533 Quote
URBANZ Posted April 7, 2020 Posted April 7, 2020 2 hours ago, Glock1533 said: I noticed that pages like Login, Registration, Forgot password are still accessible to users, even if they are logged in if($this->user->loggedin){ header("Location:?page=" . $this->page->landingPage); exit; } if($this->user->loggedin){ header("Location:?page=" . $this->page->landingPage); exit; } more when you put this code in and if you are not logged in, it says that “logged in” is not an object. yes i posted this exact issue to github couple weeks back https://github.com/ChristopherDay/Gangster-Legends-V2/issues/36 when i posted this didn't double check, should have been. if(isset($this->user->loggedin)){ header("Location:?page=" . $this->page->landingPage); exit; } should go in construct function of each of the files. Quote
Sim Posted April 7, 2020 Author Posted April 7, 2020 (edited) @urbanmafia what files? The ones @Glock1533 mentioned? While looking at the bank module, I didn't see anything stopping someone from entering a negative# unless I overlooked it. Edited April 7, 2020 by Sim Quote
ags_cs4 Posted April 7, 2020 Posted April 7, 2020 27 minutes ago, urbanmafia said: yes i posted this exact issue to github couple weeks back https://github.com/ChristopherDay/Gangster-Legends-V2/issues/36 when i posted this didn't double check, should have been. if(isset($this->user->loggedin)){ header("Location:?page=" . $this->page->landingPage); exit; } if(isset($this->user->loggedin)){ header("Location:?page=" . $this->page->landingPage); exit; } should go in construct function of each of the files. why not ? if(isset($this->user->loggedin)){ $this->page->redirectTo($this->page->landingPage); } Quote
URBANZ Posted April 7, 2020 Posted April 7, 2020 (edited) 24 minutes ago, Sim said: @urbanmafia what files? The ones @Glock1533 mentioned? While looking at the bank module, I didn't see anything stopping someone from entering a negative# unless I overlooked it. yes if you look at the issue i posted on github a couple weeks back it was login.inc.php, forgotPassword.inc.php, register.inc.php. that line needs to be added to stop users accessing them when logged in. 6 minutes ago, ags_cs4 said: why not ? if(isset($this->user->loggedin)){ $this->page->redirectTo($this->page->landingPage); } if(isset($this->user->loggedin)){ $this->page->redirectTo($this->page->landingPage); } that would work better was just a simple fix i posted but your way would be better @Sim also with bank there is a check on line 69 and line 94 of bank.inc.php to check if its a negative Edited April 7, 2020 by urbanmafia Quote
ags_cs4 Posted April 7, 2020 Posted April 7, 2020 yours get the job done, but i didnt want to use it like that im gona make seo link (www.gamename.com/crimes/1 ...) so i needed all redirect/links to be editable in one place (a function)to make easy for me, tho still didnt finish it have lot going on 😕 Quote
URBANZ Posted April 7, 2020 Posted April 7, 2020 2 minutes ago, ags_cs4 said: yours get the job done, but i didnt want to use it like that im gona make seo link (www.gamename.com/crimes/1 ...) so i needed all redirect/links to be editable in one place (a function)to make easy for me, tho still didnt finish it have lot going on 😕 yes make sense i'm currently doing the same with my game but ive made a routing class instead of using .htaccess rewrites so everything passes through the class and gets converted out to the user. Quote
ags_cs4 Posted April 7, 2020 Posted April 7, 2020 2 minutes ago, urbanmafia said: yes make sense i'm currently doing the same with my game but ive made a routing class instead of using .htaccess rewrites so everything passes through the class and gets converted out to the user. that even better than mine xDDD i was using .htaccess Quote
KyleMassacre Posted April 7, 2020 Posted April 7, 2020 (edited) 1 hour ago, urbanmafia said: yes i posted this exact issue to github couple weeks back https://github.com/ChristopherDay/Gangster-Legends-V2/issues/36 when i posted this didn't double check, should have been. if(isset($this->user->loggedin)){ header("Location:?page=" . $this->page->landingPage); exit; } if(isset($this->user->loggedin)){ header("Location:?page=" . $this->page->landingPage); exit; } should go in construct function of each of the files. It should ideally go in the parent constructor which I would assume without looking, the Module class. Edited April 7, 2020 by KyleMassacre Quote
Sim Posted April 9, 2020 Author Posted April 9, 2020 In the admin section under pages, forgot password link says don't exist. The login and register pages have a BBCode Editor. Forum Edit link has caption of "Delete Forum" instead of Edit. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.