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.
 

phpBB 3.x API Registration Mod v6+

Author
StuofBeef
The Gold Angels
Sixth Empire
#901 - 2013-08-27 21:36:30 UTC
is there any sort of walk through on how to integrate with ejabberd? I saw on one of your tutorials you went into ejabberd_side.php but you didn't explain any more other than that. basically I want my forum users to get automatically registered for ejabberd. In testing at the moment i get the following error after entering the server address and a known username/password for the server

"Could not connect to Jabber server.

Error: open_socket() - No connection could be made because the target machine actively refused it.

Error: connect() #2"

I am only testing internally at the moment though with ejabberd running on a dedicated linux box but I can connect to the service fine using pidgin on my desktop showing that firewall isn't the problem.

Other than this minor issue, great work you are doing Cyerus
Yugo Reventlov
Keeping Up Appearances
#902 - 2013-08-27 23:04:45 UTC  |  Edited by: Yugo Reventlov
StuofBeef wrote:
is there any sort of walk through on how to integrate with ejabberd? I saw on one of your tutorials you went into ejabberd_side.php but you didn't explain any more other than that. basically I want my forum users to get automatically registered for ejabberd. In testing at the moment i get the following error after entering the server address and a known username/password for the server

"Could not connect to Jabber server.

Error: open_socket() - No connection could be made because the target machine actively refused it.

Error: connect() #2"

I am only testing internally at the moment though with ejabberd running on a dedicated linux box but I can connect to the service fine using pidgin on my desktop showing that firewall isn't the problem.

Other than this minor issue, great work you are doing Cyerus


First, set up external authentication in ejabberd config (usually /etc/ejabberd/ejabberd.cfg):

Comment out this line:
Quote:
{auth_method, internal}.

Becomes:
Quote:
%%{auth_method, internal}.


Then activate external authentication:
Quote:
{auth_method, external}.
{extauth_program, "/opt/ejabberd_ext_auth/ejabberd_side.php"}.


This file is the ejabberd_side.php file provided in cyerus' package. It must be executable by the ejabberd system user. In this file you need to adjust the lines 7 and 8:
Quote:
$auth->setSecret("secret between ejabberd and phpbb"); // Set the secret password to allow us access
$auth->setForumURL("http://your.forum.url.com"); // Set the location where the base phpBB forum can be found at ( without the trailing '/' )


Also, if you use logging make sure the logfile exists and is writeable by ejabberd (see line 16 of ejabberd_side.php). For me this is /var/log/ejabberd/exauth_phpbb.log

You can now restart the ejabberd daemon.


Then you have to set your Eve API mod in phpBB for Jabber. In the Admin panel go to General -> Eve API Modules -> Jabber: Enable jabber and ejabberd management. Set the same secret as the one you entered in ejabberd_side.php.


Now try to authenticate to jabber in a Jabber client using your eve character name as jabber user. Replace spaces by underscores!

Also, if people have apostrophe's in their character names, you will have to hack /xmlrpc/forum_side.php to translate jabber users to forum names/Eve Character names.

Check for login attempts in /var/log/ejabberd/exauth_phpbb.log. Here you can at least check if they got their username and server correct. And if they actually tried connecting to Jabber ;)


EDIT: some more info about ejabberd external authentication: It is more limited than standard internal authentication. For example: you cannot use the "Search for users" feature in Pidgin. External authentication doesn't support that. You CAN however define shared rosters in your ejabberd admin. I recommend checking out the special @online@ roster (the @all@ doesn't work in external authentication).
Tron 3K
Caldari Provisions
Caldari State
#903 - 2013-08-28 12:47:32 UTC  |  Edited by: Tron 3K
I've never used PHPBB but didn't think it'd be difficult either.. I installed a new forum, installed automod, installed this mod through automod, added my corp, added my api to my character, and did the purging and refreshing of the templates.

So what does this mod exactly do? Cause I'm not seeing it show anything, it doesn't even show my Avatar that I told it to get.

Did I miss some step or is there something I have to install certain things?

*EDIT* Anyone have a working site so I can take a look at also what it should be doing? Thanks!
Yugo Reventlov
Keeping Up Appearances
#904 - 2013-08-28 12:56:09 UTC  |  Edited by: Yugo Reventlov
Tron 3K wrote:
I've never used PHPBB but didn't think it'd be difficult either.. I installed a new forum, installed automod, installed this mod through automod, added my corp, added my api to my character, and did the purging and refreshing of the templates.

So what does this mod exactly do? Cause I'm not seeing it show anything, it doesn't even show my Avatar that I told it to get.

Did I miss some step or is there something I have to install certain things?

*EDIT* Anyone have a working site so I can take a look at also what it should be doing? Thanks!


Did you use the correct Eve character name as your forum username?

Did you install automod and the UMIL mod as mentioned in the installation video?

Are you using a non-default template? In that case you need to mod your template to display the eve API fields during registration and in your user profile pages. How to do this is also explained in the installation video, after about 35-40 minutes if I recall correctly.
Tron 3K
Caldari Provisions
Caldari State
#905 - 2013-08-28 13:23:17 UTC  |  Edited by: Tron 3K
Yugo Reventlov wrote:
Tron 3K wrote:
I've never used PHPBB but didn't think it'd be difficult either.. I installed a new forum, installed automod, installed this mod through automod, added my corp, added my api to my character, and did the purging and refreshing of the templates.

So what does this mod exactly do? Cause I'm not seeing it show anything, it doesn't even show my Avatar that I told it to get.

Did I miss some step or is there something I have to install certain things?

*EDIT* Anyone have a working site so I can take a look at also what it should be doing? Thanks!


Did you use the correct Eve character name as your forum username?

Did you install automod and the UMIL mod as mentioned in the installation video?

Are you using a non-default template? In that case you need to mod your template to display the eve API fields during registration and in your user profile pages. How to do this is also explained in the installation video, after about 35-40 minutes if I recall correctly.


I must of missed the UMIL mod part. As for forum name and default yes to both of those.

*EDIT* New Forum, automod Installed, UMIL Installed, API Mod Installed, Purged Cache, prosilver 2 default styles refreshed............ Fail...
Yugo Reventlov
Keeping Up Appearances
#906 - 2013-08-28 13:48:14 UTC
Define "fail". What do you expect to see/happen that you don't see/doesn't happen? The more information you provide, the more likely someone can help.
Tron 3K
Caldari Provisions
Caldari State
#907 - 2013-08-28 13:59:40 UTC
Yugo Reventlov wrote:
Define "fail". What do you expect to see/happen that you don't see/doesn't happen? The more information you provide, the more likely someone can help.

Thats my point what is it suppose to show...? The pictures by the OP shows the stuff to fill out but no actual pictures of it working. I thought it'd show who I have standings with from the website. Show basic info from the API its pulling from..

tron3k.com/EVE
Yugo Reventlov
Keeping Up Appearances
#908 - 2013-08-28 20:16:17 UTC
Tron 3K wrote:
Yugo Reventlov wrote:
Define "fail". What do you expect to see/happen that you don't see/doesn't happen? The more information you provide, the more likely someone can help.

Thats my point what is it suppose to show...? The pictures by the OP shows the stuff to fill out but no actual pictures of it working. I thought it'd show who I have standings with from the website. Show basic info from the API its pulling from..

tron3k.com/EVE


No, it allows (if you configure it that way) to have people who have standings with you to access your forum and such.

It's not a reporting tool that reports your eve blues, it's a forum that uses your api to decide who can register on your forum.
Tron 3K
Caldari Provisions
Caldari State
#909 - 2013-08-28 21:15:07 UTC
Yugo Reventlov wrote:
Tron 3K wrote:
Yugo Reventlov wrote:
Define "fail". What do you expect to see/happen that you don't see/doesn't happen? The more information you provide, the more likely someone can help.

Thats my point what is it suppose to show...? The pictures by the OP shows the stuff to fill out but no actual pictures of it working. I thought it'd show who I have standings with from the website. Show basic info from the API its pulling from..

tron3k.com/EVE


No, it allows (if you configure it that way) to have people who have standings with you to access your forum and such.

It's not a reporting tool that reports your eve blues, it's a forum that uses your api to decide who can register on your forum.


Oh.... Gotcha.. Well it does also do the eve fit stuff in the forums so when it was talking about that stuff I figured it'd show a little bit more stuff..
StuofBeef
The Gold Angels
Sixth Empire
#910 - 2013-08-29 22:21:48 UTC
Thanks for that Yugo, i'll have a look at the weekend when had a bit more sleep and hopefully figure it all out Smile Was close to saying no we aren't having jabber the other day, but i've come this far so may as well give it ago
Yugo Reventlov
Keeping Up Appearances
#911 - 2013-08-30 09:28:57 UTC
StuofBeef wrote:
Thanks for that Yugo, i'll have a look at the weekend when had a bit more sleep and hopefully figure it all out Smile Was close to saying no we aren't having jabber the other day, but i've come this far so may as well give it ago


Believe me, I've been there :)
StuofBeef
The Gold Angels
Sixth Empire
#912 - 2013-09-01 01:59:35 UTC  |  Edited by: StuofBeef
ok am back to pulling my hair out again....Shocked

followed all your instructions to the letter, I have a ejabberd_side.php on the ejabberd server under /opt/ejabberd_ext_auth/ and set to writeable, i have copied the secret password and entered in the forums config under eve api modules > jabber.

Now when I try to put my name in and the server address I get the following, note this is with the server local IP address, ejabberd is on a seperate virtual machine to the rest of the site but still within my local network

link to image

now that to me looks like it is trying to pick up the server from jabber.org somewhere? I went to their site but there is no option for registration.

I have also tried doing this with the external ip address from my laptop via a mobile connection (so i'm not on the local network) and i get

"Could not connect to Jabber server.

Error: open_socket() - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Error: connect() #2"

I have checked that port 5222 is open so not so sure what to do next. Cry
StuofBeef
The Gold Angels
Sixth Empire
#913 - 2013-09-01 04:02:49 UTC
ignore me, installed a turnkey linux distro and all is working fine now! Big smileBig smile
StuofBeef
The Gold Angels
Sixth Empire
#914 - 2013-09-01 19:49:15 UTC  |  Edited by: StuofBeef
and im back to pulling hair out. Although jabber is fine now for some reason teamspeak server groups aren't being assigned even though I haven't changed anything. I've checked the server logs and can see serveradmin connects (id:1) then disconnects less than a minute later.

nickname in teamspeak is exactly the same as on the forum, when assign the uid in the forum enter the password and hit save nothing happens, where previously you would get "server group assigned" on teamspeak now i get nothing.

Been into the control panel as admin to eve api modules > alliances, enable api check yes, alliance name is in there, assigned to alliance member group, default group no, assign teamspeak group 11 (which is same as on the server) Jabber: yes

Baffled... What?
StuofBeef
The Gold Angels
Sixth Empire
#915 - 2013-09-01 20:02:58 UTC
...and now its working ha. Random. I dont think it likes that i've been using one laptop for testing and seemed to of got some sort of memory of the uids despite me kicking all the uids out the server first.
ILLADEN
T.R.I.A.D
Ushra'Khan
#916 - 2013-09-01 22:19:10 UTC  |  Edited by: ILLADEN
If the faction warfare config is enabled, and a neutral tries to register with no militia, a bad request is returned from the API server, gets displayed and interuppts the registration. I have tried to write some error handling but failed.

Quote:
$handle = curl_init($result);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);


$response = curl_exec($handle);


$httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
if($httpCode == 400) {
$devilbug == 1;
}
curl_close($handle);

if ($devilbug == 1){
$foundFactionWarfare = true;
$charArray["forumGroups"][$config['eveapi_fw_m_group']] = $config['eveapi_fw_m_default'];
$charArray["TSGroups"][] = $config['eveapi_fw_m_tsgroup'];
}


or

Quote:
else
{
$foundFactionWarfare = true;
$charArray["forumGroups"][34] = $config['eveapi_fw_m_default'];
$charArray["TSGroups"][] = 150;
}
another salve
State War Academy
Caldari State
#917 - 2013-09-05 11:38:36 UTC  |  Edited by: another salve
.....

Great tool!

Fist I have problem with file system permisssions, and the installation was not sucessful, but it seems can fix now.
Snitch Ashor
Republic Military School
Minmatar Republic
#918 - 2013-09-06 06:43:12 UTC
Hi,

I have one small request. We would like to use the fitting display in conjunction with a spoiler bbcode. In principal this works however whenever the fitting contains special chars such as an apostrophe these get converted to the html entities like &...; by the bbcode and the fitting fisplay will not work anymore. Anyone has an idea how to solve this?

Cheers,
Snitch
Detes cald
Deep Core Mining Inc.
Caldari State
#919 - 2013-09-14 16:18:44 UTC
Hello Folks!! the mod with api registration is wonderfull!!

Though i want to use in my forum the Advanced BBCode Box 3 module and as i have seen it replaces the bbcodes tab with its own !!

The problem is that i have no way to make the eve api bbcodes to apear in this mod !!
The bbcodes are working if i use the syntax in the phpbb posting area. i need to find a way to add in the module above those buttons as well but i cant find any way as it seems the abbc3 module stores its bbcodes to database!
I am wondering if i could find the html replacements of the eve api bbcodes and add them there if it works but im searching the source of the eve api and cant find something related to :/ any help please !!
Detes cald
Deep Core Mining Inc.
Caldari State
#920 - 2013-09-14 17:10:46 UTC
Snitch Ashor wrote:
Hi,

I have one small request. We would like to use the fitting display in conjunction with a spoiler bbcode. In principal this works however whenever the fitting contains special chars such as an apostrophe these get converted to the html entities like &...; by the bbcode and the fitting fisplay will not work anymore. Anyone has an idea how to solve this?

Cheers,
Snitch


that depends on the forum what u html replacement code the spoiler is using !! ckeck if is using text or intext mode that could be the hint !!