Active
Project:
Eve Online HTTP Tools
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2011 at 23:18 UTC
Updated:
12 Mar 2013 at 04:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
Paul Simard commentedRevised to normal.
Comment #2
h3rj4n commentedI suggest we use the PhealNG library. All the hard work is already done, so why not use it ;)
There are a lot of things that need to be done for this module. Some standard Drupal code issues. Some documentation issues.
I'll work on a complete list tomorrow.
Comment #3
h3rj4n commentedChanged from PhealNG to Pheal (see #1881388: D8: Make use of Composer). PhealNG needs more work form the user to make it work. It's not simply adding it to libraries and work with it, that's why I choose the Pheal library.
I've removed almost all the existing code. I didn't like the part where the chars where saved in a node. That way the char settings isn't associated with the user. That would only be possible if the author of the node is the same as the user where the node belongs to.
I changed this to the User form. I altered the form so that you can insert you user id and vcode provided by EVE. These settings are saved in the $user->data (data field in the database) and can be accessed from the user object (by using global $user or user_load). Each user can add their own character to their profile. The data that is storred here won't be much (user id, vcode, max of 3 char id's). For user specific functions this is the best way but if you want to select all the users you'll have to select all the users and loop trough them. It might be better to create a database table to save the data for a user.
I started with a admin form where you can insert your user id and vcode. I left it in the module so that you can set a side wide character / eve acount. This can be used to select Corporation data or something like that. This could also be a simple radio on user.
The eve.data.inc file is only a small part of what the Pheal(NG) library is supporting. That's why I've removed this file.
I made the module dependened on the Libraries module. This module is used to load the Pheal library.
The module now creates a block with the server info with the amount of users currently online.
Current feature list:
Features that could be implemented:
Comment #4
Paul Simard commentedInteresting. I was wondering whether it might be useful to add fields to the user's User node to contain the AccountID and vCode data. That way, it would be possible to allow a user to maintain multiple accounts on his/her personal profile.
This feature would be publicly available, even if there were no Corporation connection to the website, or it could be restricted to those who belong to the Corporation sponsoring the website.
Comment #5
h3rj4n commentedI changed a lot since the last commit. Main features added are these:
I added an extra module to it called 'eve_user'. This module adds an extra table to the database wich is used to save the API keys and some other stuff. The User ID and API key can be changed on the account page.
You're able to create an account using your EVE User ID and the API key. The API key needs to have access to the Characters to be able to function. You can select he Character that you represent on the site. This character will be the username you'll use.
There is still a lot to be done!
I suggest that this patch should use the 7.x-2.x branch. It wont be compatible with the first release.
Comment #6
Paul Simard commentedh3rj4n, I like where you're going with this. I noticed some very minor spelling and grammar errors that I'll fix as I get the chance. One thing I did note was that you appear to direct the user to their user page when login is completed in the IGB. A more generic form would be to refer the user to the home page of the site, or alternatively, to a specific page within the site, depending on the context of the login.
For example, I see the following contexts as potentially valid entries off the top of my head:
Each of these use cases have valid purposes from the IGB, as well as some using external browsers. There's really no need to limit an Authenticated User from creating/editing API Key info using an external browser.
Also, I'm wondering whether it might be useful to break the code checking for the presence of the IGB into a separate public function. That was, a theme's page template could call the function and load different CSS based on whether it's the IGB, or an external browser. We could include a customized page template doing just that.
On the subject of account creation, how do we handle the account name in the Drupal user table? We don't want to require a match to Eve's Account Name (as used on the Eve login screen). We don't want to require the account name to match one of the character names. We don't want to prohibit the user from entering an arbitrary account name for themselves. And, we don't want to violate the CCP licensing provisions regarding data collection. I'm seriously considering obtaining the new third-party dev license key once it's released. Given that, I'd like the modules to work in a minimal form if the Dev API key is absent, and in an enhanced mode when the Dev Key is present. The module user wouldn't need to know anything more than entering their Dev API key in a configuration screen.
My time is seriously limited for the next several months, as I'm in my final semester at school. Major projects abound there, so my focus will be there for the most part, as I intend the results to comprise parts of my portfolio.
Paul
Comment #7
Paul Simard commentedFor anyone who cares to contribute code to this issue, please use my sandbox at http://drupal.org/sandbox/PaulSimard/1883366 and post your patches to that issue queue, referring back to this issue.
Thanks.
Paull
Comment #8
ppetermann commentedHello,
i'm the author of Pheal (and PhealNG), and stumbled upon this when googling.
The Statement in: (#1881388: D8: Make use of Composer: D8: Make use of Composer) is wrong. PhealNG does not require composer. Composer is the recommended way for installing / using PhealNG (and Pheal(!)), but you can also obtain it from github directly, or as a zip file.
You will need a PSR-0 compliant autoloader for PhealNG, from what i gather Drupal comes with the symfony2 autoloader which fulfills this requirement.
besides setting up that autoloader (most likely dumping PhealNG in a specific directory, or including it in some config file) PhealNG should not require any more effort than Pheal did.
PhealNG was created to be compliant with standards, such as PSR-0, and i'd recommend that you go for PhealNG rather than Pheal. New features, such as isset() support are only added to PhealNG, Pheal at this state only gets bugfixes.
regards,
Peter Petermann
PS: i assume you can't do anything about it, but its quite annoying that i had to register for this website, just to comment.
PPS: i'm not going to copy the comment to the other issue, also its quite likely i don't follow on up on here, so if you have problems / questions just contact me through github
Comment #9
Paul Simard commented@ppeterman -- Thanks for your comment #8. The references to PhealNG were made by h3rj4n.
Sorry, Drupal.org is not my site, thus I have no input on the decisions made regarding its administration. As far as PhealNG goes, I intend to investigate the library, especially as the Symfony package will be central to Drupal 8 (actively in development). I don't intend writing one line of code I don't have to, which is one reason so little work/progress on this module seems to be happening. The other reasons all involve other issues which currently hold primacy in demands on my time.
I appreciate hearing from you directly, and will indeed contact you on GitHub.
This message will be posted there as well.