Jump to content
MakeWebGames

Sims topic for GL typo's, possible bugs, ect.


Sim

Recommended Posts

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.

Screenshot_20200407-004152.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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 by Glock1533
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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);
}

 

Link to comment
Share on other sites

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 by urbanmafia
Link to comment
Share on other sites

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 😕 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by KyleMassacre
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...