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
Phoebus ApolloX
The Scope
Gallente Federation
#61 - 2011-09-18 01:33:00 UTC
As an update, the updated code must have fixed the issue because everything did boot automatically that should've. It might be useful to still know how old a cache must be out of date before it re-checks, though.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#62 - 2011-09-18 02:48:27 UTC  |  Edited by: MisterMagotchi
Sure. Check the documenation --> Components --> check-users.php
That's basically accurate, except in the last update, I changed that minimum time from 30 minutes to an hour, and I forgot to update the documentation to match or put it in the changelog.

The reason forums users are basically checked once every 24 hours and users active in Teamspeak are basically checked every hour is that I wanted to prioritize checking to those in comms. and also not be constantly hammering CCP's servers with checks of every registered person every hour. People in TS get checked more often and with higher priority than people not in TS. As you said you're only using the forums portion of this, you're welcome to tweak the DATE_SUB part in the SQL that chooses the user (line 57 in the current check-users.php file for those not using TS functionality). Basically that line just compares the currently stored Cached Until time in the database with the current time minus 23 hours, and if the Cached Until is older, that user is in the running to be checked, subject to the ORDER BY line's priorities. If you wanted to have them in the running as soon as their Cached Until time expires (1 hour from last check or actual API CachedUntil time, whichever is greater), you could get rid of the DATE_SUB entirely and just make it say "NOW()" instead of "DATE_SUB(NOW(), INTERVAL 23 HOUR)". Alternatively, you could tweak the time amount, like "37 MINUTE" OR "3 HOUR".
Drake Draconis
Brutor Tribe
Minmatar Republic
#63 - 2011-09-18 05:55:25 UTC  |  Edited by: Drake Draconis
Got it working.... the delay is a major factor so I'm fine tuning that.

Some things to note.

I've noticed that 8 times out of 10 the API server doesn't answer... not sure if its CCP messing with it or something else.

I'm also trying to make sure my cron job is working correctly.

Could you please answer this little riddle.

* * * * * /usr/bin/php5 folder1/folder2/eve-api-reg/check-users.php 2>&1

The underlined part... what is that?

Thanks. :)

PS: SWEET MOD THIS IS!

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

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#64 - 2011-09-18 10:15:10 UTC  |  Edited by: MisterMagotchi
Yeah. Regarding the delay, I'll likely add that to the config. in a future release, as it makes sense that people would want to tweak it if they don't use the Teamspeak functionality.

I haven't had any failed connections to the API server in a couple days on mine, and if I do have them, it's only one in a day.

Whoops. I need to correct that in the instructions. That's actually incorrect. The documentation should have " > /dev/null 2>&1" instead of just " 2>&1".

Here's what " > /dev/null 2>&1" means in English: "Redirect standard output to /dev/null (a blackhole) and redirect standard error to standard output." It's a very common thing for people to add onto the end of their cron jobs in order to prevent getting any email output from the cron jobs.

In the case of the current documentation, which I will immediately update in the web documentation and in the readme.html on my next release, it's only redirecting stderr to stdout, so it's not doing much.
Drake Draconis
Brutor Tribe
Minmatar Republic
#65 - 2011-09-18 19:32:54 UTC  |  Edited by: Drake Draconis
Ok.... the weird thing is... if I run it manually from command prompt... it works.

But if its running by itself... it won't connect to the API Server... not sure why.

I'll try adding the corrections and see if it fixes it.

Update: ok I think I found out why....for some reason the cron job won't run correct in its current context.

If the script is run from the servers home directory where ever the hell it is...it errors out.

If its run from the directory (in this case the eve-api-reg) in which its located...it loads fine.

Guess I'll need to figure out how to bypass that and I'm not having much luck in that.
Weird thing is... it shouldn't be having this kind of trouble... hate to have to run this script manually. What?

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

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#66 - 2011-09-18 23:16:33 UTC  |  Edited by: MisterMagotchi
Drake:

If that's the case, then try this as the cron job:

* * * * * cd PATH_ABOVE_EVE_API_REG/eve-api-reg && /usr/bin/php5 check-users.php

The "&&" means "and", so if the first command returns TRUE, it runs the second command. That's a common way to run a cron job from a specific working directory. Of course edit the "PATH_ABOVE_EVE_API_REG" section.

I don't have to do that on mine, though.

For those reading this and unsure why I'm saying "/usr/bin/php5", it's a specific thing for his web host he needs to do to use PHP 5 instead of PHP 4.
Drake Draconis
Brutor Tribe
Minmatar Republic
#67 - 2011-09-18 23:35:27 UTC  |  Edited by: Drake Draconis
I'll give that a shot.

update: It works just fine now!


Much thanks! CoolBig smileBig smile

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

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#68 - 2011-09-22 00:50:09 UTC  |  Edited by: MisterMagotchi
New version released.

From my changelog: "2011-09-21 - 1.55 - Fixed users with single-quotes in their EVE character names not being able to register. Made check frequency configurable. Minor documentation changes."

Changed files (replace): readme.html, index.php, check-users.php

Changed files (hand edit): config.inc.php (added Check Frequency section at the end after Ignore Forum Groups)
Gary Hagon
W.A.R. Inc.
#69 - 2011-09-25 21:29:52 UTC  |  Edited by: Gary Hagon
Just came back and did the updates, and still, I am impressed.

What I may try to do just for fun is make a installer similar to phpbb's forums installer so that the end user just has to place the files with the correct permissions and run with it.

Ill let ya know when I finish it.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#70 - 2011-09-26 10:10:41 UTC
The only step an installer could reasonably do is create the table in the database (or maybe allow them to pre-configure the config.inc.php). I don't see the point.
Gary Hagon
W.A.R. Inc.
#71 - 2011-09-26 13:26:15 UTC
Like I said, just for the lols, and the computer illiterate.

Gonna start on it once I fix my dang server. Broke it testing something else Twisted
Eugene Spencer
Stribog Proving
#72 - 2011-09-26 18:02:18 UTC
Hello,

So far, this is excellent! I am using it on my corp's website - no TS stuff.

I used another phpBB registration script before. It was difficult to upgrade phpBB since it was so heavily integrated with the core files. This is much better!

Just one thing though - when you add a user to a group, is it possible to assign that group as the user's default? For example, if a corp member joins, their default group should be "corp members". Basically I want group colours assigned to each member.

Of course, this could get complicated if a user is a member of multiple groups. But do you have any thoughts on this?

All in all, a top script!

Eugene

I have a specific comb for my beard.

Gary Hagon
W.A.R. Inc.
#73 - 2011-09-26 18:15:22 UTC
I think the group they are assigned to gets set to default, I haven't really paid much attention to that.

If not, I don't think it would be too hard to put a Boolean into the script to set default or not.
Drake Draconis
Brutor Tribe
Minmatar Republic
#74 - 2011-09-27 00:08:01 UTC
Yes it sets the group to default.

But only one group.

Not too big of an issue...still a top notch script.

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

Eugene Spencer
Stribog Proving
#75 - 2011-09-27 13:04:27 UTC
Hmmmmm - it doesn't seem to be setting my defined groups as default. Any ideas? No doubt it'll be a single switch somewhere...

I've also modified the script to fit into the skin of my website - http://therodents.net/EVE-API-Registration/

Might give you guys some ideas.

Eugene

I have a specific comb for my beard.

Drake Draconis
Brutor Tribe
Minmatar Republic
#76 - 2011-09-27 18:12:55 UTC
Eugene Spencer wrote:
Hmmmmm - it doesn't seem to be setting my defined groups as default. Any ideas? No doubt it'll be a single switch somewhere...

I've also modified the script to fit into the skin of my website - http://therodents.net/EVE-API-Registration/

Might give you guys some ideas.

Eugene


Things to check.

1: Configuration script.... make sure the corp ID is correct...
2: Make sure your cron job is triggering correctly...try running the command from the home directory via SSH (IF your web provider gives that kind of access) because 9 times out of 10 that will determine if its really working or not.
3: Manually trigger the script and check the error log in the admin panel.


Now I've fine tuned mine to run a little more frequently than designed...granted I've not patched mine...but I'm more paranoid than most...

I know for a fact that it will asign to the correct groups...it will MOVE corporation members if I change group suddenly...and it will KICK them out of that group to the group set if you comment out the corporation in the config file.

So odds are its the triggering of the script and not so much the configuration.

PS: I specified a specific group to kick them out too to know for sure if it works or not.... might work for you too.

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

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#77 - 2011-09-28 05:57:56 UTC
Sorry for being AWOL. I really wish these forums would notify via email like every other forums system.

Colors are currently unsupported. It says so in the "current known issues" on one of the previous posts. They do get their default group set to the group they get assigned to, but the color is set in several places, not just in their entry in the members table. I'll figure it out eventually. Right now I have the flu.
Laxen
Caldari Provisions
Caldari State
#78 - 2011-09-29 07:11:44 UTC
Hi !

I installed and configured as far as I understood TeamSpeak-phpbb-eve-api-registration.

If I am following erroare web access:

"Error getting information phpBB cookie."

Can you guide me where it comes erroare, so you can fix.

Sincerely,
Gary Hagon
W.A.R. Inc.
#79 - 2011-09-29 07:43:36 UTC
I haven't seen that error code before, and I have been trying to break this thing for weeks now...

I'm guessing the API registration script can not find what kind of cookie the board is giving it's clients...

Question, Are you using SSL?
Laxen
Caldari Provisions
Caldari State
#80 - 2011-09-29 07:54:14 UTC  |  Edited by: Laxen
I do not use SSL.
Just access the page and I appears.