Topic: PHP User Class and 2 scripts requiring login on one site (Read 585 times)
I crack Photoshop!
Posts: 3
22 credits Members referred : 0
« on: Dec 25, 2007, 08:38:40 PM »
I will preface my question by saying that for the most part I know just enough PHP to get myself in trouble, but I'm always willing to learn from my mistakes!
I have a genealogy website the uses the fantastic script The Next Generation of Genealogy Site Building (TNG). I would like to add blogging capability to the site using Wordpress for the purpose of allowing family members to share family stories, traditions and family lore.
Both TNG and Wordpress require logins to access non-public areas and information. I would like to "wrap" TNG around Wordpress so that when a user logs into TNG they are also logged into Wordpress. Would it be possible to use PHP User Class to do this? Can I define the following variables twice:
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 7967
40759 credits Members referred : 3
« Reply #1 on: Dec 26, 2007, 10:55:19 PM »
Hi Heather,
The integration is not working exactly as you say. Instead you are using the database of the one script (eg. wordpress) to use it in any other script you are using with the help of the class.
If this is what you want to do, it is very easy with the php user class (just change the directives for the database tables and fields)
The only thing that we haven't done yet is the cookie part. That means that if someone is autologged in your wordpress blog, he/she wont be auto logged to the rest site, but I am thinking to change that by adding a plugin style code for cookies in later versions.
Hope my answer helps, let me know if I can assist you further
I crack Photoshop!
Posts: 3
22 credits Members referred : 0
« Reply #2 on: Dec 26, 2007, 11:12:26 PM »
Nikolas,
Thank you for the prompt reply! I hope you are enjoying your holiday. If I understand you correctly, I need to start with the Wordpress user table with PHP User Class and adapt the TNG fields to mesh with Wordpress.
This will work if I have people register using the TNG database variables (there are more of them)? I would have thought that would work the other way around...
Thanks!
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 7967
40759 credits Members referred : 3
« Reply #3 on: Dec 26, 2007, 11:14:38 PM »
That's right, you will have to use one user table for all users. Now regarding TNG I can't say anything as I am not familiar with the script.
I crack Photoshop!
Posts: 3
22 credits Members referred : 0
« Reply #4 on: Dec 27, 2007, 12:07:43 AM »
Thank you. There is another script that will serve my purpose and is a lot less complicated as far as user registration is concerned (much fewer fields). I am going to start with that and see what happens. Fortunately, I have a development server on my home computer (WAMP setup) so I can safely break stuff.
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7481