Jump to content
TNG Community
Sign in to follow this  
azizdogan

Broadsearch and showspouse

Recommended Posts

azizdogan

Hi,

this is my 1st topic - i hope anyone can help.

I am using TNG since few days - i imported from an old 4.x.x Version the data.
I installed broadsearch mod - and it works fine. I can search for alternatives names / maiden names etc.

 

The only problem i have is to get it working with showspouse=yes parameter.

Both parameters alone work fine - but if i want to use both ... spouse is not showing
I looked in the code and i could see that if broadsearch=Y   the else part with showspouse will be ignored.

I wanted to copy part of the php/sql code. But i am getting tons os errors.

Can anyone help ? I am lost with all that UNIONS LEFT JOINS etc.

I think a lot of others are also interested in using both parameters.

Thank You So Much For Your Help I Really Appreciate It!

Kindly Regards
Aziz

 

Share this post


Link to post
Share on other sites
azizdogan

Hi,

i contacted the developer and Darrin. Both had no time to help. So i had to find a solution. I just started with TNG - so actually i cant write a custom mod for this functionality.
My workaround is to change search.php + searchform.php. In searchform.php i add a checkbox for broadsearch and set it default to true. I pass this parameter from searchform.php to search.php

In search.php i add a function for showing only the ID of the wife/Husband.
The id, gender and some globals like table names gives the return of the ID of the husband or wife.
With this ID i can display the Firstname/Lastname Nickname etc.

So the "trick" is to add a extra function to not mess up with all that unions joins.

I just want to give an idea how i solved it.


 

 

Share this post


Link to post
Share on other sites
tngrlkrz

The developer of BroadSearch is Chris Moss.  I would be surprised if you actually got a response from him, since he has been unavailable for quite a spell. 

Interesting but a bit unsure how effectively forcing the search.php $broadsearch variable to true works, because then key code of the normal advanced search logic is bypassed.   If a person has multiple wives, are multiple rows being generated when broadsearch is ticked or set to default true? If so, would be interested in seeing the changes you made if they actually are displaying all spouses.  Perhaps post some results? Or private message me.  Almost any such changes can become a mod.

Share this post


Link to post
Share on other sites
azizdogan

Hi Ron,

i "deactivated" /bypass in any case the showspouse parameter. So its fixed always with showing spouse. And i display in the case thee is no new divorce only the latest spouse. Order by lasted record ID in the table.

I am working since 2 weeks again with TNG - i quit genalogy and TNG in 2006 - was using version 4.1.x.
I am sure there are better ways to do it - cleaner code. For me its working now. I will PM you the both php.files. Maybe you can do it better and publish a mod.

PM with search.php and searchform.php + URL of site + examples what to search sent.

Aziz

 

 

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
Sign in to follow this  

×