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
 

TEA (v1.3.1) - Member Management Mod for SMF 2, TeamSpeak 3 and Jabber

Author
Shin Chogan
Federal Navy Academy
Gallente Federation
#1 - 2013-09-13 16:07:07 UTC  |  Edited by: Shin Chogan
Ok as others have said its probably time a new thread was started on this :

Please welcome in v 1.3.1 of this amazing SMF mod Lol

Brief Description :

This is a Module for SMF 2
this Adds security and access control using Eve API keys to your forum

It also provides TeamSpeak 3 and Jabber (Openfire) integration.

This is a continuation of the work started by Temars and documented in the thread :
https://forums.eveonline.com/default.aspx?g=posts&t=8284

Release Download and Bug Reporting :
https://github.com/barneycg/temars-eve-api

Changes :


  • Updated API validations to use the 403 Forbidden messages CCP now return.
  • Removed support for Legacy style api keys.
  • Added a CAK mask check - API's must have at least CharacterSheet, FacWarStats and one of the private or public CharacterInfo options selected.
  • A not fully tested set of Scheduled Events to perform the automated API polling for people without system access.


Notes/Fixes :


  • Keys that return a 403 forbidden are never checked again by the automatic polling. If a key is returning 403 forbidden because it has expired and the user re enables it they can force a recheck of the key from in their profile.
  • The Corp ticker in the users "Real Name" is now automatically updated on Api update (both manual and automatic)
  • The Scheduled Task to poll the API keys is the only one that has been tested the Jabber and both TS ones are untested as I don't have the environment set up to allow me to do that ... I'm looking for a brave soul to give them a try please :)


Version is Currently 1.3.1 r7

Please take note of some of these changes your users will loose access to your forums, Teamspeak and Jabber if they are using legacy keys or keys with the wrong mask. Don't just install this without adequate preparation

and yes ISK donations are greatly appreciated Big smile

r4 change notes

  • fixes the pre poulation of the api server to use for completely new installs that I broke in the r2 release Oops
  • Adds in some exception checking when adding a new TEA rule so it doesn't give an HTTP 500 if no/invalid XML is returned


r5 change notes

  • Now should work properly again with CCP's error codes.
  • SSL Peer Checking disabled
  • Debug option added to TEA_Cron.php (just do php TEA_Cron.php debug on the command line - don't do this via cron ;)) to show which users it has operated on and which groups (just the group id) they have been added to via the TEA rules.
  • Skills based rules should now work.


r6 change notes

  • Misc Changes to error handling. Error 221 is treated as transient and will be rechecked (Note this error will be cached for 1hr).
  • Added option to restrict access for a group ... people in this group will only have Corp rules processed - designed for Alliance boards to allow them to remove access to a corp before the corp has been dropped from the Alliance but allows the possibility of controlling access via corp name.
  • Added option to prevent a specified group from having an account at all on Jabber even if other rules say they should.
  • Clean up scheduled tasks on uninstall of MOD
  • Now should remove all groups from forum accounts with only toons that exist on other forum accounts.
  • Warning about Openfire Password insecurity.
  • Bugfix for API required during Registration.


r6 change notes

  • Fix Character selection bug on profile page
Manic Velocity
Federal Navy Academy
Gallente Federation
#2 - 2013-09-13 19:19:20 UTC  |  Edited by: Manic Velocity
You sir, are a god among men. I just tested this on our dev site and the Scheduled Tasks run as exactly expected.

I'll throw some ISK your way tonight. Thank you!

EDIT: Should clarify that the scheduled tasks for forum access work as expected. I'll talk to our admin about testing TS access, but we don't have Jabber.

"The most punchable face in New Eden."

Be excellent to each other.

Twitter | Twitch | YouTube

Manic Velocity
Federal Navy Academy
Gallente Federation
#3 - 2013-09-13 19:59:24 UTC  |  Edited by: Manic Velocity
Eh, sorry to burst the bubble. I'm now experiencing an error when attempting to add an API key to an existing account:

Quote:
[ERROR] Api must be of Type Character and show ALL toons :)


I triple-checked to make sure the key was to show all characters, and even created an entirely new key to show all characters. But the error persists.

Thoughts?

Also, in checking the mod settings, this error appears at the top of the page:

Quote:
API System Screwed - Can't fetch Toons : bool(false) API System Screwed - Can't Fetch Standings : bool(false) There is a problem fetching Standings : int(9999)

"The most punchable face in New Eden."

Be excellent to each other.

Twitter | Twitch | YouTube

Shin Chogan
Federal Navy Academy
Gallente Federation
#4 - 2013-09-13 21:20:05 UTC  |  Edited by: Shin Chogan
Manic Velocity wrote:
Eh, sorry to burst the bubble. I'm now experiencing an error when attempting to add an API key to an existing account:

Quote:
[ERROR] Api must be of Type Character and show ALL toons :)


I triple-checked to make sure the key was to show all characters, and even created an entirely new key to show all characters. But the error persists.

Thoughts?

Also, in checking the mod settings, this error appears at the top of the page:

Quote:
API System Screwed - Can't fetch Toons : bool(false) API System Screwed - Can't Fetch Standings : bool(false) There is a problem fetching Standings : int(9999)


Hmmm those actions seem to work for me but ... :)

Those errors look like you aren't getting a response from the api servers ... you will also need to clear out your smf_tea_cache table. But I'm not sure what is going on coz if you dont have the curl extensions installed you would have a different error.

this bit : - API System Screwed - Can't Fetch Standings : bool(false) There is a problem fetching Standings : int(9999) means that
when it is trying to get the standings the result is either :

a runtime error of some kind in CCP's servers, nothing being returned in 60 seconds or getting back a 404
Manic Velocity
Federal Navy Academy
Gallente Federation
#5 - 2013-09-13 21:57:32 UTC
Thanks for the quick reply. I'll have our admin flush the cache table and see if that fixes it.

"The most punchable face in New Eden."

Be excellent to each other.

Twitter | Twitch | YouTube

Shin Chogan
Federal Navy Academy
Gallente Federation
#6 - 2013-09-17 11:56:54 UTC
Any more feedback on this ... my forums have been running this (albeit using the cronjobs and no TS integration) for a couple of weeks (My guys love me for all the testing I do on them Big smile ) and not run into any problems like this but I've had a similar report via a bug raised on git hub which has raised a few warning bells.

If it isn't working for you can we work out a way to get together and identify the reason. From the error It looks like all API fetches are failing. I did hear a rumor of CCP API server issues the other day ... could that have been the cause ?
Manic Velocity
Federal Navy Academy
Gallente Federation
#7 - 2013-09-17 14:34:32 UTC
My testing was done on our dev site, which apparently was not an exact mirror of our production site.

The only hiccup we experienced on the prod environment was that the mod may have wiped out the registration agreement that users must agree to before registering. The text is gone, but the user still has to click on "I accept the terms of the agreement". So they are basically agreeing to nothing. :P

It's not a big deal really. And we're not even sure if the TEA mod is what caused it. I wish I had more info for you but I have very limited access to our prod site. Getting the mod installed at all has been a ridiculously long process, simply because I have to keep lighting a fire under our admin's ass.

We only use the mod to grant forum access. TS access is handled manually since our community members play other games besides EVE. The Scheduled Tasks seem to be working as intended, though. Users input their API info and are granted appropriate access within a few minutes.

"The most punchable face in New Eden."

Be excellent to each other.

Twitter | Twitch | YouTube

Shin Chogan
Federal Navy Academy
Gallente Federation
#8 - 2013-09-17 14:39:37 UTC
Manic Velocity wrote:
My testing was done on our dev site, which apparently was not an exact mirror of our production site.

The only hiccup we experienced on the prod environment was that the mod may have wiped out the registration agreement that users must agree to before registering. The text is gone, but the user still has to click on "I accept the terms of the agreement". So they are basically agreeing to nothing. :P

It's not a big deal really. And we're not even sure if the TEA mod is what caused it. I wish I had more info for you but I have very limited access to our prod site. Getting the mod installed at all has been a ridiculously long process, simply because I have to keep lighting a fire under our admin's ass.

We only use the mod to grant forum access. TS access is handled manually since our community members play other games besides EVE. The Scheduled Tasks seem to be working as intended, though. Users input their API info and are granted appropriate access within a few minutes.



OK ... so all in all it does appear to be working on your prod site ? No error messages when you go to the Mod settings page for TEA ?

TEA "shouldn't" touch the registration agreement and it is certainly still present on both my production and dev forums.
Manic Velocity
Federal Navy Academy
Gallente Federation
#9 - 2013-09-17 14:47:21 UTC
Shin Chogan wrote:
OK ... so all in all it does appear to be working on your prod site ? No error messages when you go to the Mod settings page for TEA ?

TEA "shouldn't" touch the registration agreement and it is certainly still present on both my production and dev forums.


No error messages reported by our admins. Everything is working as intended. :)

I'm personally not concerned about the reg agreement issue. It can be disabled entirely in SMF, and nobody reads those anyway. :P

"The most punchable face in New Eden."

Be excellent to each other.

Twitter | Twitch | YouTube

OwenJ
University of Caille
Gallente Federation
#10 - 2013-09-21 11:57:22 UTC
G'day Guys,

I am getting the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: D:\sites\owen1brunker\recursiveerror.com\home\Sources\TEA.php
Line: 2465

Does anyone have any ideas?

Thanks in advance

Cheers
OwenJ
Shin Chogan
Federal Navy Academy
Gallente Federation
#11 - 2013-09-21 14:19:19 UTC
OwenJ wrote:
G'day Guys,

I am getting the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: D:\sites\owen1brunker\recursiveerror.com\home\Sources\TEA.php
Line: 2465

Does anyone have any ideas?

Thanks in advance

Cheers
OwenJ



Can I get a little more detail ... what were you doing when you got this error message ?
Have you upgraded from an earlier version or is this a new installation ?
OwenJ
University of Caille
Gallente Federation
#12 - 2013-09-23 01:05:45 UTC
Shin Chogan wrote:
OwenJ wrote:
G'day Guys,

I am getting the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: D:\sites\owen1brunker\recursiveerror.com\home\Sources\TEA.php
Line: 2465

Does anyone have any ideas?

Thanks in advance

Cheers
OwenJ



Can I get a little more detail ... what were you doing when you got this error message ?
Have you upgraded from an earlier version or is this a new installation ?



I clicked the "Run Full Member Check Now" which is under "CHECKS" on the Temars Eve Api menu.

Background History

I didn't do the original install of SMF. The CEO of a corp, who recently left our alliance, was the person who did the original hosting, installation and forum maintenance. He gave me a copy of the database and forums. The Temars version number was a bit weird I think. 1.3.0.175. The version number of SMF was 2.0.4, which I patched to SMF 2.0.5.

It was with this environment that I was getting errors. I don't know if the errors existed before I patched. The first error which was reported by Temars was a database version mismatch. From my research I couldn't identify a database change between SMF 2.0.4 and SMF 2.0.5, so I changed the version number in the database. This is when the current message started happening.

I have, since my post for help, uploaded a vanilla SMF 2.0.5 as per the SMF manual and then deleted all package mods. I then uploaded and installed Temars Eve API Version 1.3.1 R2.

In running the same option, "Run Full Member Check Now", I still get the same error message but on a different line number. The error is the same error within the same PHP function Settings_checks($scripturl) and it occurs when doing an SQL SELECT via a call to $this -> smcFunc['db_query'].

I can't fault the SQL statement. A similar SQL statement runs perfectly in the MySQL query tool. I say similar because I manually resolved the {db_prefix} macro in my test. It should resolve to ''. I suspect this is where the problem might be. The forums themselves are working so I cant see the null value used for db_prefix being an issue.

I hope this fills you in.

Thanks again.

OwenJ
Shin Chogan
Federal Navy Academy
Gallente Federation
#13 - 2013-09-23 11:09:12 UTC  |  Edited by: Shin Chogan
OwenJ wrote:
Shin Chogan wrote:
OwenJ wrote:
G'day Guys,

I am getting the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: D:\sites\owen1brunker\recursiveerror.com\home\Sources\TEA.php
Line: 2465

Does anyone have any ideas?

Thanks in advance

Cheers
OwenJ



Can I get a little more detail ... what were you doing when you got this error message ?
Have you upgraded from an earlier version or is this a new installation ?



I clicked the "Run Full Member Check Now" which is under "CHECKS" on the Temars Eve Api menu.

Background History

I didn't do the original install of SMF. The CEO of a corp, who recently left our alliance, was the person who did the original hosting, installation and forum maintenance. He gave me a copy of the database and forums. The Temars version number was a bit weird I think. 1.3.0.175. The version number of SMF was 2.0.4, which I patched to SMF 2.0.5.

It was with this environment that I was getting errors. I don't know if the errors existed before I patched. The first error which was reported by Temars was a database version mismatch. From my research I couldn't identify a database change between SMF 2.0.4 and SMF 2.0.5, so I changed the version number in the database. This is when the current message started happening.

I have, since my post for help, uploaded a vanilla SMF 2.0.5 as per the SMF manual and then deleted all package mods. I then uploaded and installed Temars Eve API Version 1.3.1 R2.

In running the same option, "Run Full Member Check Now", I still get the same error message but on a different line number. The error is the same error within the same PHP function Settings_checks($scripturl) and it occurs when doing an SQL SELECT via a call to $this -> smcFunc['db_query'].

I can't fault the SQL statement. A similar SQL statement runs perfectly in the MySQL query tool. I say similar because I manually resolved the {db_prefix} macro in my test. It should resolve to ''. I suspect this is where the problem might be. The forums themselves are working so I cant see the null value used for db_prefix being an issue.

I hope this fills you in.

Thanks again.

OwenJ



What is the new line number ? This is an interesting one ... I can't see expanding {db_prefix} to null would be a problem.

Edit : Not sure how comfy you are making some changes ... can you try changing TEA.php ?

on line 1367 it should say :
$lastid = 0;

can you add directly below that line the following :

$this -> lastid = 0;

It a long shot but the SQL query you list uses $this -> lastid and it is possible that this variable isn't set if you have only a very few api keys in your db.
OwenJ
University of Caille
Gallente Federation
#14 - 2013-09-23 13:37:57 UTC
Shin Chogan wrote:


Edit : Not sure how comfy you are making some changes ... can you try changing TEA.php ?

on line 1367 it should say :
$lastid = 0;

can you add directly below that line the following :

$this -> lastid = 0;

It a long shot but the SQL query you list uses $this -> lastid and it is possible that this variable isn't set if you have only a very few api keys in your db.


I checked that line you mentioned, but it reads (variable, value)

What I have done is added a couple of lines after the retrieval of the HTTP query parameters in the function settings_checks($scripturl).

I added:

if (isset($this -> lastid) == false)
$this -> lastid = 0;

The error nolonger occurs. But in the SMF log I am getting the following error:


Apply Filter: Only show the error messages of this URL

http://www.recursiveerror.com/index.php?action=admin;area=tea;sa=checks;update;lastid=0

Apply Filter: Only show the errors with the same message

8: Undefined property: TEA::$log

Apply Filter: Only show the errors from this file

File: D:/sites/owen1brunker/recursiveerror.com/home/Sources/TEA.php
Line: 2500


Line 2500 reads:

$file = str_replace("\n", "
", $this -> log);


Also, when I run "Run Full Member Check Now", I get

Checked: 0 / 49

Continue (the numbers displayed here cycle through 0 to 3)

Xornicon Altair
Black Watch Syndicate
#15 - 2013-09-24 05:32:58 UTC
Fresh install of both SMF2 and TEA. So far, everything seems to be going smoothly until I try to add a rule and get the following:

Quote:
The website encountered an error while retrieving http://blackwatchsyndicate.com/forum/index.php?action=admin;area=tea;sa=rules;e217bb3d5bd=86af0d286d8f40f9e887b6d834beac86. It may be down for maintenance or configured incorrectly.
Reload this webpage.
Press the reload button to resubmit the data needed to load the page.
Error code: 500


Everything else works fine, but, it seems to think that the server goes down while I'm trying to submit the rule. Everything else on the server functions just fine, and this only occurs when I'm trying to set a rule.

Browser is Chrome; Same error occurs with testing in IE.
Server is running Debian Linux x64, Apache2, PHP5

Any ideas?

This is the song....

Shin Chogan
Federal Navy Academy
Gallente Federation
#16 - 2013-09-24 08:14:46 UTC
Xornicon Altair wrote:
Fresh install of both SMF2 and TEA. So far, everything seems to be going smoothly until I try to add a rule and get the following:

Quote:
The website encountered an error while retrieving http://blackwatchsyndicate.com/forum/index.php?action=admin;area=tea;sa=rules;e217bb3d5bd=86af0d286d8f40f9e887b6d834beac86. It may be down for maintenance or configured incorrectly.
Reload this webpage.
Press the reload button to resubmit the data needed to load the page.
Error code: 500


Everything else works fine, but, it seems to think that the server goes down while I'm trying to submit the rule. Everything else on the server functions just fine, and this only occurs when I'm trying to set a rule.

Browser is Chrome; Same error occurs with testing in IE.
Server is running Debian Linux x64, Apache2, PHP5

Any ideas?


Can you get the error out of your apache error logs please ... this doesn't happen for me either on my "production" forums or the one I use for testing.
Nutbolt
University of Caille
Gallente Federation
#17 - 2013-09-24 08:50:49 UTC
I've not been paying close attention and so could be wrong completely, but is this caused by the fact that you need to be logged in to access the file, and when the server tries to, its not logged in (the server, not your PC), so can't access the files needed to check the rules. It's early and I could just be talking nonsense, and no idea how to fix it. Other idea is if your file permissions aren't right for the files which check the rules. In your SMF root directory, is the folder, and all subfolders and files set to the permission 755?
raze 911
SoT
DarkSide.
#18 - 2013-09-24 15:23:25 UTC
Quote:
[ERROR] Api must be of Type Character and show ALL toons :)


i clear my smf_tea_cache but have this msg again. api is correct
Shin Chogan
Federal Navy Academy
Gallente Federation
#19 - 2013-09-24 18:26:31 UTC
raze 911 wrote:
Quote:
[ERROR] Api must be of Type Character and show ALL toons :)


i clear my smf_tea_cache but have this msg again. api is correct



This error will only happen if CCP's servers are returning bad xml/html or if as the error says the key you have provided doesn't show all the toons on the account. You can have the mask correct but if the key is only for a specific character it will not work.
Xornicon Altair
Black Watch Syndicate
#20 - 2013-09-24 19:52:59 UTC
Shin Chogan wrote:
Can you get the error out of your apache error logs please ... this doesn't happen for me either on my "production" forums or the one I use for testing.


[Tue Sep 24 19:51:06 2013] [error] [client 205.250.184.170] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/www/forum/Sources/TEA.php:1981\nStack trace:\n#0 /home/www/forum/Sources/TEA.php(1981): SimpleXMLElement->__construct('')\n#1 /home/www/forum/Sources/TEA.php(1630): TEA->settings_rules('http://blackwat...')\n#2 /home/www/forum/Sources/TEA.php(3417): TEA->Settings('http://blackwat...')\n#3 /home/www/forum/Sources/Admin.php(519): ModifyTEASettings()\n#4 [internal function]: AdminMain()\n#5 /home/www/forum/index.php(151): call_user_func('AdminMain')\n#6 {main}\n thrown in /home/www/forum/Sources/TEA.php on line 1981, referer: http://blackwatchsyndicate.com/forum/index.php?action=admin;area=tea;sa=rules;save

This is the song....

123Next pageLast page