GithubHelp home page GithubHelp logo

habitrpg-github's Introduction

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

habitrpg-github's People

Contributors

lefnire avatar ruddfawcett avatar wogsland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

habitrpg-github's Issues

MySQL & Refactoring

If this were to be continued the database and whole website would have to be refactored. The code is not very clean and the MySQL is not very well set up either, as this was by all means not a finished project/product.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.