9, July 2008

PHP User Class and 2 scripts requiring login on one site - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: PHP User Class and 2 scripts requiring login on one site
« previous next »
Pages: [1] Print

Author Topic: PHP User Class and 2 scripts requiring login on one site  (Read 568 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!  Cheesy

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:

Code:
@param string $dbName
@param string $dbHost
@param string $dbUser
@param string $dbPass
@param string $dbTable

For instance, $dbName1, $dbname2, etc.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7946
40629 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 Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
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: Male
Posts: 7946
40629 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.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
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.   Grin
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7481
Tags : TNG login wordpress Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: PHP User Class and 2 scripts requiring login on one site
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Jul 09, 2008, 04:10:56 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 35.595
Total Topics: 7.357
Total Members: 3.663
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: Stepho

22 Guests, 4 Users online :

19 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.