Hi,
I am about to start updating the very much out of date and no longer working Postnuke interface.
Due to all the great changes that John has added I have decided that all this interface should do is to :
1. check to see if the postnuke user is logged in
2. if so then skip the password test in phpGedView.
This means that there will need to be a duplication of userids between postnuke and phpGedView - but passwords would not need to be stored in phpGedView.
The reason for this is that there is no way to easily pass across the info like canedit. Also all the enhancements that are going on like mygedview make the creation of userids in phpGedView quite useful.
I would also propose that I write a short script that takes the userid table from postnuke and runs that through the create user code from phpGedView (where the gedview user is missing) to allow this to be synchronised when required from the admin.
are there any views, objections, suggestions ?
cheers
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have coded a simple interface for the MySQL version - will do the index one in a couple days. Now there are some restrictions/features that I would like some feedback on if possible :
1. The program needs the userids to be defined to both Postnuke and phpGedView. this is to allow the use of some of the newer features in gedview - eg editing, themes and others. However you dont need to define the password for the user in gedview unless you want the ability to login there as well as via postnuke. I, personally,do want that ability for some users - ie I want some ppl to be able to login to phpGedView without having access to login to postnuke - so this was a way of doing it.
2. I can write a simple script to copy all users across from postnuke into phpGedView with some default attributes for canedit and admin if ppl think it is worthwhile - haven't done so yet
Is this what people want for the interface - in my view this keeps all the user functionality of phpgedview but allows users who are logged into postnuke to click on the gedview link and be automatically logged into the same userid on gedview(provided it is defined there)
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can't the schema of the database be extended? Or an new table be added, with soime sort of hook for GedView to look up the users id, and perms of the existing postnuke users?
What block type are you using to display gedview?
john
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the issues are around the amount of change that would then have to be introduced into gedview. It would need to go to the postnuke side to lookup the userid and then would need to still be able to store items like the theme, language, admin rights etc.
I have completed a small hook that allows for a simplistic interface (just needs the docs now and someone else to test it besides me) works for index or mysql version.
the interface is via a modload eg http://carey.id.au/modules.php?op=modload&name=phpGedView&file=pgvindex - this transfers control to my pgvindex.php which sets the cookies for pgv_user and passes control to logout in gedview if the user isn't logged in or to login if they are , passing the userid over. There is a minor change in login that checks to see if this is a postnuke call and if so goes to authenticationPostUser function in authentication_mysql.php or authenticaton_index.php (depending on which schem you are using). This simply logs the user on using the passed over userid. So minimal change to gedview
Now I have also written a short script that reads the postnuke user file and creates users on the phpgedview system. This could be run on an irregular basis or as a one off to create the user files in gedview. It doesnt need passwords on the gedview side unless you want to login directly on the gedview site. The load prog sets up default gedviews, canedits, canadmin and also sets a default password for users that can be used if they want to login from the gedview side as well as the postnuke side.
As for the block type - looked at that but found that if I use a postwrap or similar then too much space is taken on the screen with the postnuke stuff - gedview needs a fair amount or real estate so I used the modload approach and go to the full screen
hope that answered the q's ? :-)
always happy to take suggestions or help on it - hoping that someone else will take it on from my skeleton and make it better
cheers
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What Jim has done is essentially what you are suggesting. The pgv_users table now becomes an extension of the postNuke users table. The postNuke table handles the authentication while the pgv_users table uses the username to lookup themes, favorites etc in PhpGedView.
The only requests that I have for it, is that it not use cookies. Just have the pgvindex.php store the $_SESSION['pgv_user'] and skip routing them through the login page but forward them directly to their MyGedView page. Also, the first time a postNuke user comes into the pgvindex.php page, try to look them up in the pgv_users table using the getUser($username) function. If the value returns false then you can automatically create the user. This way you don't have to create a script to automatically transfer the users over from postNuke, just create them as they first come into gedview using the addUser() function. Then you also don't need to worry about creating cookies for the canedit and canadmin values and you don't need to change anything in PhpGedView at all. No need to extend the authentication_mysql.php file, just add the pgvindex.php file and install it in your PGV in your postNuke modules.
--John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
excellent idea, John to add the userid dynamically - will recode to do that :-)
The new prog was already passing control to the mygedview via the login - I can get it to do the authentication functions as well - setting the logged in flag, writing to the log etc. That was all I was using the auth for in this version (was using the $_SESSION concept and had removed the canedit etc cookies and having the gedview code pick that up).
Shouldn't be difficult now to create the dynamic add as I used the addUser and getUser functions in my user copy routine so that it could be compatible across index and mysql versions - can simply move that code into pgvindex
only issue will be around passwords, postnuke appears to encode them differently than gedview so cant move that over - will have to create a dummy password to allow ppl to login directly from gedview if they like. Guess one option would be to go directly to the my account section if this is a created account so they can reset their passwords and mygedview
cheers
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi - just moving along coding on this new (and better) approach and have hit a small issue that I have fixed for my testing but needs a perm fix. The generated line in the config:
$gedarray["config"] = "index/carey.ged_conf.php";
should be:
$gedarray["config"] = "$PGV_BASE_DIRECTORY"."index/carey.ged_conf.php";
this will have no effect on normal ops and is required for me to do the interface.
Can this be done as a standard ?
cheers
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok - this is now done - I have someone who will do a further test for me :-). Looks ok - nicer that I thought it would be - no changes to phpGedView. 2 modules and one conf file for defaults. Will need a couple of changes back in gedview by John to insert the $PGV_BASE_DIRECTORY in a couple of places that were missed then it can be released. Will need the release that John puts those changes in as a base. So when that one comes out I will get my tester to install that and then put in my code and try it.
It takes the validation from postnuke for users. If the user is logged in to PostNuke and not defined in gedview then the interface creates the user in gedview with some info from Postnuke (name, userid and email address) and some defaults supplied in a conf. It then logs the user in. Simple really
I can provide the changes necessary (only two) to 2.60 to make this work if anyone wants to try this earlier - email jim at carey.id.au
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just saw the new PN module so I thought I'd give it a shot. Install seems easy enogh but I have not yet been able to make it work here is what I am seeing using PN .726
-Untar phpGedView in html/modules
-Unzip postgedview-v2 html/modules/phpGedView
-Edit config.php, post-config.php
-chmod 777 authenticate.php config.php index
-Initialise and activate module in PN
-Add link in PN (both directly by URL and by [phpGedView], same effect)
-Click on link to begin configuration, get a blank screen.
Trying to access directly gets me the same thing. What am I not doing correctly? Anyone else have this problem?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Couple of things
1. you need the V2 of the postnuke module
2. you need to have the new 2.61 version of phpGedView installed (dont think that is up there yet) before it will work. If you dont you will get path errors on your gedcom_conf and .themes - depending on your PHP error settings this could produce an error message or a blank screen.
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Apologies - the zip is missing that file - I will send a new version to John.
BUT
you need to wait until the new version 2.61 of gedview comes out before you use this - it is dependant on some changes that John has made before it will work - these are being released in 2.61 (should be in the 2.61 beta if you want to try that).
cheers
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The latest version which works with 2.61.1 for both MySQL and Index files is at http://www.carey.id.au/postgedview-v2.zip . John will also be putting it up on the site in the near future.
Note this REQUIRES the latest version to be in place.
It checks to see if the logged in user in Postnuke is defined in phpgedview - if it is it logs in, if it isn't it creates a user with defaults and passes over email and username from postnuke then logs in. So no double handling of users. Having created the user then, of course the user can login via postnuke or directly if wanted.
Note - it is important that the latest version of postnuke be installed for this to work so that appropriate path info (set up in config.php and your gedcom_conf) are accurate
cheers
jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am about to start updating the very much out of date and no longer working Postnuke interface.
Due to all the great changes that John has added I have decided that all this interface should do is to :
1. check to see if the postnuke user is logged in
2. if so then skip the password test in phpGedView.
This means that there will need to be a duplication of userids between postnuke and phpGedView - but passwords would not need to be stored in phpGedView.
The reason for this is that there is no way to easily pass across the info like canedit. Also all the enhancements that are going on like mygedview make the creation of userids in phpGedView quite useful.
I would also propose that I write a short script that takes the userid table from postnuke and runs that through the create user code from phpGedView (where the gedview user is missing) to allow this to be synchronised when required from the admin.
are there any views, objections, suggestions ?
cheers
Jim
I have coded a simple interface for the MySQL version - will do the index one in a couple days. Now there are some restrictions/features that I would like some feedback on if possible :
1. The program needs the userids to be defined to both Postnuke and phpGedView. this is to allow the use of some of the newer features in gedview - eg editing, themes and others. However you dont need to define the password for the user in gedview unless you want the ability to login there as well as via postnuke. I, personally,do want that ability for some users - ie I want some ppl to be able to login to phpGedView without having access to login to postnuke - so this was a way of doing it.
2. I can write a simple script to copy all users across from postnuke into phpGedView with some default attributes for canedit and admin if ppl think it is worthwhile - haven't done so yet
Is this what people want for the interface - in my view this keeps all the user functionality of phpgedview but allows users who are logged into postnuke to click on the gedview link and be automatically logged into the same userid on gedview(provided it is defined there)
Jim
Jim,
Can't the schema of the database be extended? Or an new table be added, with soime sort of hook for GedView to look up the users id, and perms of the existing postnuke users?
What block type are you using to display gedview?
john
Hi,
the issues are around the amount of change that would then have to be introduced into gedview. It would need to go to the postnuke side to lookup the userid and then would need to still be able to store items like the theme, language, admin rights etc.
I have completed a small hook that allows for a simplistic interface (just needs the docs now and someone else to test it besides me) works for index or mysql version.
the interface is via a modload eg http://carey.id.au/modules.php?op=modload&name=phpGedView&file=pgvindex - this transfers control to my pgvindex.php which sets the cookies for pgv_user and passes control to logout in gedview if the user isn't logged in or to login if they are , passing the userid over. There is a minor change in login that checks to see if this is a postnuke call and if so goes to authenticationPostUser function in authentication_mysql.php or authenticaton_index.php (depending on which schem you are using). This simply logs the user on using the passed over userid. So minimal change to gedview
Now I have also written a short script that reads the postnuke user file and creates users on the phpgedview system. This could be run on an irregular basis or as a one off to create the user files in gedview. It doesnt need passwords on the gedview side unless you want to login directly on the gedview site. The load prog sets up default gedviews, canedits, canadmin and also sets a default password for users that can be used if they want to login from the gedview side as well as the postnuke side.
As for the block type - looked at that but found that if I use a postwrap or similar then too much space is taken on the screen with the postnuke stuff - gedview needs a fair amount or real estate so I used the modload approach and go to the full screen
hope that answered the q's ? :-)
always happy to take suggestions or help on it - hoping that someone else will take it on from my skeleton and make it better
cheers
Jim
John,
What Jim has done is essentially what you are suggesting. The pgv_users table now becomes an extension of the postNuke users table. The postNuke table handles the authentication while the pgv_users table uses the username to lookup themes, favorites etc in PhpGedView.
The only requests that I have for it, is that it not use cookies. Just have the pgvindex.php store the $_SESSION['pgv_user'] and skip routing them through the login page but forward them directly to their MyGedView page. Also, the first time a postNuke user comes into the pgvindex.php page, try to look them up in the pgv_users table using the getUser($username) function. If the value returns false then you can automatically create the user. This way you don't have to create a script to automatically transfer the users over from postNuke, just create them as they first come into gedview using the addUser() function. Then you also don't need to worry about creating cookies for the canedit and canadmin values and you don't need to change anything in PhpGedView at all. No need to extend the authentication_mysql.php file, just add the pgvindex.php file and install it in your PGV in your postNuke modules.
--John
excellent idea, John to add the userid dynamically - will recode to do that :-)
The new prog was already passing control to the mygedview via the login - I can get it to do the authentication functions as well - setting the logged in flag, writing to the log etc. That was all I was using the auth for in this version (was using the $_SESSION concept and had removed the canedit etc cookies and having the gedview code pick that up).
Shouldn't be difficult now to create the dynamic add as I used the addUser and getUser functions in my user copy routine so that it could be compatible across index and mysql versions - can simply move that code into pgvindex
only issue will be around passwords, postnuke appears to encode them differently than gedview so cant move that over - will have to create a dummy password to allow ppl to login directly from gedview if they like. Guess one option would be to go directly to the my account section if this is a created account so they can reset their passwords and mygedview
cheers
Jim
Hi - just moving along coding on this new (and better) approach and have hit a small issue that I have fixed for my testing but needs a perm fix. The generated line in the config:
$gedarray["config"] = "index/carey.ged_conf.php";
should be:
$gedarray["config"] = "$PGV_BASE_DIRECTORY"."index/carey.ged_conf.php";
this will have no effect on normal ops and is required for me to do the interface.
Can this be done as a standard ?
cheers
Jim
sorry - forgot also need:
$THEME_DIR = "$PGV_BASE_DIRECTORY"."themes/standard/";
in the gedcom_conf.php generated files stored in index - down the bottom of the file.
apologies for that (when will the next release be out with the changes in it so I can use that release as the base release in my docs ?0
cheers
Jim
Hi Jim,
Can do. I'll add it to the CVS right now.
--John
Ok - this is now done - I have someone who will do a further test for me :-). Looks ok - nicer that I thought it would be - no changes to phpGedView. 2 modules and one conf file for defaults. Will need a couple of changes back in gedview by John to insert the $PGV_BASE_DIRECTORY in a couple of places that were missed then it can be released. Will need the release that John puts those changes in as a base. So when that one comes out I will get my tester to install that and then put in my code and try it.
It takes the validation from postnuke for users. If the user is logged in to PostNuke and not defined in gedview then the interface creates the user in gedview with some info from Postnuke (name, userid and email address) and some defaults supplied in a conf. It then logs the user in. Simple really
I can provide the changes necessary (only two) to 2.60 to make this work if anyone wants to try this earlier - email jim at carey.id.au
Jim
Is there a PN module? Would love to use it on my site!
Yes - just about to be released - don't use the V1 version sitting in Files - it won't work - the new one will
cheers
Jim
Just saw the new PN module so I thought I'd give it a shot. Install seems easy enogh but I have not yet been able to make it work here is what I am seeing using PN .726
-Untar phpGedView in html/modules
-Unzip postgedview-v2 html/modules/phpGedView
-Edit config.php, post-config.php
-chmod 777 authenticate.php config.php index
-Initialise and activate module in PN
-Add link in PN (both directly by URL and by [phpGedView], same effect)
-Click on link to begin configuration, get a blank screen.
Trying to access directly gets me the same thing. What am I not doing correctly? Anyone else have this problem?
Thanks!
Couple of things
1. you need the V2 of the postnuke module
2. you need to have the new 2.61 version of phpGedView installed (dont think that is up there yet) before it will work. If you dont you will get path errors on your gedcom_conf and .themes - depending on your PHP error settings this could produce an error message or a blank screen.
Jim
hmm
i just tried to install the module on my homepage.
I made a lib on my site "site/module/phpGedView"
Then i upload the phpGedView 2.60.
Then i cange the Config.php to my stile, and upload the.
config.php "sample"
post-congif.php
postgedview.php
Initiliaze the module and activated it.
Then i wrote the Line
http://mysite/modules.php?op=modload&name=phpGedView&file=pgvindex
But then i just get to the error page.
But i found out that i am missing the pgvindex.php file. So where do i get that?? it not in the module file.
Apologies - the zip is missing that file - I will send a new version to John.
BUT
you need to wait until the new version 2.61 of gedview comes out before you use this - it is dependant on some changes that John has made before it will work - these are being released in 2.61 (should be in the 2.61 beta if you want to try that).
cheers
Jim
The latest version which works with 2.61.1 for both MySQL and Index files is at http://www.carey.id.au/postgedview-v2.zip . John will also be putting it up on the site in the near future.
Note this REQUIRES the latest version to be in place.
It checks to see if the logged in user in Postnuke is defined in phpgedview - if it is it logs in, if it isn't it creates a user with defaults and passes over email and username from postnuke then logs in. So no double handling of users. Having created the user then, of course the user can login via postnuke or directly if wanted.
Note - it is important that the latest version of postnuke be installed for this to work so that appropriate path info (set up in config.php and your gedcom_conf) are accurate
cheers
jim