Jump to content
TNG Community

Mod Wanted or Code


Clan Maclellan

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

  • Merv

    29

  • MichaelM

    11

  • tngrlkrz

    10

  • Clan Maclellan

    10

Top Posters In This Topic

Posted Images

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.

Link to comment
Share on other sites

  • 2 weeks later...
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>'; } ?>

Link to comment
Share on other sites

Janos,

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

  • 2 years later...

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

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

But I cannot assign them to different users..

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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..

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Success !

I had to read all entries in this thread.
Now it works !

Thank you all for great support.

 

Link to comment
Share on other sites

Success !

I had to read all entries in this thread.
Now it works !

Thank you all for great support.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...