Jump to content
TNG Community
Clan Maclellan

Mod Wanted or Code

Recommended Posts

Merv
1 hour ago, tngrlkrz said:

I'm likely missing something here.

Yes you are. The links in question are the personal links.

Share this post


Link to post
Share on other sites
tngrlkrz
26 minutes ago, Merv said:

Yes you are. The links in question are the personal links.

And what is the difference of a topmenu personal link to  login.php  I was referring to  and your 'personal links?  Answer is unclear.

Share this post


Link to post
Share on other sites
Merv
3 hours ago, tngrlkrz said:

And what is the difference of a topmenu personal link to  login.php  I was referring to  and your 'personal links?  Answer is unclear.

There should be no difference as far as functionality is concerned. They will all revert back to the page of origin (after log-in) requiring the user to press the required personal link again.

Share this post


Link to post
Share on other sites
manofmull
10 hours ago, Merv said:

Hi Michael, Thanks for picking that up.

The trouble is that the system doesn't know which user you are until after you log in and therefore can't refer back to the link beforehand (because there isn't one) to forward you to your personal page of your choice... if you know what I mean..

A better code to use would probably be the extended code of which I will put up on the Wiki shortly.

EDIT... Try that now

http://tng.lythgoes.net/wiki/index.php?title=My_User_Links_Add-on

Merv

I understand this now and will just leave as is. Lots of users happy with it, and after messaging my site members about this feature, I don't want to change things so soon.

Share this post


Link to post
Share on other sites
Janos Dibusz
On 2017. 09. 08. at 9:47 AM, Janos Dibusz said:

Nice job.
I would like add Branches. Somebody know how?

Like this.

<?php if ($currentuser && $_SESSION['mybranchID'] != "" && $currentuser && $_SESSION['mygedcom'] != "") {
$xerxxTarget = $cms['tngpath'] . "search.php?branchID=" . $_SESSION['branchID'] ."&amp;tree=" . $_SESSION['mygedcom'];
echo '<div class="mybutton">';
echo "<a href=\"{$cms['tngpath']}$xerxxTarget\">&#128100; My Branch</a>";
echo '</div>'; } ?>

Share this post


Link to post
Share on other sites
tngrlkrz

Janos,

Just to confirm: are you suggesting this code be used to add branches  to Merv's referenced code link?

Share this post


Link to post
Share on other sites
Janos Dibusz
2 hours ago, tngrlkrz said:

Janos,

Just to confirm: are you suggesting this code be used to add branches  to Merv's referenced code link?

Yes I want, but this not working.
I have ca. 350 branches, and more easy to find personal details with branch.

Share this post


Link to post
Share on other sites
Merv
5 hours ago, Janos Dibusz said:

Like this.

<?php if ($currentuser && $_SESSION['mybranchID'] != "" && $currentuser && $_SESSION['mygedcom'] != "") {
$xerxxTarget = $cms['tngpath'] . "search.php?branchID=" . $_SESSION['branchID'] ."&amp;tree=" . $_SESSION['mygedcom'];
echo '<div class="mybutton">';
echo "<a href=\"{$cms['tngpath']}$xerxxTarget\">&#128100; My Branch</a>";
echo '</div>'; } ?>

Hi Janos, That link hasn't been developed for various reasons... the main reason being that personally I don't see any real benefit.

Looking at the statistics on your site I see that you have a total of 670 individuals with 36 branches. That to me is an excessive  number of branches for the number of people in your database. I would have thought having 2 maximum would suffice which would cover a "his and her side" scenario or to keep things simple you could probably get away without having any branch restrictions as those individuals in your database will probably be closely related anyway.

I would suggest you re-think the why you have branch restrictions in the first place especially when I can see that your site is open to public viewing.

 

Share this post


Link to post
Share on other sites
Janos Dibusz
3 hours ago, Merv said:

Hi Janos, That link hasn't been developed for various reasons... the main reason being that personally I don't see any real benefit.

Looking at the statistics on your site I see that you have a total of 670 individuals with 36 branches. That to me is an excessive  number of branches for the number of people in your database. I would have thought having 2 maximum would suffice which would cover a "his and her side" scenario or to keep things simple you could probably get away without having any branch restrictions as those individuals in your database will probably be closely related anyway.

I would suggest you re-think the why you have branch restrictions in the first place especially when I can see that your site is open to public viewing.

 

I also have a different websit .
But this not for human. This for dogs.

http://mudi.dog-info.info/index.php

The number of dogs in the database: 6494
The number of kennels in the database: 335

Share this post


Link to post
Share on other sites
Merv
21 minutes ago, Janos Dibusz said:

I also have a different websit .
But this not for human. This for dogs.

http://mudi.dog-info.info/index.php

The number of dogs in the database: 6494
The number of kennels in the database: 335

I have no comprehension of how a database for dogs would be best set up and maintained. I would suggest you start a new thread to see if and how others are compiling databases for this purpose. Good luck.

 

Share this post


Link to post
Share on other sites
Guernman20

I am very much a newbie with no knowledge of coding but want to replace 'HIS SIDE & HER SIDE' with 'MY PAGE', 'MY FAMILY' and 'MY ANCESTORS'.

My website (using TNG12.1) contains several trees for different families and I want users to be directed to their own page and family etc.

I wish to use Template 14 and use the code posted by Merv in a previous post.

When I try to replace the existing code with the new, it doesn't work. I am trying to update the code on both the index.php file & topmenu.php as directed.

Can anyone tell me which lines of coding need to be deleted and at what point the new coding is to be inserted on both files.

I am testing this on 'localhost' on my PC running on  Windows10 with WAMP installed and using Notepad++ to display and edit the coding.

Thanks for any help

Peter

Share this post


Link to post
Share on other sites
Scott_Pryer

I suggest using  TNG12 as installed and use the settings page to make your changes. 

look in your TNG  admin/setup/template settings page.

Here you can easily change the labels of his side and her side,  also the tree and person it links to.

Then notice in the Feature links textbox is the third link and forth link. Using the sample format enter your label and path to the page you want. 

"My Ancestors, http://yoursite.com/yourpage"

Share this post


Link to post
Share on other sites
Guernman20

Thanks for your reply. However I still wish to pursue getting the links as described in my previous post of 22 Nov 2019.

As I will eventually have many users and I want give them instructions on how to get to their page within their tree.

Below is a screenshot of Merv's post and I wish to know which pieces of code to replace and where to insert the updated coding.

Any further help would be most welcome.

image.png

Share this post


Link to post
Share on other sites
MichaelM

Hi,

I'm also interested in providing user-specific links on my ancestral web site.
and the idea to lead the persons, who are logged in, to their pages sounds beautiful.

But how does TNG know about the persons ID, who logged in with arbitrary username ?

I also use the links like "My Ancestors, http://yoursite.com/yourpage" , as Scott_Pryer proposed.
But, how can I use this links to go to the individual pages of the person, who is logged in ?

I'm familiar with some programming languages, and I think I also could do some changes in PHP code.
but prior to this, I want to know, what I'm doing there..

Currently I use TNG 12.2 without any mods or changes

 

Share this post


Link to post
Share on other sites
MichaelM

wouldn't it be nice to have the Person-ID (if available) in the admin-user-list ?
Then forwarding of the user to his pages might be easier..

another question from my side is:
Is there a possibility for user-specific templates ?

Share this post


Link to post
Share on other sites
MichaelM

wouldn't it be nice to have the Person-ID (if available) in the admin-user-list ?
Then forwarding of the user to his pages might be easier..

another question from my side is:
Is there a possibility for user-specific templates ?

Share this post


Link to post
Share on other sites
MichaelM

currently, I use template 18 or 12 ; both are working fine as they should.

But I cannot assign them to different users..

 

 

 

Share this post


Link to post
Share on other sites
theKiwi

You can link each of the users to their ID in the tree in the "Users" Admin interface. That way when they log in, TNG knows who they are in the tree. (See the bottom boxes in this screen shot).

Roger

image.png

Share this post


Link to post
Share on other sites
Guernman20

Roger,

I have assigned all my present by filling in the Tree/Person ID. This doesn't present them with their individual page when they sihn in as the coding in this thead should provide.

So I still require the coding to work

all the best

Peter

Share this post


Link to post
Share on other sites
theKiwi

I can't help with this as I don't have any users apart from myself on my sites, so can't test, but I think that's what the code @Merv posted is meant to do, so you'd need to add that to the two files mentioned so that when a user logs in the His Side and Her Side are customised for them.

Roger

Share this post


Link to post
Share on other sites
Scott_Pryer

Aside from the code Merv posted, which looks like what you are wanting.  You could create feature links for each expected user.  This is easily done without coding.

I have about 20 links to particular different persons.

You can see them on our site, on the left side of the main page.

Share this post


Link to post
Share on other sites
Merv

I'm a bit confused about who is asking what?

On 11/24/2019 at 9:34 AM, MichaelM said:

wouldn't it be nice to have the Person-ID (if available) in the admin-user-list ?
Then forwarding of the user to his pages might be easier..

another question from my side is:
Is there a possibility for user-specific templates ?

The personalised links personalises your site for each user. It seems to them like it's their site because the links point to their pages.

There's no having to look for written  links to their pages or search because the links are the buttons right there on the home Page "My Page" "My Family" "My Ancestors"

Share this post


Link to post
Share on other sites
MichaelM

Sorry,

I had tomatoes on my eyes.

Clear; TNG knows who the person is, who is logged in...

I'll include the code for  "my person ....."

 

Thanks a lot..

 

Share this post


Link to post
Share on other sites
MichaelM

I tried the code;

and it showed me the liks in the menu;

 but the links always showed me the login-page, instead going to person or family or ancestors..

what`s wrong ?

 

 

1.JPG

2.JPG

Share this post


Link to post
Share on other sites
MichaelM

My Page is:

ahnengalerie.michaelmandel.de

image.png

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

×