From ebaa3ab10dff7c2c43c8bf1fd605f85edb7fcbb7 Mon Sep 17 00:00:00 2001 From: Kuzirashi Date: Fri, 16 May 2014 18:24:07 +0200 Subject: [PATCH 1/2] Showing contributors using GitHub API in Credits, if CURL is enabled. --- credits.php | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/credits.php b/credits.php index 5fdd5ae..ba540a1 100644 --- a/credits.php +++ b/credits.php @@ -5,9 +5,53 @@

Developers:

Main: Znote. +
Contributor: Kuzirashi.
Contributor: ninjalulz.
Contributor: att3. + + Contributors:'; + + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, 'https://api.github.com/repos/Znote/ZnoteAAC/contributors'); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_USERAGENT, 'ZnoteAAC'); // GitHub requires user agent header. + $contributors = json_decode(curl_exec($curl), true); // Sorted by contributions. + + $CONTRIBUTORS_PER_ROW = 7; + + $i = 0; + $first_container = true; + $div_closed = true; + foreach($contributors as $contributor) + { + if($contributor['login'] != 'Znote') { // Exclude Znote as he is mentioned above as main developer. + $new_div = ctype_digit((String)($i / $CONTRIBUTORS_PER_ROW)); + + if($new_div) { + if(!$first_container) + echo ''; + + echo '

'; + $div_closed = false; + $first_container = false; + } + + echo ''; + $i++; + } + } + if(!$div_closed) + echo '
'; +} ?>

Thanks to: (in no particular order)

@@ -18,7 +62,20 @@
Evan, Gremlee - Researching TFS 0.3, constructive feedback, suggestion and participation.
ATT3 - Reporting and fixing bugs, TFS 1.0 research.
Mark - Old repository, TFS distributions which this AAC works against. -
Tedbro, Exura, PrinterLUA - Reporting bugs +
Tedbro, Exura, PrinterLUA - Reporting bugs.

- \ No newline at end of file + + From e98171ec417f186cd387e22a9b3e1a973fdb2315 Mon Sep 17 00:00:00 2001 From: Kuzirashi Date: Fri, 16 May 2014 19:31:36 +0200 Subject: [PATCH 2/2] Fixed typo in login widget. --- layout/widgets/login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/widgets/login.php b/layout/widgets/login.php index 81ea61a..561412e 100644 --- a/layout/widgets/login.php +++ b/layout/widgets/login.php @@ -4,7 +4,7 @@
  • - Userame:
    + Username: