Jump to content
urbanmafia

GRPG CE

Recommended Posts

 

logo.png.1ad840b30623defdf2b7ccafc2c01bc8.png

so for the past couple weeks I've been revamping the whole code base of Grpg V1 and thought i would also revamp the layout with newer standards. i'm currently still working on the layout finishing the header section but i will be releasing all code and layout to the community in the next coming weeks of course fully open source i would name it GRPG CE (Community Edition).

All the code base has been updated fully rewritten the code base and all the classes. 

layout is using Bootstrap 4.4 fully responsive.

let me know what you think and what else you would like to see.

 

Main Layout

screen2.thumb.png.694f83601c30295b0c2279114838e4de.png

Mobile View

screen.thumb.png.1e13632a5f779bd50a9f5c2401b1e58f.png

 

 

Edited by urbanmafia
  • Like 4

Share this post


Link to post
Share on other sites

updated first post uploaded older screenshot it is using sha512 encryption with a salt 

Edited by urbanmafia

Share this post


Link to post
Share on other sites
23 minutes ago, Dave said:

This looks great! Excited to see a demo

demo will be open in the next couple of days when i have finished the modules and theme classes.

  • Like 1

Share this post


Link to post
Share on other sites

For your class like that (especially with classes like GRPG V1) you could use the __get($var) magic method to retrieve all your stats so that you don’t have to keep editing your array each time you make a change to the database

Share this post


Link to post
Share on other sites
1 hour ago, KyleMassacre said:

For your class like that (especially with classes like GRPG V1) you could use the __get($var) magic method to retrieve all your stats so that you don’t have to keep editing your array each time you make a change to the database

im playing around with the classes currently and changing them. For the stats ive decided to just go with this to save editing it all the time

public function getStats()
{
	$stmt = $this->db->prepare("SELECT * FROM user_stats WHERE US_id = (:id) LIMIT 1");
    $stmt->bindParam(":id", $this->id, PDO::PARAM_INT);
		
	if($stmt->execute()):
    	if($stmt->rowCount() > 0):
		$result = $stmt->fetch();
        endif;
    endif;
  return $result;
}

 

Share this post


Link to post
Share on other sites
9 hours ago, urbanmafia said:

im playing around with the classes currently and changing them. For the stats ive decided to just go with this to save editing it all the time

public function getStats() { $stmt = $this->db->prepare("SELECT * FROM user_stats WHERE US_id = (:id) LIMIT 1"); $stmt->bindParam(":id", $this->id, PDO::PARAM_INT); if($stmt->execute()): if($stmt->rowCount() > 0): $result = $stmt->fetch(); endif; endif; return $result; }

public function getStats()
{
	$stmt = $this->db->prepare("SELECT * FROM user_stats WHERE US_id = (:id) LIMIT 1");
    $stmt->bindParam(":id", $this->id, PDO::PARAM_INT);
		
	if($stmt->execute()):
    	if($stmt->rowCount() > 0):
		$result = $stmt->fetch();
        endif;
    endif;
  return $result;
}

 

Ok, I see what you are doing there. One more recommendation:

You should return a result if nothing is found for whatever reason. If there isn’t any rows, it returns absolutely nothing at all because $result is only defined if there are rows found

Share this post


Link to post
Share on other sites
18 minutes ago, KyleMassacre said:

Ok, I see what you are doing there. One more recommendation:

You should return a result if nothing is found for whatever reason. If there isn’t any rows, it returns absolutely nothing at all because $result is only defined if there are rows found

Thankyou im currently building an error wrapper for all database calls and i put row count > 0 as i will be adding api support which i need to pass back errors if they happen so will be adding error handling through out the code.

Share this post


Link to post
Share on other sites
3 hours ago, KyleMassacre said:

[...]

If there isn’t any rows, it returns absolutely nothing at all because $result is only defined if there are rows found

With strict standards, it'd throw an error (Undefined variable: result)

Share this post


Link to post
Share on other sites
2 minutes ago, ags_cs4 said:

hey good luck with the recoding, and for feedback not a big fan of the header, but over all looking dope good job 👍

Thank you. Not to everyones taste, what would you change or relocate somewhere else?

Share this post


Link to post
Share on other sites

I've updated the layout once again changed the top area so not as much put there and also updated mobile view so resizes for each display properly also will be changing tables so they fit nicer. let me know your feedback and if you don't like something please let me know how it could be improved. thanks.

  • Like 1

Share this post


Link to post
Share on other sites

I'd be happy to donate you some free MakeWebGames hosting with a sub-domain to host a demo for the community if you'd like. PM me if you're interested!

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, Dave said:

I'd be happy to donate you some free MakeWebGames hosting with a sub-domain to host a demo for the community if you'd like. PM me if you're interested!

Thankyou dave for the offer im currently hosting it on my dedicated server might be a good idea to host it here after it is completed. The demo should be released around Wednesday after the base is all finished.

  • Like 2

Share this post


Link to post
Share on other sites
41 minutes ago, urbanmafia said:

Thankyou dave for the offer im currently hosting it on my dedicated server might be a good idea to host it here after it is completed. The demo should be released around Wednesday after the base is all finished.

Okay great! You do whatever you thinks best, excited to see it.

Will it be open source?

Share this post


Link to post
Share on other sites
Just now, Dave said:

Okay great! You do whatever you thinks best, excited to see it.

Will it be open source?

Hope the community will enjoy it.

Yes it will be fully open source all code will be uploaded to GitHub.

  • Like 2

Share this post


Link to post
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...