Jump to content
TNG Community
Clan Maclellan

Mod Wanted or Code

Recommended Posts

MichaelM

Success !

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

Thank you all for great support.

 

Share this post


Link to post
Share on other sites
MichaelM

Success !

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

Thank you all for great support.

 

Share this post


Link to post
Share on other sites
MichaelM

for Guernman20:

I replaced this

<?php
    if($dadlabel) {
?>
            <li>
                <a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t14_dadperson']; ?>&amp;tree=<?php echo $tmp['t14_dadtree']; ?>"><span class="l"></span><span class="r"></span><span class="t"><?php echo $dadlabel; ?></span></a>
            </li>
<?php        
    }
    if($momlabel) {
?>
            <li>
                <a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t14_momperson']; ?>&amp;tree=<?php echo $tmp['t14_momtree']; ?>"><span class="l"></span><span class="r"></span><span class="t"><?php echo $momlabel; ?></span></a>
            </li>
<?php        
    }
    if($tmp['t14_featurelinks'])
        echo showLinks($tmp['t14_featurelinks'],false,"","<span class=\"l\"></span><span class=\"r\"></span><span class=\"t\">xxx</span>");
?>
 

with following code:

<!–Start Personalised Links for TNG V11 Template 14 header)–>
<li>
<a href="<?php if ( $_SESSION['mypersonID'] != "" && $currentuser && $_SESSION['mygedcom'] != "") {
$xerxxTarget = $cms['tngpath'] . "getperson.php?personID=" . $_SESSION['mypersonID'] ."&amp;tree=" . $_SESSION['mygedcom'];
echo "{$cms['tngpath']}$xerxxTarget";}
else  echo "{$cms['tngpath']}login.php"; ?>
"><span class="l"></span><span class="r"></span><span class="t">&#128100; Meine Seite</a></span></a>
</li>
<li>
<a href="<?php if ( $_SESSION['mypersonID'] != "" && $currentuser && $_SESSION['mygedcom'] != "") {
$xerxxTarget = $cms['tngpath'] . "familychart.php?personID=" . $_SESSION['mypersonID'] ."&amp;tree=" . $_SESSION['mygedcom'];
echo "{$cms['tngpath']}$xerxxTarget";}
else  echo "{$cms['tngpath']}login.php"; ?>
"><span class="l"></span><span class="r"></span><span class="t">&#128100; Meine Familie</a></span></a>
</li>
<li>
<a href="<?php if ( $_SESSION['mypersonID'] != "" && $currentuser && $_SESSION['mygedcom'] != "") {
$xerxxTarget = $cms['tngpath'] . "pedigree.php?personID=" . $_SESSION['mypersonID'] ."&amp;tree=" . $_SESSION['mygedcom'];
echo "{$cms['tngpath']}$xerxxTarget";}
else  echo "{$cms['tngpath']}login.php"; ?>
"><span class="l"></span><span class="r"></span><span class="t">&#128100; Meine Vorfahren</a></span></a>
</li>
<!–End Personalised Links for TNG V11 Template 14 header)–>       


<?php        
    
    if($tmp['t18_featurelinks'])
        echo showLinks($tmp['t18_featurelinks'],false);
?>


May be there is some confusion with the {} - brackets

 

 

Share this post


Link to post
Share on other sites
Guernman20

Thank you for all your input I now have got it to work

All the best

Peter

Share this post


Link to post
Share on other sites
MichaelM

Thanks Merv, 

for this ignition for personalised links.

I've further developed the code (for my page).

- my person, my site, my ancestoes is only shown when the use is logged in

- If person is Julia, its shown as "Julias page"  or in german as "Julias Seite"

- if there is a user like Markus, the SIte uses correct Genitive  like "Markus' page"

see screenshot.

see  http://ahnengalerie.michaelmandel.de

 

code:

        <!–Start personalised Links    basically by Merv from TNG-Forum)–>
        <?php if ( $_SESSION['mypersonID'] != "" && $currentuser && $_SESSION['mygedcom'] != "") {
            ?>
                <?php 
                    //for usernames ending with "s", like "Matthias"  or "Lars" , here is the correct DUDEN genitive .... 
                    $_myGenitive = "s ";
                    if (substr($currentuser, -1) == "s") $_myGenitive = "'  ";     
                ?> 
                <li>
                <a href="<?php $xerxxTarget = $cms['tngpath'] . "getperson.php?personID=" . $_SESSION['mypersonID'] ."&amp;tree=" . $_SESSION['mygedcom'];
                echo "{$cms['tngpath']}$xerxxTarget";?>
                " title="meine Seite/my page"><span class="l"></span><span class="r"></span><span class="t">&#128100;<b><?php echo "$currentuser","$_myGenitive ", $text['page'] ?></b></span></a>

                <a href="<?php $xerxxTarget = $cms['tngpath'] . "familychart.php?personID=" . $_SESSION['mypersonID'] ."&amp;tree=" . $_SESSION['mygedcom'];
                echo "{$cms['tngpath']}$xerxxTarget";?>
                " title="meine Familie/my family"><span class="l"></span><span class="r"></span><span class="t">&#128100;<b><?php echo "$currentuser","$_myGenitive ", $text['family'] ?></b></span></a>

                <a href="<?php $xerxxTarget = $cms['tngpath'] . "pedigree.php?personID=" . $_SESSION['mypersonID'] ."&amp;tree=" . $_SESSION['mygedcom'];
                echo "{$cms['tngpath']}$xerxxTarget";?>
                " title="meine Vorfahren/my ancestors"><span class="l"></span><span class="r"></span><span class="t">&#128100;<b><?php echo "$currentuser","$_myGenitive ", $text['ancestors'] ?></b></span></a>
                </li>
            <?php       
        }?>
        <!–End personalised Links)–>

screenshot.JPG

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

×