Page 1 of 1

IPB + L2J

Posted: Sun Aug 10, 2014 1:32 am
by mobius
Hello, i was wondering about if its possible to use the ipb and l2j account tables as 1

I played a server where you only create a account on his ipb forum and you can access to the game

Re: IPB + L2J

Posted: Thu Aug 14, 2014 1:57 pm
by mobius
noone know?

Re: IPB + L2J

Posted: Thu Aug 14, 2014 2:55 pm
by DrHouse
Just add some lines on IPB registration script to automatically create a new l2j account on the loginserver table. I don't know if IPB uses the same auth system (encoding, data structure) but you might want to keep things separated for security (maybe for performance too) rather than read from the same table.

Re: IPB + L2J

Posted: Thu Aug 14, 2014 7:20 pm
by Zealar
Ofc is can also there is few ways.

1) Edit L2 server to use forum account table for auth the login.
2) Edit IPB login to use L2 account table.
3) (and maybe best way) made a script when register in one palace like forum to automatic register in server too. Ofc you will need some validation checks before that.

Re: IPB + L2J

Posted: Fri Aug 15, 2014 3:47 am
by mobius
i was looking the php script of registration form of ipb to add some lines, then make it to add email, username and pass to the l2 db but i cannot find it

but a better way would be try to merge both tables, to use only 1 table for l2j and ipb.. because this way i might be able to make scripts that had to take information from the characters table in l2gs db like

$blah1= "SELECT char_name from characters WHERE account_name='theloggedaccount'";

then the player can select between all his characters

and with this i would be able to make many many different scripts

like list all the online clan members
$blah2= "SELECT clanid from characters WHERE char_name='theselectedcharname'";

$blah3= "SELECT online from characters WHERE clanid='theclanoftheselectedchar'";

only a random example

or change his game password/email, or list all the items inside any of his char, or a unstuck for bugged chars, all without having to open another tab and login again, no, all this inside his member panel in the forum

or even something bigger, like the path of awakening from the off server or a web shop

Re: IPB + L2J

Posted: Fri Aug 15, 2014 1:54 pm
by UnAfraid
IPB has hooks u can implement that without having to touch any of their files, but create a new one.

Re: IPB + L2J

Posted: Thu Aug 21, 2014 3:43 pm
by mobius
I found the solution.
Solved, close the topic pls

Re: IPB + L2J

Posted: Thu Aug 21, 2014 5:46 pm
by Zoey76
mobius wrote:I found the solution.
Solved, close the topic pls
You could also share the solution with other users.

Re: IPB + L2J

Posted: Fri Aug 22, 2014 3:01 pm
by mobius
you must create a new field in the accounts table in l2jdb where you will store the ipb forum member_id
then you can create some kind of panel or any else, where members can create new accounts or manage existent accounts, all you need its to create a register form for l2j where also get the ipb member id and insert it in the field

Random Example:

Image

Image

Image

Now you just need to create a panel that shows only to logged users in the forum, and there you can create scripts to register a game account, manage existent or any else.

I cant share a full panel, because this may vary depending of your page structure (css, etc)
But i will give you a little help =)

Code: Select all

<if test="$this->memberData['member_id']">you are logged (here show the code for logged members)<else />you are not logged (here show the code for guest)</if>
i think that this info would be helpful to integrate any kind of forum or cms with l2j

Re: IPB + L2J

Posted: Sat Aug 23, 2014 12:50 am
by Zoey76
Sticky, it may help someone else, thanks :wink:

Re: IPB + L2J

Posted: Mon Nov 09, 2015 11:07 pm
by Hephzebah
Hello im trying to make a 'create account' section on a web page for the login server. (turned auto account create off in config) But i have a question about how to save a password to the MySql database. If i compare the password hash code from my game account and website account i see those are different from each other while the passwords are the same.
For my website im using sha1, will this bring me in trouble after creating a game account and trying to log in with that password?
I have been searching on the internet and this forum for a while now but i can't find anything really.. also im still a beginner and learning.
Thanks :)

Re: IPB + L2J

Posted: Tue Nov 10, 2015 9:22 am
by Sacrifice
Make a Trigger on forum database engine that make a sentence insert in l2jls tables when new account in forum is created.

Re: IPB + L2J

Posted: Wed Nov 11, 2015 1:44 am
by Zoey76
Hephzebah wrote:Hello im trying to make a 'create account' section on a web page for the login server. (turned auto account create off in config) But i have a question about how to save a password to the MySql database. If i compare the password hash code from my game account and website account i see those are different from each other while the passwords are the same.
For my website im using sha1, will this bring me in trouble after creating a game account and trying to log in with that password?
I have been searching on the internet and this forum for a while now but i can't find anything really.. also im still a beginner and learning.
Thanks :)
In PHP:

Code: Select all

base64_encode(pack("H*", sha1(utf8_encode($pass))))

Re: IPB + L2J

Posted: Wed Nov 11, 2015 11:39 am
by Hephzebah
Thanks a ton! :D

Re: IPB + L2J

Posted: Sat Feb 20, 2016 11:01 am
by regenx
What version of IPB ?
3 or 4? Is this compatible with IPB version 4+?