Jump to content
TNG Community
Michel KIRSCH

Working with search function of TNG

Recommended Posts

Michel KIRSCH

Hi Moders and Programmers !

I would like to write a Mod that would allow to insert a link to a individual of the genealogy into a note.
For this, I would like to use TNG's search function (the one we usually use to search for a spouse or a child we would like to add).
This search function is called with a button :

        <input type="button" value="Person Search" onclick="return findItem('I','hiddennote' , 'mynote' , '' , '' );">

findItem() is a function from selectutils.js

So I create a button, a text field (mynote) and a hidden field (hiddennote) in the note editing window.
It works very well, the search window opens and I can select a person in the genealogy.

The return URL is in the form : http://....../admin_editperson.php?personID=I5&tree=KC1&cw=1#

The problem is that I don't know where and when this "admin_editperson.php" is inserted in the URL.
I would have to replace it by "admin_editnote.php" to be able to intercept the result...
Can someone help me?
Thank you

Michel

add link01.JPG

add link02.JPG

Share this post


Link to post
Share on other sites
Ken Roy

Michel,

Have you looked as to whether you need to modify ajs_editperson.php (the AJAX module) rather than admin_editperson.php

Edited - Alternatively you need to look at how the Association dialog is setup to work.  Or you could look at what I had to do for the Same Person Link mod which is patterned after the Associations dialog.  I got help to create my mod.

By the way, moder is not a valid English word

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

×