These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
123Next pageLast page
 

Teamspeak and phpBB Forums EVE Online API Registration System

Author
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#1 - 2011-09-06 22:48:06 UTC  |  Edited by: MisterMagotchi
Teamspeak and phpBB Forums EVE Online API Registration System

Current Version: 1.58
Released: 2011-10-20 (extremely minor revision 2011-10-21)

Features Summary:

  • Uses the new, customizable API keys system
  • Manages both phpBB (forums) and Teamspeak group membership
  • Teamspeak functionality is optional
  • Automatically puts users in groups in Teamspeak and phpBB based on EVE corporation via EVE API
  • Automatically removes users from those groups if their API information becomes invalid or if they are no longer in a configured corporation
  • Automatically switches members between corp. groups if they switch from one configured corp. to another
  • Several corporations can be assigned to the same Teamspeak or forums group if desired
  • Users can re-do the API registration as many times as they need to
  • Provides an admin interface for admins to view a list of registration information and the error log (for troubleshooting)
  • Minimum required customizable API key access level and key type (Account or Character) are configurable
  • Optionally, sets users' EVE character avatars as their forums avatars (code idea by Rache Le'Bonbon)
  • Reasonably well-documented code for easy customization

More Info and Download

Registration Page Screenshot

If anybody has any difficulty installing or using it, I'll be glad to help. As it seems relatively stable now, if I don't respond here on the forums very quickly, you might try sending me an email to get my attention, since the forums don't notify me of replies.
Fenris Nihilus
Gallente Federation
#2 - 2011-09-07 02:18:33 UTC
I just need to know... does this api authentication code have to run on the same server hosting the ts3 server? I understand its something you implement into your forum code... but what about people who pay for TS3 hosting? There isn't much detail on your site how you connect ts3 to the authentication process.
Fenris Nihilus
Gallente Federation
#3 - 2011-09-07 02:32:58 UTC
Fenris Nihilus wrote:
I just need to know... does this api authentication code have to run on the same server hosting the ts3 server? I understand its something you implement into your forum code... but what about people who pay for TS3 hosting? There isn't much detail on your site how you connect ts3 to the authentication process.


Actually I think I found it. Your using ServerQuery in the code right? So you just have to grant it access to the server via admin panel from your ts3 host. Correct me if I'm wrong.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#4 - 2011-09-08 23:04:54 UTC
Sorry for the delay in response. I wish this system sent emails, but I haven't figured out if it does or where to set the option.

Yes. It just uses TS3's Server Query.

Normally you have to add the IP of the server you'll run this script on to TS3's "query_ip_whitelist.txt", so how you do this is really determined by your TS3 server host. If they provide you with either FTP or an interface to edit the IP whitelist, then great. Otherwise you'll likely need to talk to their support about it.
Gary Hagon
W.A.R. Inc.
#5 - 2011-09-10 20:59:46 UTC
Magotchi - I am still trying to break it Big smile

So far, no problems yet.

For the person who asked about TS hosting, you need to ask your hosting provider to make you a server query account and get the web server that the script is running on "white-listed".

Most hosting companies will not do this under any situation, but I do hosting at decent rates with this mod as an option. mail me and I can help you get set up.



Also, Magotchi, Let me know if you are already working on this, but im trying to get the new api system running with this script.

Let me know if you come up with anything because this is worse than beating my head against a wall.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#6 - 2011-09-11 10:09:20 UTC  |  Edited by: MisterMagotchi
I haven't started on it yet, but I've done a little looking into it. I'll let you know what I come up with.

Update:
I have a good plan, and there's a good chance I'll implement it tomorrow. It won't be hard. It will include the ability to require a minimum set of access mask options for the keys as well, although it technically only needs a Character (not Account) key with access to the CharacterInfo under Public Information (on the API creation page). My assumption is that corps. and alliances will want that same thing but as an Account key as their minimum (for very rudimentary manual spy-checking ability), but I'll leave that customizable.

EDIT:
It turns out that my script ended up not requiring CharacterInfo at all. An access mask of 0 is sufficient.
Philderbeast
Native Freshfood
Minmatar Republic
#7 - 2011-09-11 11:24:21 UTC
i just installed this and its very nice but its not adding some people to the appropriate groups on ts. so far it seems server, specifically the people set up as server admins, is this intentional or caused by ts?
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#8 - 2011-09-11 11:30:28 UTC
I think I would have to know the specifics to help much further, but if the user's Username and API info. match a character that's in a corp. you have configured in config.inc.php ($config['Groups']), and that group ID exists in Teamspeak, there's no reason they shouldn't get added to the correct group.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#9 - 2011-09-11 12:06:10 UTC  |  Edited by: MisterMagotchi
After thinking about how to work with the new API system, I have some dramatic changes coming down the pipe, again likely worked on heavily tomorrow (well today I mean since it's 6am'ish my time and I'm awake still).

Summary of Planned Changes in Upcoming Version:

  • The new customizable API keys will be required. The access mask and key type will be configurable as described in my previous post.
  • There will be a registration page separate from the phpBB registration page. It will still require the user be logged in to the forums to use, though.
  • Much less customization will be required to the forums. Adding the Teamspeak Registration table and a link in the forums to the new registration page will be the only required steps in that regard.
  • The registration page will be re-usable by the users to re-register as their information (API key, character they want registered, TS UID) changes.
  • The registration page will walk users through the process in a much better way, including using AJAX to get the username/usernames of their characters in configured corps. and verifying that all the submitted information is correct.
  • (Edit: This ended up not being true.) Registration will require the user to be in the Teamspeak server. It's a long story as to why, but it's for security.
  • As another security fix, Unique IDs will be checked to make sure they're not already in use by another registered user.
  • Successful registration will update the user's forums username to match their registered player name.
  • Checks where there is a failure due to bad key information or where the user is no longer in a registered corp. will, in addition to removing the user's forums and TS rights, also unregister them entirely (not from the forums, but only from this API registration system). This will prevent future unnecessary checks. They can of course still re-register at any time as above.
  • The system will use the EVE API CachedUntil timestamp to make its determinations instead of the time of the last check. In cases where the connection to the EVE API server fails during a check, that timestamp will be cleared so that the user is moved to the front of the line for the next check.

There may be more features, and as the above are just based on the program plan I wrote for myself, there is a chance some of them could change as I get into the actual coding.

There won't be much of an upgrade path from the old version other than that most of the things in the config file will stay the same (with a couple new additions). Due to the fact that the API key system is changing, this only makes sense anyway.

I'm going to get some sleep and then get right back on this when I wake up this afternoon.
Gary Hagon
W.A.R. Inc.
#10 - 2011-09-11 14:58:11 UTC
Careful bud, I dont know how, but I crashed my computer... Apparently I accidentally got it into a infinite loop... (I have a test server on my box).


Hey bud, when you release that, I wil, yet again, be your test dummy =).


Im gonna keep trying with the code (this time on a VMware....)
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#11 - 2011-09-12 09:59:56 UTC
I've done the vast majority of the work on implementing these changes today (Sunday), and I'll likely finish it tomorrow evening.

I just need to finish some minor things, do some more testing, and make the appropriate changes to the documentation.

I'll be back on it when I get off work Monday evening.
Gary Hagon
W.A.R. Inc.
#12 - 2011-09-12 21:31:28 UTC
Hey bud, Im starting a small beta test on it now. You have my TS info, so if im ingame, come on in and we can try to break it again! Lol
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#13 - 2011-09-13 04:45:49 UTC  |  Edited by: MisterMagotchi
Well mine is done. I'm just still tweaking the documentation as I said. I'll release it tonight.

Update:
The new version is released. Check it out and let me know what you think.

Note: You should completely remove the old version to use this one. At minimum, you must delete your old cron job, delete the line you added to "/includes/ucp/ucp_register.php" in the phpBB installation (starts with "exec"), and delete the custom profile fields related to the system (via Administration Control Panel --> Users and Groups tab --> Custom profile fields). You'll likely also want to delete the "Teamspeak Registration" table from your database, undo any changes you made to your forum (maybe your "ucp_register.html" template) for instruction purposes, delete the old registration system folder, and remove everyone from the forums and TS groups you had configured to work with this system.

Also, it turns out that players aren't required to be connected to the TS server when they register as I had previously stated in my plan.

Update:
LOL. I already released another minor fix version (1.51). The registration form wasn't correctly showing all names from configured corps.
Gary Hagon
W.A.R. Inc.
#14 - 2011-09-13 11:55:50 UTC  |  Edited by: Gary Hagon
Sorry I missed you when you hopped on TS3...

I will test it when I get home today.

EDIT: I dont know if you have implemented this yet, but I reccomend you have a API template URL somewhere on the registration page for the users to click on.

Example https://support.eveonline.com/api/key/CreatePredefined/58720264

That link would send a person to the CCP API page to create an api with the following permissions...
AccountStatus
CharacterInfo
CharacterSheet
CharacterInfo


BTW, Witch xml does this script need access to?
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#15 - 2011-09-13 18:17:18 UTC
The script already uses the template URL on the registration page for whatever your configured minimum access mask is.

If you read the documentation in config.inc.php, you'll have your answer about what it requires: "These are totally up to you as an admin."

Even an access mask of 0 is enough for this script, as that still gives access to the character list, and that's why it's the default in the config.
Balani
Science and Trade Institute
Caldari State
#16 - 2011-09-13 18:22:47 UTC
i get after installation

Parse error: syntax error, unexpected T_SL in /var/www/vhosts/*****/httpdocs/register/index.php on line 4

same in admin dir

Parse error: syntax error, unexpected T_SL in /var/www/vhosts/*****/httpdocs/register/admin/index.php on line 39
seems EOL causes it

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#17 - 2011-09-13 18:56:56 UTC
Balani: I guess I should put in the requirements that it requires PHP 5.3.0 or greater.

The ( EOL ) sections aren't the problem. It's the ( 'EOL' ) (with a single quote on each side of EOL) that only work in PHP 5.3.0 or greater. You can either upgrade your PHP, or you might be able to just find and replace every occurrence of the second thing with the first thing, and it should work fine, but you might have to put a backslash ( "\" ) before the dollar signs in the javascript section in index.php (located in lines 136 -161). This syntax it's currently using is called Nowdoc in case you're wondering.
Gary Hagon
W.A.R. Inc.
#18 - 2011-09-13 21:23:01 UTC  |  Edited by: Gary Hagon
I have not gone live on the code yet, still looking over the code and wondering how I can break it Lol.

I am placing it live tonight and might try to make it plug into a modular with CSS similar to the EVE dev kb layouts.

Ill be online and on TS3 around 23:30 EVE Time, you have my details Cool
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#19 - 2011-09-13 23:44:16 UTC  |  Edited by: MisterMagotchi
Do whatever you want to with the code, but I will have no part of helping you use the Smarty templating engine like EDK uses. Also, this is incredibly easy to customize. There's only one end-user-facing page ('index.php"), and you can make it reference whatever stylesheet you want or just edit the style block in the header.
Gary Hagon
W.A.R. Inc.
#20 - 2011-09-13 23:47:31 UTC  |  Edited by: Gary Hagon
I noticed that bud Smile thats what made me think about doing it.

Installing it now and myself plus my alliance members will be trying to break it. PirateTwisted

I mentioned the ts3 incase you want to try breaking it yourself... lol
123Next pageLast page