Skip to content

ruddfawcett/HabitRPG-GitHub

Repository files navigation

HabGitRPG

<<<<<<< HEAD Connect and sync your HabitRPG and GitHub accounts. Built on Rudd fawcett's HabitRPG_PHP API class as well as Bootstrap and a little jQuery).

##Purpose:

If you love playing HabitRPG, and love using GitHub too, why not sync them? For every x number of commits you push to a repository, you will get x number of upvotes on your HabitRPG account!* This way, your hard work coding pays off with your HabitRPG account.

*Both of the "x" values are configurable in when you add a repository to your account.`

##How to run it:

###MySQL:

The process above is fairly straight forward, and all you know have to do to be able to interact with the database is to copy scripts/connect_example.php to scripts/connect.php and set your host values in scripts/connect.php. Don't worry, it's in the .gitignore file so you won't accidentally upload your credentials. Just to double check, the relevant lines in your scripts/connect.php script should look like this after you have entered the values:

  define("MYSQL_PREFIX","{Table prefix}");
  $hostname = "{Path to MySQL database}";
  $username = "{MySQL database username, most default to root";
  $password = "{MySQL database password, most default to no password}";
  $dbname = "{Name of the database you're importing the data into}";

The rest of the setup will happen automagically when you first open index.php.
If you're working locally don't forget to start MySQL first, though!**

Table Structure, users:

username realName password userId apiToken alerts token
user's username github user's real name sha256 with salt "habitrpg" habitrpg userid habitrpg apitoken not used. future alerts to be stored in alerts table unique token for user's

Table Structure, userInfo:

forUser repoName forEvery current direction totalHabit totalCommits id
username of user with repo repository name of github repo number of commits per vote current number of commits til next vote direction of vote: up/down total amount of habit votes cast total amount of commits pushed to the repo unique id for repo

###PHP Local Setup:

Start your PHP server on your computer, and then navigate to localhost/habitrpg-github, and you should arrive at the home screen if you have set it up properly. Any PDO errors are a result from improperly setting up the database! Be sure you have done that first!

Connect and sync your HabitRPG and GitHub accounts.

master

About

Connect and sync your HabitRPG and GitHub accounts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages