Pages: 1 [2] 3 4 5 6 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Drake Draconis
Shadow Cadre Shadow Confederation
1
|
Posted - 2011.09.14 14:29:00 -
[31] - Quote
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.
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. |
MisterMagotchi
B4D W0LF B4D W01F
5
|
Posted - 2011.09.14 18:41:00 -
[32] - Quote
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
Angry Hobos Interstellar Hobos
0
|
Posted - 2011.09.14 18:58:00 -
[33] - Quote
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
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.14 22:10:00 -
[34] - Quote
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! |
MisterMagotchi
B4D W0LF B4D W01F
5
|
Posted - 2011.09.14 23:22:00 -
[35] - Quote
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
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.14 23:54:00 -
[36] - Quote
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.
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. |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.15 00:36:00 -
[37] - Quote
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) |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.15 00:54:00 -
[38] - Quote
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
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.15 01:42:00 -
[39] - Quote
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. |
Gary Hagon
Angry Hobos Interstellar Hobos
0
|
Posted - 2011.09.15 01:46:00 -
[40] - Quote
Drake Draconis wrote:small price to pay...for added security/convience of API.
Amen. |
|
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.15 04:42:00 -
[41] - Quote
MisterMagotchi wrote: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.
Guess what.... got dinged too.
I'm running 5.2.x
Good luck asking my host to update that...they're paranoid like hell.
>.< *Bangs head on desk* Guess I'll need to make those changes.
EDIT: The changes you suggested to fix are not working.
Code Example:
Yours Says
'EOL'
Should it say
EOL
I did a find replace and that seemed to stop the PHP Parser from spitting nails.
The API Registration page will not load the key or go to the next screen. Errors out saying "wrong information"
I put "\" in front of the dollar signs (coincidentally it goes further than 161 ;) ) but its still not working.
PS: I'll not be able to make any changes until tomorow night...and even then It'd be nice to have someone to check my syntax with without having to wait hours >.<;;; So any clear cut suggestions for this out of practice noob would be great! |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.15 05:35:00 -
[42] - Quote
You should tell your host that PHP 5.3 has been a stable release for 2.5 years and that they need to get their act together if they want to keep business.
If you have 5.2.x, then certainly the 'EOL' (nowdoc) syntax won't work and the single-quotes must be removed. Furthermore, you'll need to find any situations where there are dollar signs in the heredoc string and escape them with a backslash, but I believe only the index.php has a section like that. I know this is just a rephrasing of what I already wrote.
If you absolutely cannot update away from your old version of PHP, I am willing to walk you through fixing the errors in comms, (your Ventrillo if you want). I don't have an old version of PHP to test on.
Also, the reason it goes past line 161 is that we weren't even talking about the same version of the code that exists now.
EDIT: Apparently you don't need to escape the $ signs. I just tried it (switching from nowdoc to heredoc on that section), and it worked fine without doing so. You only need to do that sometimes, in cases where PHP could easily mistake the $ for a variable, like if a letter comes immediately after it. I guess since that jQuery code all starts with "$(", it's not a problem.
Also, here's a list of files that have the 'EOL' (with single-quotes): admin/index.php index.php eve-api-get-names.json.php (a file index.php makes use of when doing the AJAJ stuff) |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.15 17:05:00 -
[43] - Quote
Using Coda last night I maanged to find and replace each and every EOL...only thing is I dont know if spaces should be inserted or not after the ">>>"
The pages load up ok but the API key isn't showing up...or im not sure whats supposed to happen.
I just put in the key and the verification code and it sits there.
So I may have had a syntax error somewhere I missed.
To top that off... my vent provider screwed me over this moring when they moved my server and nuked the entire useraccount database... kinda got my hands full.... not sure if ill get back to this tonight or not. *facedesk*
So should I remove the backslashes from $'s and then just make sure EOL's are ok? |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.15 19:50:00 -
[44] - Quote
The dollar signs don't need backslashes, and there should be absolutely no spaces on the same line after EOL. I would just replace your index.php with the latest copy and replace all the 'EOL' (with single-quote) parts with EOL (without single-quotes). |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.15 19:57:00 -
[45] - Quote
MisterMagotchi wrote:The dollar signs don't need backslashes, and there should be absolutely no spaces on the same line after EOL. I would just replace your index.php with the latest copy and replace all the 'EOL' (with single-quote) parts with EOL (without single-quotes).
OK.
What does EOL really accomplish?
I tried to decipher the syntax by checking PHP manuals and didn't get anywhere.
Best I could come up with an educated guess is "End of Line"
something along the lines of PHP_EOL which is a more formal better "\n" char or even a "\r"
Additionally... could you detail whats supposed to happen when you go to the reigstration page for API check. And I didn't catch where to set group assignments at.
In other words...alliance member signs up...want him in the alliance membership group...etc.
I saw in your configuration file where to set ignoring of groups however.
Additioanly... the section where you put in the DB information.... I presume thats where you go to sign into the SQL Database right? *attempting to troubleshoot why the reigstraiton page keeps erroring out when checking* |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.15 21:27:00 -
[46] - Quote
I can't write the syntax on these forums exactly, because whenever I post left less-than signs (angle brackets), I get an error that I can't post HTML.
Heredoc and nowdoc syntax are documented at the Strings page of the PHP manual.
"EOL" is just the string delimiter I choose for my code. The delimiter could be anything, including "TACOS".
Here's how the registration page works: A user visits the registration page. They see the form as in the screenshot (with some minor variation based on your config.inc.php settings). They enter their API Key ID and API Key Verification Code. Once they change focus away from either the Key ID or Verification Code boxes, and if there is something in them, the AJAJ process starts (using a Javascript "onchange" event), calling the "eve-api-get-names.json.php" script. "eve-api-get-names.json.php" does some basic validation of the Key ID and Verification Code, then it gets their character list via the API page "account/APIKeyInfo.xml.aspx". If the key works, the access mask is correct, the account type is correct, and they have at least one character in a configured corp., the script sends that data back to the registration page, and Javascript plugs those names into the Character Name dropdown box. If the key had an expiration date, the user is warned about that as well. If there was an error, the error is shown instead, and the first two fields are cleared. The user then enters their TS UID and submits the form (if that's enabled). Most of the same API things are then verified again, except using the character name they specified. Some other things related to their forums account are verified. It's verified that the TS UID they entered has been used before on the TS server (if that's enabled). Their entry in the EVE Registration table is then either added (or replaced if it already exists). The check-users.php script is then called.
Group assignments are done in config.inc.php at and after line 80 of the current version with the $config['Corps'] array. There is a giant block of documentation above it.
The Forums DB information is the connection information for connecting to the database your installation of phpBB uses. This should match the information in config.php in your phpBB installation's files. |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.15 22:02:00 -
[47] - Quote
Strange..based on what you said...i have no idea why the java didn't kick in then.
as to the configuraiton page...musta missed that portion of the code...I'll have to take a closer loko at that.
thanks so much for the information. Should help me sort out why its not functional. |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.16 14:00:00 -
[48] - Quote
Looks like I'll have to start fresh...dug myself into a hole...but got an additional question.
Your documentation says corporate ID's for group assignments.
Is it possible to use the Alliance ID number?
PS: This weekend I'll plenty of free time to finally get it off the ground. |
Phoebus ApolloX
Reasonable People Of Sound Mind
1
|
Posted - 2011.09.16 14:18:00 -
[49] - Quote
Hey, first of all good work so far this project is pretty good. I did however run into a couple hiccups that I figure I'd post about while it's still fresh.
Problem 1: I disabled TS3 server features as my TS3 host doesn't seem to have a place to access and edit my whitelist, and TS3 registration isn't a huge deal to me. However every time the replace SQL query would run to add a new api key it'd eliminate the previous key, forcing me to keep only one key in the database at a time. I checked and rechecked, tried different query methods, and no dice. Found out after a lot of fiddling that the key for the TS UID is set to "unique", and every record I'd attempt to add was adding it with a value of "NULL", which was making the MySQL server gurgle. I changed that database column to "index" and I believe that has fixed my problem (still testing).
Problem 2: After letting someone test it out, they would get added to the right group but not be able to see the forums. It seems they were cached with the permissions prior to the edit, and having them relog didn't update their forum permissions. I found that by setting user_permissions to blank in check-users.php with a query just after the "setting default forums group" query, this fixed that problem. Here is the query I added.
edited out: the three less than signs before the first EOL
Quote: $query = (less than signs go here)EOL UPDATE {$config['Forums DB']['Table Prefix']}users SET user_permissions = "" WHERE user_id = {$forums_user['ID']} EOL; mysql_query($query) or log_message('Error clearing user_permissions. User: ' . $forums_user['Username']);
I also want to note that I am on php 5.2 and that with the current iteration of the code replacing all the 'EOL' with EOL definitely works just fine. |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.16 23:04:00 -
[50] - Quote
Drake:
No. The instructions do show you how to quickly grab a list of every corp. in an alliance, but you will have to update your config as corps. join or leave your alliance. I'll think about this and it may be a feature down the road.
Phoebus:
Problem 1: Good catch. That's exactly right. That would certainly be a problem. As I said upon releasing that feature, I figured there was a chance it may have issues. I had only tested with myself, so it was the only record,and I didn't notice. For optimization's sake, it's better to have that as a unique key, but I guess a regular index will have to do the trick for simplicity's sake combined with the option to disable TS.
Problem 2: Good catch again. I hadn't noticed, as we don't use our forums much at all. I'll figure out the exact proper way that phpBB does that when it does group assignments and make that happen. I think clearing user_permissions may cause problems with actual user-specific permissions admins can give users in phpBB.
I'll be releasing a new version with these fixes soon, and I think I'm going to get rid of all the nowdoc stuff (in favor of heredoc). I'm a fan of nowdoc, because I don't see the point of parsing for variables when there's no need, but it's not too intense of a script anyway, and if it opens it up to more people, then I guess it's worth it.
Update: Apparently the "user_permissions" field is a cache that is regenerated if empty, so your solution is exactly correct, and I'll have the code do it in that manner. |
|
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.17 01:20:00 -
[51] - Quote
New version released.
From my changelog: 2011-09-16 - 1.54 - Made TS UID no longer a unique key in DB table to fix bug when TS functionality was disabled. Made check-users clear a user's permission cache after updating their group to fix users not being able to use their new group's permissions. Replaced all nowdoc syntax with heredoc syntax to allow PHP older than 5.3.0. Made index.php update PHP last_poster/topic_poster name cache in the topics table when changing a username.
Changed files (replace): readme.html, eve-api-get-names.json.php, index.php, check-users.php, create-table.sql, admin/index.php
Added file: update-table-153-154.sql If updating from 1.53 (or below) to 1.54 (or above), import this SQL file into your phpBB database or otherwise run its contents. This database update is not required if you use the Teamspeak functionality of this script.
Current known issues:
Forums username colors don't get updated when a user's groups are changed, as phpBB caches them in several places. In order to fix this, the best way will be to require the path name of the phpBB installation and then use phpBB's functions for user management. I will probably do this eventually, but it's a somewhat heavy update, and I consider the colors to be a minor problem at the moment.
If a user fails the API key check and their permissions are therefore revoked, their default phpBB user group will become 2 (Registered Users). If you have modified the Registered Users group or use the COPPA group, this may cause an issue. |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.17 02:00:00 -
[52] - Quote
MisterMagotchi wrote:Drake:
No. The instructions do show you how to quickly grab a list of every corp. in an alliance, but you will have to update your config as corps. join or leave your alliance. I'll think about this and it may be a feature down the road.
Would be graet if it did...less opprotunities to mess with critical core files the more reliable the package.
But so noted...I'll stick with corp ID's from here on out. |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.17 05:15:00 -
[53] - Quote
is it possible to get on a mailing list to be alerted to updates to your package?
And thanks much for the changes! |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.17 05:27:00 -
[54] - Quote
Ok its not pulling the API key... its just sitting there.... I'm pretty sure I got all the files updated as specified... the DB connection is good... so whats causing it to not load the API information? |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.17 06:26:00 -
[55] - Quote
I don't know, and responding back and forth on the forums here isn't the best way to troubleshoot. Send me a mail with your comms. information or something so we can work it out.
I don't plan on making a mailing list about this. I wish the forums would email people notifications of watched threads, but they don't, and I agree that it's irritating. |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.17 17:44:00 -
[56] - Quote
Sent email. Look forward to contacting you..... |
Phoebus ApolloX
Reasonable People Of Sound Mind
1
|
Posted - 2011.09.17 21:28:00 -
[57] - Quote
I ran into an unexpected behavior. The updating bot script seems to add people to the correct forum group, but when API keys get deleted or characters with a valid API get booted from corp it doesn't seem to be removing them from the group. I let the script run overnight in case it's just a cache issue.
I haven't looked too far into it yet, but I'd appreciate any suggestions in pinning down the problem. I've updated the script to the version last supplied. |
MisterMagotchi
B4D W0LF B4D W01F
6
|
Posted - 2011.09.17 22:43:00 -
[58] - Quote
Phoebus:
I just did some testing on it, and it appears to work correctly:
I did API registration for myself. I deleted my API key (at CCP's site). I then tweaked my Cached Until time to be really old. Then when the cron job kicked in and did the check, since the API's "account/APIKeyInfo.xml.aspx" for my key ID and verification code was still cached (CCP currently caches it for about 5 minutes), my groups in TS and the forums were not changed. I changed my Cached Until time again to something old. This time when the cron job ran, my groups were revoked in TS and in the forums, and I verified that my user_permissions field in the "users" table was cleared.
Let me know if it still doesn't work for you. |
Phoebus ApolloX
Reasonable People Of Sound Mind
1
|
Posted - 2011.09.18 00:31:00 -
[59] - Quote
How old does cache time need to be before it runs a check? |
Drake Draconis
Shadow Cadre Shadow Confederation
3
|
Posted - 2011.09.18 01:15:00 -
[60] - Quote
Ran a test to act as if I booted a corporation. Still hasn't kicked said users... how long before it actually does that? Seems kinda odd that it hasn't done that as the cache has come and gone. (All I did was remove the entry of the corp in the config file) |
|
|
|
|
Pages: 1 [2] 3 4 5 6 :: one page |
First page | Previous page | Next page | Last page |