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.
 

Teamspeak and phpBB Forums EVE Online API Registration System

Author
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#21 - 2011-09-13 23:48:17 UTC  |  Edited by: MisterMagotchi
Also, so far I've had 19 registrations since I started using the new version (which is immediately after I published it last night), and it's working great so far.

Eventually I think I will make it so the registration page verifies that the TS Unique ID exists in the TS database (meaning the user has at some previous time joined the TS server). This should further prevent mistakes. Right now if they enter a bogus TS Unique ID (like one of my guys that entered just his name he uses in TS), nothing ever tells them its incorrect; they just don't get any TS rights until they fix it by re-registering.
Gary Hagon
W.A.R. Inc.
#22 - 2011-09-14 00:36:50 UTC
Quick question, Is there a way to make this script a standalone registration page? Im looking into it now, but dumbass me keeps on breaking it....


meh... Ill figure it out sooner or later.
Gary Hagon
W.A.R. Inc.
#23 - 2011-09-14 00:56:33 UTC
dude, i was taking another look at the new code and i realized something that made me do a "double take"....


This can easily be integrated into the registration script and your admin script can easily be integrated into the ACP.

Im going to try to make a pre-packaged and fully installable phpbb3 with that installed.

Ill let you know what happens
Gary Hagon
W.A.R. Inc.
#24 - 2011-09-14 04:02:25 UTC
Suggestion for next release:

Allow us the option to specify what group they are placed if they fail the API check.

If you need me to elaborate more, eve mail me.


Besides that one little missing feature, I must say you really outdid yourself...
Drake Draconis
Brutor Tribe
Minmatar Republic
#25 - 2011-09-14 04:55:55 UTC
HOLY #### this is awesome.

I'm gonna have to make a new set of boards to test this out!

Some questions:

1: Is this FRIENDLY when it comes to PHPBB Official Update packages... as in it won't go ape-**** crazy if it patches as they regularly do release updates. (Last API Mod caused me to scrap Databases on a regular basis... utter pain-in-the-ass)

2: Is there a way to shutoff the Teamspeak 3 portion as we do not use TS3 (Shadow Confederation)

3: Is it possible to configure the API checker to multi-corps/multi-alliances?

4: I don't understand the bit about a separate registration page... can you clarify? Will it require modifications to make it work? This also include the ACP As well?

5: Can it be installed on an already active DB/Forums?

6: Last but not least...willing to give me some minor coaching's on some specific customizations such as getting cron to email me? Linux docs can be confusing at times.


Thanks so much for your time and patience.Lol

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

Gary Hagon
W.A.R. Inc.
#26 - 2011-09-14 05:40:54 UTC  |  Edited by: Gary Hagon
Drake Draconis wrote:

1: Is this FRIENDLY when it comes to PHPBB Official Update packages... as in it won't go ape-**** crazy if it patches as they regularly do release updates. (Last API Mod caused me to scrap Databases on a regular basis... utter pain-in-the-ass)

2: Is there a way to shutoff the Teamspeak 3 portion as we do not use TS3 (Shadow Confederation)

3: Is it possible to configure the API checker to multi-corps/multi-alliances?

4: I don't understand the bit about a separate registration page... can you clarify? Will it require modifications to make it work? This also include the ACP As well?

5: Can it be installed on an already active DB/Forums?

6: Last but not least...willing to give me some minor coaching's on some specific customizations such as getting cron to email me? Linux docs can be confusing at times.



Drake, I will gladly be willing to help you out.

Answers to your questions...

1. From the looks of the script, it should keep functioning no matter what unless an update modifies the name of a table or its structure. Most updates these days are related to the internal php code, not the tables. So I think it would be safe to say this mod would be reliable over updates.

2. I haven't tried but I would think that commenting out the ts3 portion would do the trick. I will look into this when I work on the ACP mods (keep reading)

3. Yes, You can set this up for as many corps/alliance as you want. I currently have this setup working for 5 corps in my alliance, and 8 blue corps. It would be safe to say the limit is infinite.

4. No modifications are needed. What happens is they register normally through your phpbb, then they log in, click the link, and enter the needed details. When it comes to the separate reg page, my guess is to make it so that you can take almost any theme straight from phpbb.com and deploy it. There is no direct ACP controls but there is a stand alone admin page that will allow you to view all the data in the system. I am working on a ACP mod that will do the same.

5. Yes. I was easily able to install and employ this setup on a live database in about 15 minuets with no issue.

6. Hit me up in-game and I will gladly get you set up, If needed, I do TS3, forums and Kb hosting for ISK at affordable rates. (I will mail you tomorrow)
Gary Hagon
W.A.R. Inc.
#27 - 2011-09-14 06:33:36 UTC
Found what looks to be a glitch in the system. When updating TS UID info, its possible to have multiple clients registered, but only the most recent uid will be removed from the TS3 groups.

Suggested fix: When users update their API info via the index.php page, do not overwrite the old UID. When it comes time to deactivate their account, have the system attempt to remove all the associated UIDs from the system.

I can elaborate more tomorw at 23:30, im wiped out... (2 am!)

This is the only bug I have found so far. I must applaud you Big smile
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#28 - 2011-09-14 07:04:47 UTC
Gary:

I don't know what you mean by "standalone registration page". The registration page is a completely separate page from everything else as it sits now.

I don't think it's a good idea to integrate the registration page too heavily into the registration process of phpBB. I made it a separate page on purpose in order to allow users to register as many times as they want if they lose access due to key issues, if they want to change the character they have registered, etc.

If you want to integrate the registration list into the ACP, that's your prerogative, but for ease of installation and to avoid update breakage, I think leaving it separate is the best option. It also allows me lots of flexibility in writing the code the way I want it and not be bound by phpBB's inner-workings.

Currently if they fail an API check, they are removed from all TS and forums groups except those in the ignore list in config.inc.php. Making them then then join some other group is doable, but I don't see the point, and it's more work than I want to do. You're welcome to add that feature to yours if you like. A person can fail an API check for a number of reasons. It can expire. They can lower the rights to less than the required minimum. They can leave the corporation. They can quit paying for their account. There are probably also other reasons. Just letting them revert to Guest seems totally reasonable to me.



Drake:

Thanks.

1. It shouldn't, as the only modification it makes to the database is the addition of the one table (EVE Registration). If phpBB does end up releasing a new version where they change the names of the data fields related to sessions, usernames, and groups, I'll have to make a fix to support it, but I doubt it as phpBB is a very mature piece of software.

2. It's not possible in the config, but someone who understands the basics of phpBB should be able to strip out the parts related to Teamspeak. The code is all commented. I don't plan to remove the Teamspeak integration or make it optional, as there are other phpBB EVE registration systems which are likely better suited to only being used for that purpose.

3. It supports an unlimited number of corporations to be configured.

4. By separate registration page, I mean that the API registration is independent of the phpBB registration. A forums user can do the API registration as many times as they'd like.

5. Yes, and it's no different than installing it for a fresh phpBB install.

6. I could help you with it. For starters, by default, cron emails to the Linux user who owns the crontab that called the job. On many systems, having a ".forward" file in the user's home directory with an email address to forward mail for that user to will do just that. It really depends on your system. Linux comes in a lot of flavors. In something like cPanel, you can set the email right in the interface I believe.

No problem.



Gary:

2. True, but there are parts of index.php that reference it, and even bigger parts of check-users.php that reference it, including MySQL code that mixes references to TS with references to the forums. Certainly it can be edited out, but it will take some minor finessing, and I don't want to mess with it and have to maintain two editions, or add what I think is unneeded complexity by allowing for it to be disabled.

4. True, but my reason for the separate registration page is that I want people to be able to fix their own registration problems with little or no help from admins. With a separate registration page apart from the phpBB registration, users can register over and over again to their hearts content (if they want to change or fix things).

Regarding the glitch you say you found, you'll have need to explain that more thoroughly. Here's how the system works as it pertains to users updating their TS UID via the registration form: When a user submits their data, the system verifies that no other forums user is already using the TS UID they entered, then it checks their API information again to be sure it works and they're in a registered corp., then it updates their forums username, then it does a MySQL "REPLACE INTO" operation into the EVE Registration table with all of their data. REPLACE in that context is just like INSERT, but if the data being inserted conflicts with any column that's marked as unique in the table, the entire row gets replaced with the new data. The TS UID and User (phpBB user ID) columns are both unique keys, so the system will not allow duplicate TS UIDs in the table. As I didn't really understand what you meant, I just did my best to explain the process here again.

Thanks.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#29 - 2011-09-14 07:26:52 UTC
New version released.

From my changelog:

"2011-09-14 - 1.52 - Registration form script now verifies that the TS UID entered is recognized by the TS server (meaning the user has been in the server before and the UID is correct) and gives them an error otherwise. The instructions were clarified a little more on the registration page. Other minor typo fixes and code cleanups."

Changed files (just replace them): admin/index.php , index.php , check-users.php , setup.inc.php , readme.html
Gary Hagon
W.A.R. Inc.
#30 - 2011-09-14 14:25:45 UTC
Thanks for the update and your input on the extremely long post Smile

Oh, and you mentioned two different editions, it could be possible to simply make a boolean style selection in the admin page to enable/disable the ts function.


In my honest opinion bud, what you have now is EXCELLENT! Myself and a few buds are using this script as a base for a few additional projects.


Oh, something I noticed that my be useful to mention in the comments, you can get your corp ID from dotlan maps =) Made my life much easier. (compared to running through the API xml).


Thanks bud
Drake Draconis
Brutor Tribe
Minmatar Republic
#31 - 2011-09-14 14:29:00 UTC
So to understand a few things based on the replies....

They have to register an account first....then register a second time with API information? How does this not cause "multiple acounts syndrome"

The API system is independent of the forums but runs its own check against the forums with the API keys.

TS3 portions can be ignored or commented out without causing harm to the system...

right?


Naturally when I have the time I'll setup a package myself and see how it works this weekend...but I'm just doing my homework in advance. Lol


Don't suppose you have a test board running somewhere where I could look. :)


PS: No need to offer hosting services... I have a very large web hosting package of my own.

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#32 - 2011-09-14 18:41:14 UTC  |  Edited by: MisterMagotchi
Gary:

Regarding your boolean option idea, note that I said "or add what I think is unneeded complexity by allowing for it to be disabled." One man's unneeded complexity is another man's great idea, but it would involve me having if-statements/switches for different SQL queries and then some more if-statements to include or not include other code and verbiage in other places, and I don't care to do so. That's all I'm saying.

I may add the DOTLAN note to the config.inc.php documentation in a future update. Good idea.



Drake:

To do API registration, one must have a forums account. When they visit the API registration page, it verifies that they have a phpBB session cookie specifically for the configured board, that it matches a session in the phpBB database, and that it hasn't expired (based on the session length configured in phpBB). The API registration is tied to their phpBB account, and the EVE Registration table's primary key is User, which contains the user's phpBB ID number. In my first version, registration for EVE was done directly through the phpBB registration form, which didn't easily allow a mechanism for re-registration when a user wanted to fix or change their API information, and as I had it, required heavy admin. intervention to fix all problems.

The API registration page is independent of the forums in the sense that its URL and look-and-feel are different, but the registration page/script, check-users script, and admin registration list all make use of the phpBB database, so they're not actually independent. The "check against the forums" is the verification that the user is logged in on the forums, and when the check-users script is setting their groups, it of course modifies their group memberships in the phpBB database.

TS3 portions can be edited out or commented out, and most of the TS3-related sections are directly labeled as such with comments, but you'll also need to edit the MySQL in check-users.php which gets that data (labeled "//Get forums user info checked longest ago") and remove the HTML table row from index.php that mentions it.

I don't have a test board. Sorry. In order to do that and have it be a reasonable test, I'd likely have to put every corp. ID in the game into its config. file. That would also mask some of the features (like the fact that when index.php uses AJAJ to get your list of characters, it only shows characters in the configured corps.).
Gary Hagon
W.A.R. Inc.
#33 - 2011-09-14 18:58:15 UTC
I will be willing to host a test board....

I will probably put a html based text editor (make the config and error logs world writeable) and simply put a cron job to reset the whole setup every 2 hours or so.
Drake Draconis
Brutor Tribe
Minmatar Republic
#34 - 2011-09-14 22:10:28 UTC
I like what your saying...I'll feel better when i get it up and running on my system.

As for the TS3.... if its "ignored" will it cause harm?

Sounds like there's no way to quickly/cleanly remove it/disable it.

PS: Your description as to how it works is quite telling of your knowledge of PHPBB/SQL... I LIKE IT!!!! This is gonna be awesome for my alliance!Big smileBig smile

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#35 - 2011-09-14 23:22:41 UTC
Gary:

If you want to make a test board, do whatever you want, but I don't believe a test board will do this justice without a test TS server as well. I also think it's unnecessary, but again, it's your prerogative.



Drake:

The more I think about it, the more I'm softening on the idea of making Teamspeak registration optional via the config. I'll see what I can do on it tonight.

No harm will be caused if TS3 is disabled in the right way, so that's another reason I'm thinking about making it easier for everybody.

Yeah. It's not all that easy unless you're already a PHP coder.

Thanks for the great compliment. I've been a PHP/MySQL developer full-time for five years, and I've been tinkering with phpBB and other PHP apps. for many years before that in a hobby capacity.
Drake Draconis
Brutor Tribe
Minmatar Republic
#36 - 2011-09-14 23:54:48 UTC
MisterMagotchi wrote:
Gary:

If you want to make a test board, do whatever you want, but I don't believe a test board will do this justice without a test TS server as well. I also think it's unnecessary, but again, it's your prerogative.



Drake:

The more I think about it, the more I'm softening on the idea of making Teamspeak registration optional via the config. I'll see what I can do on it tonight.

No harm will be caused if TS3 is disabled in the right way, so that's another reason I'm thinking about making it easier for everybody.

Yeah. It's not all that easy unless you're already a PHP coder.

Thanks for the great compliment. I've been a PHP/MySQL developer full-time for five years, and I've been tinkering with phpBB and other PHP apps. for many years before that in a hobby capacity.


Ive seen alot of people throw around jargon....admitedly I know enough to be dangerous....understand various concepts.... but I'm nowhere taletned enough to tangle with the likes of a rock solid PHPBB platform.

I even threatened to make an EVE Online theme and found out it would take me more time that I can afford to create.

I find its truely genius how your approaching this.

By isolating your code and just interfacing with the DBTables for referenceing and not direct modification... any chance of an update/patch rolling over on your code is slim to none.

Its a bit awkward in some aspect.... perhaps theres a way you could coordinate with the PHPBB devs for some sort of structure template that would at least let you integrate your registration tool with the registration page itself.

But this is better than nuking my DB/Forums over a patch...and well worth the added work as opposed to an entire staff dedicating to auditing membership (as I was planning to do).

I defiinately look forward to using your package...and perhaps...useful constructive critqueing. Big smile


However I will say this much.... make the TS3 package optional and your gaurenteed to get a ton of use out of this...not everyone uses TS3... ours is Ventrillo..some still use EVE Voice...others Mumble.

I'll try to get a head start on your stuff tonight if I'm still conscience.... still at work. OopsSad

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#37 - 2011-09-15 00:36:00 UTC  |  Edited by: MisterMagotchi
New version released.

Changelog: "2011-09-14 - 1.53 - Made Teamspeak functionality optional. Other minor documentation and textual changes."

Changed files (replace): readme.html, index.php, check-users.php
Changed files (hand edit): config.inc.php (added "$config['Use Teamspeak']" option and some documentation)

Note: Although I've done rudimentary testing with Teamspeak disabled, there's always potential for bugs, so let me know if you experience any related to using that feature, as I won't have it disabled in my everyday use. You will notice that when you use the registration list (admin/index.php), you will still see a column for TS Unique IDs, and it will be blank. Although it's possible I may remove it someday with TS disabled, I don't think it hurts anything for it to be there.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#38 - 2011-09-15 00:54:13 UTC
Drake:

Again, thanks for the compliments. I really appreciate them.

Regarding integrating this with the phpBB registration, again, my original version did that. I found a few problems with that: Users couldn't edit their own registration information if it was or became invalid, so the role of admins was too heavy with that way. Nobody could sign up for the forums unless they had their EVE and Teamspeak information which meant that only EVE players in corp. or alliance could even use the forums, and this severely limited the use of the forums. In this new way, you can still provide some basic level of access for un-API-registered users while giving API-registered users more permissions. Thirdly, and maybe even the most important to me, being required to work directly in someone else's code framework, using their naming scheme, code formatting standards, and general way of doing things is irritating for me; also, the more tightly integrated a phpBB plugin is, the more complicated its installation process often becomes.

That being said, if you put the link to the registration page in a prominent place like the main navigation of phpBB, users that want to do the API registration should have no problem finding it. I've also added a sample code snippet in the installation instructions that you can paste into any phpBB template file and have it only show for logged-in users. I put mine to the right of the rest of the main top navigation, in a little bit bigger font, and in a color that stands out from the other stuff, and that's probably the one thing my users haven't complained about.

Keep the constructive criticism headed my way. There's little I enjoy more than people being able to benefit from things I make.

FYI, I wish I didn't have to use Teamspeak. I would use Mumble if I had the choice, as I especially prefer its permissions system, among other things, over Teamspeak, but it's hard to teach old dogs new tricks, and that's definately a true statement in my alliance.
Drake Draconis
Brutor Tribe
Minmatar Republic
#39 - 2011-09-15 01:42:42 UTC
dont modifications of the PHBB Webpages cause issues with modification checks during updates?

Course thats a MINOR issue in comparison from my previous issues.

At that rate I'll just slap a "forum board link" in the middle of the main section and use that instead.... if its a problem.

Won't know till I try it. :)


Thanks so much for the explinations... I can see it would be difficult for registration to be integrated.

But as I said...small price to pay...for added security/convience of API.

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

Gary Hagon
W.A.R. Inc.
#40 - 2011-09-15 01:46:34 UTC
Drake Draconis wrote:
small price to pay...for added security/convience of API.


Amen. Cool