forked from ruddfawcett/HabitRPG-GitHub
-
Notifications
You must be signed in to change notification settings - Fork 4
/
about.php
56 lines (52 loc) · 2.43 KB
/
about.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php require('scripts/header.php'); ?>
<?php require('scripts/connect.php'); ?>
<body>
<div class="container">
<div class="masthead">
<h3 class="muted">HabitRPG-GitHub</h3>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li><a href="index.php">Home</a></li>
<li><a href="//github.com/HabitRPG/HabitRPG-GitHub/commits/master">Changelog</a></li>
<li><a href="//github.com/HabitRPG/HabitRPG-GitHub">Downloads</a></li>
<li class="active"><a href="#">About</a></li>
<li><a href="myaccount.php">My Account</a></li>
</ul>
</div>
</div>
</div><!-- /.navbar -->
</div>
<div class="page-header">
<h1>About</h1>
</div>
<h3 class="section-header" id='setup'>Connecting Your Accounts</h3>
<p class='lead'>
To connect your GitHub to your HabitRPG account is designed to be as simple as possible. All it requires is creating a
"<a href='https://help.github.com/articles/post-receive-hooks'>Service Hook</a>" for the repository or repositories
that you would like to connect to. When you add your service hook, you will enter your unique URL
<?php
if(!array_key_exists('username',$_SESSION)) {
echo " (to show your custom URL, please login)";
}?>:
<div class='well' style='margin:0;'>
<strong style='font-size: 17px;'>
<?php echo $website;?>/scripts/serviceHook.php?username=<?php echo $_SESSION['username'];?>&token=<?php echo $_SESSION['token']; ?>
</strong>
</div>
<br>
<p class='lead'>
That's it! Now, every time you push to your repository, your HabitRPG account will gain experience, or lose health based on
the parameters!
</p>
<!--
<h3 class="section-header">Parameters</h3>
<p class="lead">Parameters for a service hook URL:</p>
<ul>
<li class='lead'><i>username</i>: your GitHub username to match with database. <strong>(required)</strong></li>
<li class='lead'><i>every</i>: the amount of commits it takes to trigger an XP up vote. <strong>(required)</strong></li>
<li class='lead'><i>direction</i>: is type of action you would like, up or down. <strong>(optional - defaults to up)</strong></li>
</ul>
-->
<?php require('scripts/footer.php'); ?>