FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Using fudapi.inc.php and forum_login.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Using fudapi.inc.php and forum_login.php [message #30455] Sun, 26 February 2006 16:08 Go to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

So i need to have our Gallery page authenticate users against the FUDforum DB user list and thus have users login once to use either forum or gallery seamlessly.

So... do i simply replace the login page for the gallery software using my own HTML form, calling the forum_login.php file which i include in it a small control structure calling the external_fud_login function passing it the user ID from the HTML login form i created ??

From all i have read, it looks like this FUDapi is the best thing since sliced bread, but i am just unsure how they are meant to be used.

Re: Using fudapi.inc.php and forum_login.php [message #30456 is a reply to message #30455] Sun, 26 February 2006 16:24 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yes, you could do that, you'd have it authenticate the user and pass the forum user_id to the gallery which would then associate it with a person's gallery.

FUDforum Core Developer
Re: Using fudapi.inc.php and forum_login.php [message #30458 is a reply to message #30456] Sun, 26 February 2006 19:11 Go to previous messageGo to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

Ilia wrote on Mon, 27 February 2006 03:24

.....and pass the forum user_id to the gallery which would then associate it with a person's gallery.


How would one do that ??

Create users in the Gallery's database with the same username as the Forum manually first ??


Actually, how it will be set up is more on group permissions. That is, once logged in, if part of a certain group they would have access to the gallery, otherwise there's nothing for them to be able to access in the gallery, ie there's no public access to the gallery and nothing for reg users, only users part of our "special" group.


[Updated on: Mon, 27 February 2006 11:12]

Report message to a moderator

Re: Using fudapi.inc.php and forum_login.php [message #30466 is a reply to message #30458] Mon, 27 February 2006 14:17 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to modify the gallery to store the forum user id in its users table. That way it can associate forum accounts to its own account system. For group permissions you need to query the group_members table.

FUDforum Core Developer
Re: Using fudapi.inc.php and forum_login.php [message #30472 is a reply to message #30466] Mon, 27 February 2006 15:25 Go to previous messageGo to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

Ilia wrote on Tue, 28 February 2006 01:17

You need to modify the gallery to store the forum user id in its users table. That way it can associate forum accounts to its own account system. For group permissions you need to query the group_members table.



Firstly, thanx alot for this outstanding support again. Best forum software outand best support.

So need to manually add all current users and then new users as they join the forum, to the Gallery DB ??

I am using Gallery 2

It has a layout like so in the User table

+-----------------+--------------+------+-----+---------+-------+
| Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| gid             | int(11)      |      | PRI | 0       |       |
| guserName       | varchar(32)  |      | UNI |         |       |
| gfullName       | varchar(128) | YES  |     | NULL    |       |
| ghashedPassword | varchar(128) | YES  |     | NULL    |       |
| gemail          | varchar(128) | YES  |     | NULL    |       |
| glanguage       | varchar(128) | YES  |     | NULL    |       |
+-----------------+--------------+------+-----+---------+-------+


So i just make the id's and userName's line up and match like they do in the forums DB ??(an exact duplicate)

hmmmm this is getting a tad confusing ...

[Updated on: Mon, 27 February 2006 15:40]

Report message to a moderator

Re: Using fudapi.inc.php and forum_login.php [message #30476 is a reply to message #30472] Mon, 27 February 2006 19:20 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I'd suggest adding another field to the table called forum_user_id and using that field to associate the two systems. Based on this id you can then retrieve the actual gallery user id.

FUDforum Core Developer
Re: Using fudapi.inc.php and forum_login.php [message #30494 is a reply to message #30455] Tue, 28 February 2006 11:21 Go to previous messageGo to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

Ok i feel more confused about this now then i did when i first posted, and i was confused then Very Happy

So let me get the system straight.

1) if i use the Fud API to create a login for the gallery, any user that logs in using it will be authenticated for use on the FUDforums....... how do they become authenticated for the gallery ??

2) do i need to disect the login page Gallery2 uses so as to incoporate it into a FUDApi joint login screen for use on the gallery site ??

3) if a user logs into the FUDforum login screen, then they wont be authenticated to use the gallery, thus, do i need to overhaul the existing FUDforum login setup to include authenticating for the gallery ??


On a side note anf FYI, Gallery2 has a similiar set up as FUDforum with an intergration API of its own plus loads of documentation.

[Updated on: Tue, 28 February 2006 20:12]

Report message to a moderator

Re: Using fudapi.inc.php and forum_login.php [message #30500 is a reply to message #30494] Tue, 28 February 2006 14:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, you need to deside what is the "PRIMARY" application. Then what you do is modify the primary application's login script to use API to log the user automatically into the secondary application. Ideally login/passwords are the same in both so you can use the same credentials to authenticate the user.

FUDforum Core Developer
Re: Using fudapi.inc.php and forum_login.php [message #30513 is a reply to message #30455] Tue, 28 February 2006 20:14 Go to previous messageGo to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

ok so i should :

1) alter FUDforus login page to include logging into the gallery.

2) change the link to login on the galleries site to point to the forums login page that has presiously been altered in 1)


So i need to manually copy over all the username/passwords from FUD to the new galleries user tables ??

Re: Using fudapi.inc.php and forum_login.php [message #30528 is a reply to message #30513] Wed, 01 March 2006 18:13 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If you are using MySQL 5.0 you can create a view, but otherwise you need to copy.


FUDforum Core Developer
Re: Using fudapi.inc.php and forum_login.php [message #30537 is a reply to message #30455] Wed, 01 March 2006 21:09 Go to previous messageGo to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

I think if i follw this step by step, i should be all good

http://codex.gallery2.org/index.php/Gallery2:Embedding:Integration#Embeddin g_and_Integration_of_Gallery_2

Re: Using fudapi.inc.php and forum_login.php [message #34247 is a reply to message #30455] Mon, 16 October 2006 06:08 Go to previous messageGo to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

Making a little head way into this and understanding the FUDapi alot better along the way [alot being relative Smile ]

http://gallery.menalto.com/node/54998

Needing to replicate all my forum users into the gallery2's DB I have [another] question.

To do this, do I get a list of all the userID's from the DB and then use that to iterate through them using the fud_fetch_user function to grab the details I need to punch into Galley2's DB ?

Seems to make sense to me...
Re: Using fudapi.inc.php and forum_login.php [message #34259 is a reply to message #34247] Mon, 16 October 2006 13:38 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
That sounds like a good approach.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how view one image in a post
Next Topic: pre-approval group?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:08:26 GMT 2024

Total time taken to generate the page: 0.02532 seconds