Jump to content
TNG Community
dlassen

tngIL.php doesn't work with getperson.php

Recommended Posts

dlassen

Hi,

Could someone please help out with this issue I am having using tngIL.php:

The purpose of tngIL.php is to:

1) log the user in to TNG based on the users class in e107

2) to generate and execute the correct URL to the desired page.

So for example if a user attempts to access the following URL:

"http://www.jutlink.net/e107/e107_plugins/tngIL/tngIL.php?page=on&dest=whatsnew.php"

the user is looked up in the e107 user list, the user class is determined and a login is made in TNG based on the class.

then the URL:

"http://www.jutlink.net/e107/e107_plugins/tngIL/whatsnew.php"

is accessed.

The problem I am having is using tngIL.php with getperson.php

Based on the URL structure above:

"http://www.jutlink.net/e107/e107_plugins/tngIL/tngIL.php?page=on&dest=getperson.php?personID=I2&tree=Lassen"

should log the user onto TNG (based on userclass) and then populate the address bar with:

"http://www.jutlink.net/e107/e107_plugins/tngIL/getperson.php?personID=I2&tree=Lassen"

however, the URL above results in a "page cannot be found error".

Is there an alternative syntax for accessing individual information using tngIL.php?

Thanks in advance,

Dennis

Share this post


Link to post
Share on other sites
ca_drm1n

So for example if a user attempts to access the following URL:

"http://www.jutlink.net/e107/e107_plugins/tngIL/tngIL.php?page=on&dest=whatsnew.php"

...Based on the URL structure above:

"http://www.jutlink.net/e107/e107_plugins/tngIL/tngIL.php?page=on&dest=getperson.php?personID=I2&tree=Lassen"

should log the user onto TNG (based on userclass) and then populate the address bar with:

"http://www.jutlink.net/e107/e107_plugins/tngIL/getperson.php?personID=I2&tree=Lassen"

however, the URL above results in a "page cannot be found error".

Is there an alternative syntax for accessing individual information using tngIL.php?

Thanks in advance,

Dennis

Dennis,

Whether or not I am logged in to my e107 site, the URL for my What's New page is:

http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php
Now unfortunately, I haven't added anything to the site in 30 days (bad genealogist! :roll: ), but if I go to my Photos page and click on one of the names there, the URL is:
http://www.millerchronicles.com/e107_plugins/tngIL/getperson.php?personID=I21&tree=Mill-01

So the bottom line is mine don't have the "page=on&dest=getperson.php?" portion in either case.

It seems that your URLs have something extra in them?

- Al

Share this post


Link to post
Share on other sites
dlassen

So the bottom line is mine don't have the "page=on&dest=getperson.php?" portion in either case.

It seems that your URLs have something extra in them?

- Al

Hi Al,

Here is a scenario to illustrate my point. It is based on a e107/TNG user who is assigned the "TNG_Member" class in e107. In this example users assigned to this class have privileges to see Living individuals. Also it assumes the following TNG Privacy settings:

Require Login=No

Show Living Data=Depending on user rights

Show Names for Living=No

(Make sure to clear out cookies and close/reopen your browser between attempts).

1) Before logging onto e107 try accessing

"http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php"

Result: You should see the "Whatsnew" page but living information WILL BE SUPPRESSED.

2) After logging onto e107 BUT BEFORE accessing anything TNG related

try again accessing "http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php"

Result: You should see the "Whatsnew" page BUT LIVING INFO WILL STILL BE SUPPRESSED

3) After logging onto e107 access something on a TNG menu

then try again accessing "http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php"

Result: You should now see the "Whatsnew" page WITH LIVING DISPLAYED.

The reason for the problem in step 2) is that although you are logged on to e107, no attempt has yet been made to log you into TNG because you haven't used any TNG functionality. Therefore when you attempt the URL, you are NOT logged onto TNG and therefore only have guest privleges (no living info).

If you change step 2) to use the tngIL.php version of the URL:

"http://www.millerchronicles.com/e107_plugins/tngIL/tngIL.php?page=on&dest=whatsnew.php"

you will first get logged in by tngIL.php and immediately after see the page WITH Living info because the tngIL.php part of the URL performs the TNG login based on userID and the assigned TNG class.

(In fact if you look in the "tngIL_links_menu.php" script you will see that the links there use tngIL.php which is for the very reason that the user needs to get logged in to TNG).

SO ALL OF THAT BEING SAID (and hoping that everyone is not totally confused by now:?: :shock: ), I am trying to get the same kind of functionality working for getperson.php but am not able to come up with the correct syntax.

As mentioned, "http://www.jutlink.net/e107/e107_plugins/tngIL/tngIL.php?page=on&dest=getperson.php?personID=I2&tree=Lassen" returns a "page cannot be found" error.

I hope this all makes sense - if not please let me know.

Thanks

Dennis

www.jutlink.net

Share this post


Link to post
Share on other sites
ca_drm1n

I hope this all makes sense - if not please let me know.

Thanks

Dennis

www.jutlink.net

Dennis,

I understand what you are saying, and must apologize because I didn't try it on my site while logged in the last time. I'm not sure if this is unique to the What's New page, but right now I don;t have anything new to test against. I can say that when I am logged in and I browse my site, there still is never anything in the URLs like step#2 (the "tngIL.php?page=on&dest=" portion of your URL). Even when I am logged in, the URLs only look like: "http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php", or "http://www.millerchronicles.com/e107_plugins/tngIL/getperson.php?personID=I21&tree=Mill-01". (this particular example is for a deceased person, but the same holds true for living persons on my site).

My site settings are the same as you mention (Require Login=No, Show Living Data=Depending on user rights, Show Names for Living=No).

I'm going to shortly add some info on living and deceased persons so that I can try the whatsnew.php test again and see if I get any different results, but I'm still confused about why the links on your site have that (seemingly extra) "tngIL.php?page=on&dest=" portion. Will report back on the results of another test.

- Al

Share this post


Link to post
Share on other sites
dlassen

I'm not sure if this is unique to the What's New page...

I can say that when I am logged in and I browse my site, there still is never anything in the URLs like step#2 (the "tngIL.php?page=on&dest=" portion of your URL)...

Hi Al,

It is correct that even when using the tngIL.php version of the URL, the actual URL displayed in the address bar will appear without the tngIL.php syntax - I believe this is done transparently by tngIL.php.

So it would be great if you could do the test you described - all you would need is to make a tiny change to a living and a not living person to be able to see what I am talking about.

Also, I just wanted to confirm that the functionality is not specific to whatsnew.php

Thanks again for your time and effort!

Dennis

Share this post


Link to post
Share on other sites
ca_drm1n

Dennis,

Okay, I just added one photo linked to some Living folks, and one linked to only a deceased person. To avoid any cache issues, I'm trying to access it with FF1.5 (I was using IE6 earlier). My results are as follows:

1) Before logging onto e107 try accessing

"http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php"

Result: You should see the "Whatsnew" page but living information WILL BE SUPPRESSED.

Yes, I see the "Whatsnew" page but living information IS SUPPRESSED.

2) After logging onto e107 BUT BEFORE accessing anything TNG related

try again accessing "http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php"

Result: You should see the "Whatsnew" page BUT LIVING INFO WILL STILL BE SUPPRESSED

Prior to doing this, I cleared the cache and the private data.

Yes, I see the "Whatsnew" page BUT LIVING INFO IS STILL SUPPRESSED.

3) After logging onto e107 access something on a TNG menu

then try again accessing "http://www.millerchronicles.com/e107_plugins/tngIL/whatsnew.php"

Result: You should now see the "Whatsnew" page WITH LIVING DISPLAYED.

Yes, I now see the "Whatsnew" page WITH LIVING DISPLAYED. :idea:

I now better understand your original issue, (i.e., is it only if the user logs in, clicks on the what's new link (which I see it at the top level of your site), and then tries to access info on the living person). I think I was having trouble visualizing this, because I currently only have a link to "Family History" (i.e., path.../tngIL.php) at the top level of my site, which I guess is where the authentication to TNG happens.

So it would seem what you need to do after they login is get to that destination (whatsnew page, getperson page, etc.) by way of the tngIL.php page. I feel really silly now, as this was what you were explaining before, I was just too focused on my own site's structure to see what you were talking about. And to be honest, until now I've allowed myself to remain blissfully ignorant of the workings of tngIL... but now I have a much better appreciation for it. :oops:

I wonder if the issue is the second ? in the url (..."tngIL.php?page=on&dest=getperson.php?personID=I2&tree=Lassen")... can you do that in a PHP URL? That would seem to be the only difference between the 404 for this URL and all the other ones you have on your front page for which this tngIL.php "pass-thru" approach seems to be working for you.

I'm not sure how you could approach this differently... hopefully one of the e107-TNG experts will jump in here with a solution. Sorry to be so thick-headed while you tried to explain this!

- Al

Share this post


Link to post
Share on other sites
dlassen

I'm not sure how you could approach this differently... hopefully one of the e107-TNG experts will jump in here with a solution. Sorry to be so thick-headed while you tried to explain this!

- Al

Al,

No problem - it took me the longest time to figure this out, it is all kind of convoluted and the issue gets clouded further when one doesn't realize that cookies should be cleared out etc. to make the tests valid.

But in any case, I am happy that I got this confirmed, now hopefully perhaps Rush or someone could help shed a little light on how to construct the getperson.php URL using tngIL.php. Also I will try some variations of the URL per your suggestion regarding the fact that there are 2 instances of "?" in the URL.

Again thanks for taking time to walk through the issue - it is much appreciated!

Dennis

Share this post


Link to post
Share on other sites
ca_drm1n

Dennis,

I notice on Rush's site that under Today's Events (lower right side) he has some links to Living persons, although he has his restrictions a little different - non-logged in people can see first initial last name for Living on his site. But what I notice is that his links in Today's Events don't go through the tngIL.php file; rather, they go directly to the ..../tngIL/getperson.php?personID=.....

On the other hand, his primary link does go to tngIL.php.

He should be able to shed some light on how he passes the tngIL credentials for folks who have logged in when they click on the links to Living over in Today's Events.

- Al

I guess an (admittedly awkward) way to approach this would be to set up the e107 login so that upon successful login, it redirects to a file within the tngIL plugin directory, which then re-redirects back to the main page of your site, thus executing the TNG credential hand-off automatically upon initial e107 login.

Not sure if this would work, but worth a try?

- Al

Share this post


Link to post
Share on other sites
Rush

Let me see if I can catch up with thread...(Sorry it's taken a little while to respond, but I've been in a bit of pain today--stupid back :? )

The display on the 'Today Event' for living people is a little 'oops' on my part. I need to fix that in the script itself.

I modified my 'Today's Event' links to go right to the getperson.php page and not run through tngIL.

Most users will use the menu to the left and once they enter through a link that passes through tngIL, all the browsing of the TNG pages will be as logged in or not logged in depending on permissions.

The url should read something like this:

/tngIL.php?evntmnua=on&dest=getperson.php&personID=I684&tree=Krieger

not with the question mark, but ampersand between getperson.php and personID

That's why its kicking out a 404 error.

Hopefully I didn't add more confusion :)

Rush

Share this post


Link to post
Share on other sites
ca_drm1n

not with the question mark, but ampersand between getperson.php and personID

That's why its kicking out a 404 error.

Hopefully I didn't add more confusion :)

Rush

Rush,

As usual, you are right on the money. I had speculated that the second question mark might be causing the problem, but that was just a noob shot in the dark. Hopefully Dennis can report back that this solved the 404 he was getting with the getperson.php URL.

Sorry to hear about your back pain...

What's your plan on upgrading to 6.1.0? Any reservations? I have been working quite a bit of late on my other e107 website, so my genealogy site is sorely in need of attention. Sadly, I will be away from the computer all week and will have to wait until next weekend to mess with either site... :-(

Hope you're feeling better soon, and thanks again for the help here.

- Al

Share this post


Link to post
Share on other sites
Rush

Well, I think you got that one... :)

Ya, hopefully he does report back and let us know how that is working out.

Ahhh, the back, pthhhh...It comes and goes, but recovery times have been longer lately. It's all nerve so it really screws up my left leg too. Thanks, it will get right again soon enough ;)

I just upgraded to 6.1.0 on my site (after running it on my tests sites). Everything was pretty smooth with the upgrade. The only hang up right now is getting the googlemap to display. Just have an big empty spot where the map should be. When I get up and around a little better, I'll see if I can figure out why that may be.

Oh, I tweaked up a couple things with the begin.php file so some things will render a little better:


<?php
$istngfile = "yes";
require_once("../../class2.php");

if(($tngprint == "1")
|| eregi(e_PAGE, "showmediaxml.php")
|| eregi(e_PAGE, "findpersonform.php")
|| eregi(e_PAGE, "findperson.php")
|| eregi("pedxml.php", $_SERVER[PHP_SELF])

) { //if it's a print formatted page don't add the e107 stuff
//dont load the e107 stuff
} else {
require_once(HEADERF);
if(file_exists(e_PLUGIN."plugTNG/language/".e_LANGUAGE.".php")){
require_once(e_PLUGIN."tngIL_menu/language/".e_LANGUAGE.".php");
}
} //end if eregi
ini_set('error_reporting','2039');
if($cms[support] || $cms[tngpath] || $lang || $mylanguage) die("sorry!");
include("config.php");
?>

The "eregi("pedxml.php", $_SERVER[php_SELF]" part was from another user on the board. I apologize, but I can't remember who right now (thanks!)

Rush

Share this post


Link to post
Share on other sites
dlassen

Let me see if I can catch up with thread/tngIL.php?evntmnua=on&dest=getperson.php&personID=I684&tree=Krieger

not with the question mark, but ampersand between getperson.php and personID

That's why its kicking out a 404 error.

Hopefully I didn't add more confusion :)

Rush

Hi Rush,

Thanks - that worked like a charm. One last question: could you give me the corresponding syntax for family? I tried:

..../tngIL.php?evntmnua=on&dest=familygroup.php&familyID=F4&tree=Lassen

but it brings up a strange looking empty page.

Thanks again

Dennis

Share this post


Link to post
Share on other sites
Rush

Try using this syntax:

tngIL/tngIL.php?evntmnub=on&dest=familygroup.php&familyID=F262&tree=Krieger

Notice the 'b' at the end of evntmu instead of the 'a'

tngIL.php?evntmnua=on&dest=familygroup.php&familyID=F4&tree=Lassen

HTH,

Rush

Share this post


Link to post
Share on other sites
dlassen

Try using this syntax:

tngIL/tngIL.php?evntmnub=on&dest=familygroup.php&familyID=F262&tree=Krieger

Notice the 'b' at the end of evntmu instead of the 'a'

tngIL.php?evntmnua=on&dest=familygroup.php&familyID=F4&tree=Lassen

HTH,

Rush

Rush,

Thanks again - that worked just fine - it really feels great to have made progress in so many areas of the site recently (security, language, theme etc.). What would I have done without yourself, Darrin and the rest of the gang??

Now I just need to get back to recording the piles of stuff that are queued up for scanning/recording.

I hope that back of yours gets better soon (I too am aching after a game of tennis with my 21 yr old son this afternoon!!!)

Thanks again,

Dennis

Share this post


Link to post
Share on other sites
Rush

Your welcome and glad that worked out for you!

Thanks for the well wishes about the back...I'll back to causing problems in no time :wink:

Rush

Share this post


Link to post
Share on other sites
dlassen

Your welcome and glad that worked out for you!

Thanks for the well wishes about the back...I'll back to causing problems in no time :wink:

Rush

Rush,

A couple more URL questions:

1) how can I figure out the URL syntax - is the answer hidden in the tngIL.php code?

2) if there is no easy answer to question (1), could you help out on a couple more URL syntax questions:

pedigree.php

descend.php

Also, can the options for the charts (number of generations, chart style) be passed in as part of the URL or will TNG always use the default settings when rendering?

Sorry for all the questions - it is not super urgent so take your time.

Thanks

Dennis

Share this post


Link to post
Share on other sites
Rush

No biggie!

Most of the pages should use the: page=on&dest=

without to much problem. Only a few use a different syntax and like you mentioned, its in the tngIL.php file.

For pedigree (with different arguments for number of geneartions):

tngIL/tngIL.php?page=on&dest=pedigree.php?personID=I1665&tree=Krieger&parentset=0&display=standard&generations=6

The descend page doesn't really like that and i'm not exactly sure why right now. I'll have to take a look into that.

Rush

Share this post


Link to post
Share on other sites
Cory Booth

No biggie!

Most of the pages should use the: page=on&dest=

without to much problem. Only a few use a different syntax and like you mentioned, its in the tngIL.php file.

For pedigree (with different arguments for number of geneartions):

tngIL/tngIL.php?page=on&dest=pedigree.php?personID=I1665&tree=Krieger&parentset=0&display=standard&generations=6

The descend page doesn't really like that and i'm not exactly sure why right now. I'll have to take a look into that.

Rush

Hey Rush!!!

Just upgrade to 6.1.0...

Noticed that the page=on&dest= links no longer seem to work.

After upgrading my site remains locked on trying to process the login

I removed the page=on from my links and all SEEMS well.

Any thoughts on this?

Share this post


Link to post
Share on other sites
Cory Booth

Hey Rush!!!

Just upgrade to 6.1.0...

Noticed that the page=on&dest= links no longer seem to work.

After upgrading my site remains locked on trying to process the login

I removed the page=on from my links and all SEEMS well.

Any thoughts on this?

Just to elaborate a bit more - whenever I use the page=on&dest= this is where my pages get stuck....

tngIL/processlogin.php?tngusername=XXXXXX&tngpassword=XXXXXXXXXXXXXXXxxXX&encrypted=TRUE

Just to elaborate a bit more - whenever I use the page=on&dest= this is where my pages get stuck....

tngIL/processlogin.php?tngusername=XXXXXX&tngpassword=XXXXXXXXXXXXXXXxxXX&encrypted=TRUE

Except for history and photo as it turns out...

I'll keep working on it, but PHP isn't my strength

Share this post


Link to post
Share on other sites
Cory Booth

Just to elaborate a bit more - whenever I use the page=on&dest= this is where my pages get stuck....

tngIL/processlogin.php?tngusername=XXXXXX&tngpassword=XXXXXXXXXXXXXXXxxXX&encrypted=TRUE

Except for history and photo as it turns out...

I'll keep working on it, but PHP isn't my strength

OK disregard....

Using your newly formatted begin.php code everything seems to work fine now.

Not sure what the overall difference was between yours and the 1.1 tngIL instructions, but...

It seems to be ok now...

Share this post


Link to post
Share on other sites
nimebe

Based on the URL structure above:

"http://www.jutlink.net/e107/e107_plugins/tngIL/tngIL.php?page=on&dest=getperson.php?personID=I2&tree=Lassen"

should log the user onto TNG (based on userclass) and then populate the address bar with:

"http://www.jutlink.net/e107/e107_plugins/tngIL/getperson.php?personID=I2&tree=Lassen"

however, the URL above results in a "page cannot be found error".

Is there an alternative syntax for accessing individual information using tngIL.php?

Thanks in advance,

Dennis

tngIL 1.5 will address this issue since page links will no longer need to go through tngIL.php. This is exactly why I have been waiting for e107 to implement the core event hooks!

Nick Flint

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×