TribesNext

Welcome, Guest. Please login or register.
Did you miss your activation email?


TribesNext >  TribesNext.com Forums >  Support >  TribesNext Profile and Clan API [BETA] « previous next »
Pages: 1 2 [3] 4 5 Print
Author Topic: TribesNext Profile and Clan API [BETA]
Ragora
Seņor Nugget

Posts: 216

View Profile WWW
30: June 02, 2014, 03:23:33 AM »
Any reason that this isn't on github (or some other git collab site)?  Would love to contribute (and get back into this game).
It will be soon. I've committed to my local repo. I just haven't pushed yet.

Waiting on Thyth to create the repo, as well.

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Supposedly Einstein
teratos
Assault
Posts: 898

View Profile
31: June 02, 2014, 05:18:07 PM »
What I'm calling 1.0 because it exposes web GUI to all of Thyth's calls.
https://gitorious.org/t2advstats/t2advstats/
This is my first experience with JSON and it has been a few years since I've done much of any PHP. Probably some things I'd do differently if I restarted now, but it is good enough.

I will probably polish up what is there and may go into some of the requested extras, but I may just leave it like it is today. Most people seem to have all the features they need/want. Still open to suggestions and looking forward to the in-game version.

"Enjoy the rest of your sad elitist life as I will pursue helping gamers in this gamer generation, and perhaps you will develop an unstretchable itch in the knowledge that people like you mean very little to me, or anyone else with strong care in anything that they pursue."
 - sgtvindetta
({STAR})earthinhabitant
Seņor Nugget

Posts: 132

View Profile
32: June 03, 2014, 04:27:56 AM »
Any reason that this isn't on github (or some other git collab site)?  Would love to contribute (and get back into this game).
It will be soon. I've committed to my local repo. I just haven't pushed yet.

Waiting on Thyth to create the repo, as well.

thx  DX
({STAR})earthinhabitant
Seņor Nugget

Posts: 132

View Profile
33: June 03, 2014, 04:28:37 AM »
What I'm calling 1.0 because it exposes web GUI to all of Thyth's calls.
https://gitorious.org/t2advstats/t2advstats/
This is my first experience with JSON and it has been a few years since I've done much of any PHP. Probably some things I'd do differently if I restarted now, but it is good enough.

I will probably polish up what is there and may go into some of the requested extras, but I may just leave it like it is today. Most people seem to have all the features they need/want. Still open to suggestions and looking forward to the in-game version.

thx T
Heat Killer
Scout

Posts: 479

View Profile
34: June 04, 2014, 08:01:00 PM »
Any reason that this isn't on github (or some other git collab site)?  Would love to contribute (and get back into this game).
It will be soon. I've committed to my local repo. I just haven't pushed yet.

Awesome.

({STAR})earthinhabitant
Seņor Nugget

Posts: 132

View Profile
35: June 07, 2014, 01:10:48 PM »
I have attached the stripped down version of it and should be able to run in any directory.

The two files required are included, so links will work for those.

Cleaned up a few PHP notices and made few minor changes to style sheet and elements.

For an example of it in action:

http://star.is-great.net/

Will work on updating this to keep up with Teratos' Master release, and a special thanks to Thyth and Teratos for making this happen.

If you notice any bugs or anything, you can pm me here or contact via the feedback button the website here http://star.is-great.net/

Side note, is since tags and clans are back now, there is a invite request button on our clan website to join us and a list of those that have been invited.



« Last Edit: June 08, 2014, 04:05:52 AM by ({STAR})earthinhabitant »
Jack Booted Thug
Nugget³
Posts: 81

View Profile
36: June 07, 2014, 02:16:59 PM »
What I'm calling 1.0 because it exposes web GUI to all of Thyth's calls.
https://gitorious.org/t2advstats/t2advstats/
This is my first experience with JSON and it has been a few years since I've done much of any PHP. Probably some things I'd do differently if I restarted now, but it is good enough.

I will probably polish up what is there and may go into some of the requested extras, but I may just leave it like it is today. Most people seem to have all the features they need/want. Still open to suggestions and looking forward to the in-game version.

Thanks for this.

I too am looking forward to the in game version.

Once we have the ingame tmail and clan system working we can really focus on a marketing push for the game as the client will have an inbuilt hub which I think will help hold interest.
teratos
Assault
Posts: 898

View Profile
37: June 07, 2014, 06:15:26 PM »
Your website is still broken.

"Enjoy the rest of your sad elitist life as I will pursue helping gamers in this gamer generation, and perhaps you will develop an unstretchable itch in the knowledge that people like you mean very little to me, or anyone else with strong care in anything that they pursue."
 - sgtvindetta
teratos
Assault
Posts: 898

View Profile
38: June 07, 2014, 06:40:25 PM »
I have attached the stripped down version of it and should be able to run in any directory.

The two files required are included, so links will work for those.

Cleaned up a few PHP notices and made few minor changes to style sheet and elements.

For an example of it in action:

http://star.is-great.net/

Will work on updating this to keep up with Teratos' Master release, and a special thanks to Thyth and Teratos for making this happen.

If you notice any bugs or anything, you can pm me here or contact via the feedback button the website here http://star.is-great.net/

Side note, is since tags and clans are back now, there is a invite request button on our clan website to join us and a list of those that have been invited.
Why did you reformat everything?
Makes it hard to diff!
Also you didn't submit your fixes as merge requests to git!

So some of your changes make sense to me. The changes to header() are wrong.
You have some spelling issues (index.php) and some naked amps.

I also noticed you removed the security warning link and removed the file containing the security notice which is extremely sketchy!!!!!!

It makes me think you are stealing passwords.

"Enjoy the rest of your sad elitist life as I will pursue helping gamers in this gamer generation, and perhaps you will develop an unstretchable itch in the knowledge that people like you mean very little to me, or anyone else with strong care in anything that they pursue."
 - sgtvindetta
({STAR})earthinhabitant
Seņor Nugget

Posts: 132

View Profile
39: June 08, 2014, 04:05:02 AM »
I am not stealing any passwords or any thing wrong.

 I will add the security notice back to it, so you and everyone else can relax with your false sense of security, by reading it...


Someone who might do it, would be diemonkeys Mick G, who tried to hack into my gmail....not I, not now or ever.

Thanks for your concern and protection of the community T, as I assure you if I ever did have anyone's password, and I do not, that their password would be safe with me, though as far as anyone else, having their password, I cannot speak for them, only myself...

Anyone suggesting I am trying to do anything malicious, is full of shit.

( i just pulled the package and will add the security notice and reload it later today...)

I thought I requested yesterday, by  asking you to make a zip of the current version of your master available and I would download and go through line for line commenting the changes... the download link failed on this end and had to cut and paste the code to text editor to get before and it took 30 minutes or so to do..

So if you can package it up, will be more than happy to do anything you want.
« Last Edit: June 08, 2014, 04:12:26 AM by ({STAR})earthinhabitant »
teratos
Assault
Posts: 898

View Profile
40: June 08, 2014, 08:42:38 AM »
How is the download link broken? This is gitorious...not some homebrewed website. Download git or TortoiseGit or something and go at it. You should be using git or some other source control for your own code anyway.

"Enjoy the rest of your sad elitist life as I will pursue helping gamers in this gamer generation, and perhaps you will develop an unstretchable itch in the knowledge that people like you mean very little to me, or anyone else with strong care in anything that they pursue."
 - sgtvindetta
({STAR})earthinhabitant
Seņor Nugget

Posts: 132

View Profile
41: June 08, 2014, 09:13:33 AM »
How is the download link broken? This is gitorious...not some homebrewed website. Download git or TortoiseGit or something and go at it. You should be using git or some other source control for your own code anyway.

ok thanks, you and thyth both over estimate me, as far as my technical skills goes, and intentions...will get on it, thanks again.
({STAR})earthinhabitant
Seņor Nugget

Posts: 132

View Profile
42: June 10, 2014, 07:57:31 AM »
Spoke with Teratos yesterday about adding a CAPTCHA and he suggested ReCAPTCHA by google.


Anyways I have not quiet figured out how to get with git and all, so posting the basics here and maybe T and others can check over it and see what they think, as  the box size needs to be adjusted to fit the layout by Teratos in left column or can be set to open in AJAX.


Here is the updated form code that goes in inc/template.inc

The Key provided is a global key and you can get/use your own, for your website if your prefer.
The one registered for this example is global and points to global-key@tribes2stats.com
Code:
<form action="verify.php?page=<?php echo $page?>" method="post">
<fieldset>
<legend>Browser Login</legend>
<div class="formtext">
<input type="text" placeholder="Username" autofocus="" required="" name="username" id="username" />
<input type="password" placeholder="Password" required="" name="password" id="password" />
<?php
    
require_once('inc/recaptchalib.php');
    
$publickey "6Lek-vQSAAAAAFrpzM2Jt4lKQafpsW8_uO2H9HNW"// you got this from the signup page
    
echo recaptcha_get_html($publickey);
?>

<input type="submit" value="Login" />
</div>
</fieldset>
</form>

for the verify.php, that goes in root directory in this example

Save as= verify.php

Code:
<?php
  
require_once('inc/recaptchalib.php');
  
$privatekey "6Lek-vQSAAAAAH8fzqdr4B_LQ8UjjE5RF5MGCh_4";
  
$resp recaptcha_check_answer ($privatekey,
                                
$_SERVER["REMOTE_ADDR"],
                                
$_POST["recaptcha_challenge_field"],
                                
$_POST["recaptcha_response_field"]);

  if (!
$resp->is_valid) {
    
// What happens when the CAPTCHA was entered incorrectly
    
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
         
"(reCAPTCHA said: " $resp->error ")");
  } else {
    
// Your code here to handle a successful verification
function std_login_box($page) {
global 
$session;
if(
$session->isAuthenticated()) {
?>

<p>Authenticated as:<br /><?php echo htmlentities($session->getValue('tn_name'),ENT_QUOTES); ?><br /><a href="logout.php" title="Logout">Logout</a></p>
<?php
return;
}
?>

Then there is the recaptchalib.php from google that goes in /inc folder fro this example and is attached to this post and code is as follows:
Code:
<?php
  
require_once('inc/recaptchalib.php');
  
$privatekey "6Lek-vQSAAAAAH8fzqdr4B_LQ8UjjE5RF5MGCh_4";
  
$resp recaptcha_check_answer ($privatekey,
                                
$_SERVER["REMOTE_ADDR"],
                                
$_POST["recaptcha_challenge_field"],
                                
$_POST["recaptcha_response_field"]);

  if (!
$resp->is_valid) {
    
// What happens when the CAPTCHA was entered incorrectly
    
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
         
"(reCAPTCHA said: " $resp->error ")");
  } else {
    
// Your code here to handle a successful verification
function std_login_box($page) {
global 
$session;
if(
$session->isAuthenticated()) {
?>

<p>Authenticated as:<br /><?php echo htmlentities($session->getValue('tn_name'),ENT_QUOTES); ?><br /><a href="logout.php" title="Logout">Logout</a></p>
<?php
return;
}
?>


Will work on the layout and I may have made some mistakes in modding this, so maybe Teratos or someone else can chime in on things and review.

I believe this should be mandatory for any sites running the code, anywhere, as a minor security precaution and there may be some other layers that can help with the plain text issue, as it may be best to require SSL on all sites running the code or establish an API interface that is encrypted and secure from a site that does have SSL, or something like that may be more secure and possible...not the one to really know or suggest, just my thoughts.

I have not released the new version here or anywhere at this time, after the backlash for removing the security note before...

Though if anyone is interested in it, please send me a pm and will zip it up and upload it for downloading...with reCAPTCHA of course Cheesy

Teratos & thyth thanks again for sharing the code to make this possible





Attached files
* recaptchalib.zip (3.59 KB - downloaded 200 times.)
« Last Edit: June 10, 2014, 07:59:35 AM by ({STAR})earthinhabitant »
Blue Jello
Nugget
Posts: 3

View Profile
43: July 11, 2014, 07:26:29 PM »
hi guys, sorry to be a nuisance, I wanted to see if there are any updates on the Profile/Clan interface.  If not, I wanted to ask what my options are for being able to add a tag to my name through, http://www.tribes2stats.com/browser/.

Unfortunately, from what I have been told by a few people, my username needs to be added to a particular database because it did not exist until after the last tournament (username created in April '14).  Please let me know if there is anyone in particular I need to speak with on here or IRC to get added to the database.  I am willing to pay a fair price for the effort/time spent.

Thanks,
Blue Jello
« Last Edit: July 11, 2014, 07:31:12 PM by Blue Jello »
({STAR})earthinhabitant
Seņor Nugget

Posts: 132

View Profile
44: July 12, 2014, 04:11:24 AM »
hi guys, sorry to be a nuisance, I wanted to see if there are any updates on the Profile/Clan interface.  If not, I wanted to ask what my options are for being able to add a tag to my name through, http://www.tribes2stats.com/browser/.

Unfortunately, from what I have been told by a few people, my username needs to be added to a particular database because it did not exist until after the last tournament (username created in April '14).  Please let me know if there is anyone in particular I need to speak with on here or IRC to get added to the database.  I am willing to pay a fair price for the effort/time spent.

Thanks,
Blue Jello

my guess is, it takes about 5-30 minutes to do or less...less than an hour, ask Thyth in IRC, he is the only one who can do, and I have asked several times and was told by him, he would do it, when he has time to do it...other than that I have an account I can give you, if you want one that is old enough and synced with ms.
Pages: 1 2 [3] 4 5 Print 
« previous next »
Jump to:  

irc.quakenet.org / #TribesNext Powered by SMF 1.1.21 | SMF © 2005, Simple Machines
anything