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
#141 - 2011-10-14 02:58:11 UTC
Are you using the current version of the script (1.57)?

I made a character with a single-quote in the name, tested it as you said, it didn't work as you said, and I fixed it and did testing on it. It should be working with 1.57. It wasn't working because phpBB3's clean function converts single-quotes into "modifier letter prime" characters (a character that must be encoded in UTF-8 as 2 bytes).
TA5E
Fusion Enterprises Ltd
Pandemic Horde
#142 - 2011-10-14 17:58:55 UTC
Hey Magotchi, I've noticed that after my users become part of the API group, they dont get assigned that group as a default group.
Rache Le'Bonbon
Aliastra
Gallente Federation
#143 - 2011-10-14 18:22:08 UTC
yea I noticed you did an update, so I updated and tested. let me do some more testing, however I did notice this time it made my clean name as! rache leʹbonbon not rache le'bonbon somehow it got the Ê in it! lol
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#144 - 2011-10-14 21:23:21 UTC  |  Edited by: MisterMagotchi
TA5E:
I don't know what's happening for you, but all of my members have their default group (in phpBB) set as the group it assigned them to. As has been said before, default group colors are currently not working with this, so don't base it on that.

Rache:
The way that shows up for you is actually sort of correct, in that that's how the symbol shows up when you aren't viewing it as Unicode, but since you said it looked like a single-quote last time we talked, it seems that on your host it must be that it's inserting the symbol wrong, not that you're viewing it wrong. I may have to look into inserting the name value as hexadecimal instead of as a string to ensure it gets properly inserted on all platforms. It's supposed to show as a modifier letter prime symbol.
Rache Le'Bonbon
Aliastra
Gallente Federation
#145 - 2011-10-15 03:51:16 UTC  |  Edited by: Rache Le'Bonbon
Here is a mod I have made for this script by MisterMagotchi. This will allow you to set the EVE Avatar as you forum characters Avatar.

I recommend you make any backups before continuing, i am not responsible for you messing your scripts up.


Instructions on how to setup avatar in script.

MisterMagotchi may or may not include this in his script as a release. He is welcome to include it if he see's fit, as he is the author of the main script . I am just trying to add some more function to it that others may enjoy.

10/19/2011: Updated script.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#146 - 2011-10-15 20:42:49 UTC  |  Edited by: MisterMagotchi
It looks like a good idea, and your code seems fine. I'll see what I can do in the next release or so.

Update 2011-10-20 (after new release below): I ended up changing your code quite dramatically. In my version, the phpBB settings regarding the use of avatars are not changed every time a user is checked (or at all for that matter). To do that and have it work, I would also have had to get phpBB to clear (or update) its global data cache (cache/data_global.php). For the sake of simplicity, to reduce the load of the script (not making the update query every time and not clearing or altering the cache every time a user is checked), and for a more predictable user experience for admins changing settings in the ACP, I opted to not have the script make such changes, and instead, admins must enable remote avatars in the ACP (and it's documented as such). The feature as a whole now only uses one single MySQL query (an UPDATE query that, if not using forced mode, adds an extra clause to only update the user if their avatar isn't already set). I also tweaked the rest of the code to conform to the way I do things (config. naming, indentation, etc.).
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#147 - 2011-10-21 01:12:37 UTC  |  Edited by: MisterMagotchi
New version released.

From my changelog:
Quote:
2011-10-20 - 1.58 - Removed dependency on PHP mbstring module inadvertently caused by last update's single-quote fix. Made registration script force usage of UTF-8 character set when updating a user's username_clean (related to single-quote issue). Added ability to set EVE character avatars as forums avatars (code idea by Rache Le'Bonbon). Minor documentation changes.

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

Changed files (hand-edit): config.inc.php (added EVE Avatars section toward the bottom, other very minor formatting and textual changes)
Ulthary Chinmay
Imperial Academy
Amarr Empire
#148 - 2011-10-21 18:19:44 UTC
Could it be requested that the scritp checks for director role and if the person got it then its add's them into an "director" group also
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#149 - 2011-10-22 03:05:05 UTC  |  Edited by: MisterMagotchi
I've looked into it, and I don't plan to add that feature, Uithary.

Some possible ways I've thought of as reasonable for doing it:

  • Every X hours, grab corp/MemberTracking.xml.aspx for each corp., and cache a list of the character IDs of the all the directors (based on the "roles" bitmask) and what corp. ID they're in (either in a file or in the database). Use this data to determine if a user is a director of their corp. as they are checked. This is bad simply because I find it needlessly complex for a limited benefit.
  • Allow Corporation keys, which are equivalent to Character keys (as opposed to Account/all-character keys), marking anyone as a director of their corp. if their provided key is a Corporation key. This is bad because directors would then not be required to give an Account key (with info. about all characters in their account), as is the default setting, and as I presume a lot of admins. would want.

Additionally, the config. would of course require a couple more settings (2 phpBB groups and 2 TS3 groups per corp. instead of 1 for each), with a mechanism for disabling the feature per-corp. (probably just using FALSE or 0 for the 2nd group).

There's a basic program plan, and I may soften on the idea eventually, but I don't feel like implementing the feature, given the things I said above and that I don't like the added complexity.

EDIT 2011-10-22:
Apparently corp/MemberTracking.xml.aspx requires a Corporation API key to even work. I didn't notice that. There may be another way to get that info out, though.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#150 - 2011-10-22 05:30:40 UTC
I accidentally used nowdoc syntax again on line 221 of index.php ('EOL') instead of heredoc syntax (EOL), so those using PHP less than 5.3 would have had issues with yesterday's release.

I've updated the package, but I didn't change the version number or date.
Ulthary Chinmay
Imperial Academy
Amarr Empire
#151 - 2011-10-22 16:41:36 UTC
MisterMagotchi wrote:

There's a basic program plan, and I may soften on the idea eventually, but I don't feel like implementing the feature, given the things I said above and that I don't like the added complexity.


i hope you pick to make it anyway since im not that good with coding, like i dont know how to do it xD, but would really love you if you made it :)
Ulthary Chinmay
Imperial Academy
Amarr Empire
#152 - 2011-10-23 14:12:53 UTC
Quote:
EDIT 2011-10-22:
Apparently corp/MemberTracking.xml.aspx requires a Corporation API key to even work. I didn't notice that. There may be another way to get that info out, though.


If CEO puts in the Corp key then it could cache directors char ID's and auto place them in the 2nd group when they enter a char API i guess
Sjet Idahon
Relentless Steel Trading Company
#153 - 2011-10-24 21:03:21 UTC
Will it be possible to add users to a CHANNELgroup? I will create Corp only Channels on my Server in which the other Corps of my Allianz are not able to join. With the Right System of Teamspeak, this is only able with Channelgroups, not with Servergroups.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#154 - 2011-10-25 06:59:26 UTC
I don't have any plans to add channel groups, but I will spend some time looking into it, and if it's not very difficult to add, I may just do it. Don't count on it, though.
Eugene Spencer
Set Phasers To Malky
#155 - 2011-10-26 08:40:09 UTC
Hello!

In the next version, would it be possible to remove the styling from index.php and stick it in a seperate CSS file? It'll make modifying the styles easier :)

Thanks!

Eugene

I have a specific comb for my beard.

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#156 - 2011-10-26 21:39:10 UTC
In what way would it be easier: upgrading purposes only or for some other reason? As it's just one uninterrupted block of CSS code, and it only relates to that one page/script, it seems logical to me for it to be in the script itself. If it's that you believe it will make upgrades easier, as I don't change the CSS often between different versions, you're right, but copying one block of CSS of your custom CSS into the file every time you upgrade it doesn't seem like a big issue to me, and I believe keeping it simple outweighs the benefit of not having to do that.
Gaitrie
MagmaTech Industries
#157 - 2011-10-26 23:02:05 UTC
Great work on this mod for Eve.

My provider is using an older version of php (yes... I know :-) )

I have followed the guide and installing and changing the config files. I have replaced all items in the config.inc.php. I created the link and then I just get a blank page... so no idea what I am doing wrong.

Also have a question for entries in the config.inc.php file - below are the first couple lines of the TS3 setup.

//Teamspeak 3 connection settings
$config['TS Server']['Server'] = 'localhost'; //If not localhost, your TS server will need to whitelist your web server.
$config['TS Server']['Port'] = 9987; //Port for the virtual server you want to manage. Default is 9987
$config['TS Server']['SQ Port'] = 10011; //Default is 10011
$config['TS Server']['SQ Username'] = 'serveradmin';
$config['TS Server']['SQ Password'] = 'mytssqpassword';
$config['TS Server']['Script Nickname'] = 'EVE Registration Bot'; //If over 30 characters, TS connection will fail.

As in my case (older php) I need to replace all text in bold with my details and leave the ' ' in place. But why do the ports (9987 and 10011) do not have the ' ' ?

And does anyone have the setup files for a php5.2 so I can compare and see what is changed to get this to work.

Mine is Bigger **than **Yours ! <<<

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#158 - 2011-10-26 23:27:10 UTC
If you're getting a blank page when you visit index.php "eg. http://example.com/eve-api-reg/", check your Apache error log (or other places where PHP errors are shown on your host), and see if there are any errors being generated for the script.

The config.inc.php file doesn't need to be edited any differently for those with an older version of PHP than 5.3.

The reason that the config. options composed solely of numbers don't have quotes is because they don't need them. In this case, the script would work identically even if you did put single or double quotes around those port numbers. In more technical terms, I'm assigning them as integers, but PHP is weakly typed, and therefore even though I plan to use the numbers in a string context later in the code, I'm not required to specify them as strings ahead of time. With non-numeric text, though, if I didn't put quotes around it, PHP would assume I was referring to the name of a constant.

If you need some help working through these problems, if you want to give me your TS3 info in a mail, and I can likely help get it figured out. It also helps me to find unexpected bugs or compatibility issues that I wouldn't otherwise notice on my own system.
Gaitrie
MagmaTech Industries
#159 - 2011-10-26 23:44:34 UTC  |  Edited by: Gaitrie
Got it working - now see the Eve API screen. Problem was database not correct, had an additional space and found that out by chekcing the error text file.

Took me like 3 hours :-)

Now the problem I see now is that I am on a windows hosting setup - so how do I setup a cron job as I googled and do not see an option to set it up in windows environment

Also when I fill in the details I get: Error on getting API details from EVE server

Mine is Bigger **than **Yours ! <<<

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#160 - 2011-10-27 01:28:47 UTC
I don't know what Windows hosts provide as a cron equivalent. Basically you need a scheduled task to run the PHP5 executable with that check-users.php script. Locally, this would probably look something like "php.exe C:\path_to_website_root\eve-api-reg\check-users.php". Alternatively, you could allow web access to it (with the assumption it's even blocked, as you're probably not using Apache as your web server, so the .htaccess file is probably doing nothing), and you could remotely access it via the web from another machine via a Scheduled Task or cron job (there are many cron job services if you Google that sort of thing), probably using cURL, or if you really wanted to, through a web browser. There are actually quite a few ways to do it, but all of them would take some explaining, and I really don't want to take the time to support this on Windows. PHP on Windows is somewhat of an unholy abomination in the first place.

A popup saying, "Error getting API data from EVE server." likely means neither the cURL extension for PHP is loaded nor the allow_url_fopen option is available.