Jump to content
TNG Community

tngToday (add-on script)


Lee

Recommended Posts

Thanks for the reply Lee. However I do have that line in my copy of today.php

// Person for relationship graph. (see results)

$sPerson = 'I1'; // the personID you want the results to graph relationship

As a workaround I have hard-coded I1 into the concatenation to create the url which works fine. I'm just puzzled why the line does not pick up the value from sPerson.

Which Tag are you using? Perhaps $sPerson is not included in the global statement within it.

Link to comment
Share on other sites

  • Replies 132
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee

    39

  • Bruce Roy

    5

  • afoster

    5

  • mwilbers

    5

Top Posters In This Topic

Posted Images

Which Tag are you using? Perhaps $sPerson is not included in the global statement within it.

OK, fixed. $sPerson was not included in the global statement as you suggested. I checked it though and it was missing in the file that was in the zip file I downloaded.

Thanks

Link to comment
Share on other sites

OK, fixed. $sPerson was not included in the global statement as you suggested. I checked it though and it was missing in the file that was in the zip file I downloaded.

Thanks

Lee, I made a small enhancement to the today.php code tonight you may want to include in a later version (you may want to make it better by not hard coding it like I have). I have some people in my database who are not actually related. When their birthdays come up, you click on them and it takes you to the relationship chart, and because they are not related the message "The two individuals are not related within generations." is displayed. If you do this from within TNG the number of generations checked is included, the number is selectable from a drop-down.

So I modified the today.php code by adding "generations=15&" in the line that concatenates the url (...relationship.php?generations=15&primarypersonID=...) You could add any number here (presumably up to 15???), or make it configurable which would be better still (thats stretching my knowledge of php a little too far).

Hope that helps.

Jon Baker

Link to comment
Share on other sites

Yes, I was using livetest to test today.php. I'm just usig the 2 files in the zip (attached), nothing else.

Hello again Maarten,

As you can see I've posted a new update. Please bring it down (2.15) and give it a try - I've also added a tag: diagToday() for testing purposes. You can use the LIVEtest.php which has the diagToday() tag include, but if that gives trouble, try the LIVEdiag.php, which only includes the diag tag itself. Let me know what you find.

Greetings

Lee

PS.

EVERYONE ELSE THAT IS HAVING TROUBLE:

Please bring the new version down and get me an update on your progress. Also, please note that you can NO LONGER leave the tag arguments empty -- all tags must include a "z" at least.

Greetings.

Link to comment
Share on other sites

Hi Lee,

Thanks again!!

I've tried, and it seems to be comming along. Still get an error, though. I've attached 2 screenprints.

Hope it helps.

Maarten

Link to comment
Share on other sites

Thank you this is a neat add-on. I implemented this feature this morning.

I do have a couple questions.

What is the need for displaying the word "Family" for the Anniversaries section? And how can I safely supress the display of the word "Family"? It seems to serve no purpose that I know of.

I would like to display todays date so that anyone looking at the list is assurred of the current date. Is there an easy way to do this?

Again thank you for an easy to implement add-on.

Genfan

Link to comment
Share on other sites

One other item of note I noticed. I would rather have each person just go to the getperson php and pull up thier individual record. For some reason the code is set to do a relationship lookup...

Can this be altered to allow the user to click on a listed person and it take them to that person record?

Thanks,

Genfan

Link to comment
Share on other sites

I've tried, and it seems to be comming along. Still get an error, though.

Hi Maarten,

Could you try removing all but one Tag from the LIVEtest.php and test .. test each tag separately and let me know what you get. From what I can see other tags are working, but the longestLived() seems to be killing the script ..

Thanks

Lee

PS. Same request for the others experiencing the same problems.

Link to comment
Share on other sites

longestLived and getStats are the two that seem to fail.

Hello Maarten,

Well, it looks like I was using query techniques not supported by older versions of MySQL .. anything older than version 4.1 would not work with a couple. The diag screen you sent showed me your version information so I posted a copy on one of my other servers to see and finally had the problem show up.

I just posted 2.16 - first post this thread. Let me know (fingers crossed) how it goes -- I also fixed a couple of other issues, so let's see.

Thanks

Lee

PS. Others that have pointed out trouble: I think I may have corrected the bugs you were experiencing as well -- please test newest version and let me know!

---

http://mytree.net/tng_today

Link to comment
Share on other sites

I would rather have each person just go to the getperson php and pull up thier individual record.

Can this be altered to allow the user to click on a listed person and it take them to that person record?

Genfan:

I felt the same way and modified the code to do just that - call an individual. Here is the line of code in the origninal today.php (line 306 of 490 in my editor):

<td><a href="'.$URLpath.'/relationship.php?primarypersonID='.$line[personID].'&secondpersonID='.$sPerson.'&tree='.$myTree.'">'.$line[firstname].' '.$line[lastname].'</a></td>

Change it to read this way:

<td><a href="'.$URLpath.'/getperson.php?personID='.$line[personID].'&tree='.$myTree.'">'.$line[firstname].' '.$line[lastname].'</a></td>

The word "Family" is used to provide a link to the family page of those listed as having an anniversary. Each individual's name is also separately linked to their individual person page. Clicking on the "Family" link is the same as clicking on the "Group Sheet" link found on an any married individual's page in TNG - when the Family ID category is displayed.

Link to comment
Share on other sites

I felt the same way and modified the code to do just that - call an individual. Here is the line of code in the origninal today.php (line 306 of 490 in my editor):

The HEADER lines at the upper part (lines 137~188) of the today.php file are for YOU to edit .. there is a line below that reads: /* NO MODIFICATION REQUIRED BELOW THIS POINT */ which is were the workings of the script are and shouldn't need modification.

Also once the bugs are all worked out I plan on adding a few more options for these kinds of issues. (eg: relationship or individual links, etc)

What rritger has done if fine too, but be careful, it can break the script ..

Link to comment
Share on other sites

Thanks Bob,

I made the updates and now my links go to the individuals pages...

Thanks for the tip on "Family" I had not realized that it was a clickable link until you pointed it out.

Is there a way to control the display font size in the Today script? My page is too big and I want to reduce the display font size for the contents.

Thanks,

genfan

Link to comment
Share on other sites

Is there a way to control the display font size in the Today script? My page is too big and I want to reduce the display font size for the contents.

Hello genfan,

Look at the today.php file itself, around lines 138 through 177 you will find:

// HTML header used above Birthday listing.
$bDayHeader = '
   <style>
   #bdlist {font-family:arial; font-size:10px; padding:1px; border-spacing: 3pt;}
   #bdlist b {font-size:12px; } a { text-decoration: none} #bdlist td { font-size:10px; }
   </style>
   <table id="bdlist" width="100%">
      <tr><td colspan="3" valign="top"><span class="medium"><b>FAMILY WITH TODAY\'S BIRTHDAY</b></span></td></tr>
      <tr><td colspan="3" valign="top" bgcolor="#999966">'.$hBar.'</td></tr>
      <tr><td height="3" colspan="3" valign="top"><span class="smallest"> </span></td></tr>
      <!-- <tr class="normal"><td>Full Name</td><td>Birth Year</td><td>Birth Place</td></tr> -->
';

Notice the #bdlist td { font-size:10px; }

Try reducing that number and see what you like. Now this one entry is just for the Birthday listing, there are others below that one.

Link to comment
Share on other sites

Lee,

:lol: Need I say more? Works like a charm!!

You're the best! Thank you for all the work you've put into this!

My next step will be, to integrate "Today" into Joomla. Maybe even to try and make a Joomla-module for it... have to see if I can get something like that to work, cause I've never done that before...

Thnaks again!!

Maarten

Link to comment
Share on other sites

Thanks for the tip Lee, I tried reducing as you stated, however it only effected the Header and not the content...

Any further suggestions would be humbly accepted.

Thanks,

Genfan

Link to comment
Share on other sites

Thanks for the tip Lee, I tried reducing as you stated, however it only effected the Header and not the content...
Hi Genfan,

Okay, this is a newer version (see at bottom), but hasn't been officiall released yet .. within it are the header sections which have been cleaned up to make it easier to modify the look of your DataBox:

Header example (from birthday - line 145)

// HTML header used above Birthday listing.
$bDayHeader = '
   <style>
   #bdlist {font-family:arial;  border-spacing: 2pt;}               /* Default settings        */
   #bdlist td { font-size:12px; }                                   /* Default Font settings   */
   #bdlist a { text-decoration: none}                               /* Link Norm setting       */
   #bdlist a:hover {text-decoration: underline; color: red;}        /* Link Hover setting      */        
   #bdlist .title { font-size:13px; font-weight:bold; }             /* Title Font settings     */        
   #bdlist .foot { font-size:10px; }                                /* Footer Font setting     */
   </style>
   <table id="bdlist" width="100%">
      <tr><td colspan="3" valign="top"><span class="title">FAMILY WITH TODAY\'S BIRTHDAY</span></td></tr>
      <tr><td colspan="3" valign="top" bgcolor="'.$barColor.'">'.$hBar.'</td></tr>
       <!-- <tr><td>Full Name</td><td align="center">Birth Year</td><td>Birth Place</td></tr> -->
       <!-- <tr><td height="3" colspan="3" valign="top"><span class="smallest"> </span></td></tr> -->
';

Modify the settings within this block as needed. You may uncomment the HTML lines to add headings and/or a space between the heading and the data list. There is a seperate header block for each DataBox.

today.php

Link to comment
Share on other sites

Hi Genfan,

Okay, this is a newer version (see at bottom), but hasn't been officiall released yet .. within it are the header sections which have been cleaned up to make it easier to modify the look of your DataBox:

Header example (from birthday - line 145)

// HTML header used above Birthday listing.
$bDayHeader = '
   <style>
   #bdlist {font-family:arial;  border-spacing: 2pt;}               /* Default settings        */
   #bdlist td { font-size:12px; }                                   /* Default Font settings   */
   #bdlist a { text-decoration: none}                               /* Link Norm setting       */
   #bdlist a:hover {text-decoration: underline; color: red;}        /* Link Hover setting      */        
   #bdlist .title { font-size:13px; font-weight:bold; }             /* Title Font settings     */        
   #bdlist .foot { font-size:10px; }                                /* Footer Font setting     */
   </style>
   <table id="bdlist" width="100%">
      <tr><td colspan="3" valign="top"><span class="title">FAMILY WITH TODAY\'S BIRTHDAY</span></td></tr>
      <tr><td colspan="3" valign="top" bgcolor="'.$barColor.'">'.$hBar.'</td></tr>
       <!-- <tr><td>Full Name</td><td align="center">Birth Year</td><td>Birth Place</td></tr> -->
       <!-- <tr><td height="3" colspan="3" valign="top"><span class="smallest"> </span></td></tr> -->
';

Modify the settings within this block as needed. You may uncomment the HTML lines to add headings and/or a space between the heading and the data list. There is a seperate header block for each DataBox.

Lee,

I was one of the users that has been having problems getting this to work, but I thought the problems had been resolved with version 2.16. I just noticed today however, that althought I have someone that was born on this date, it does not show up on the page. I also tried it with LIVEtest.php with the same result. Any insight you can provide would be appreciated. I am using the following getBirthToday(x) if that is any help.

Link to comment
Share on other sites

I just noticed today however, that althought I have someone that was born on this date, it does not show up on the page. I also tried it with LIVEtest.php with the same result. Any insight you can provide would be appreciated.
Could you give me the link to your genealogy site, to the LIVEtest.php as well as the name of the person that is missing?

Lee

Link to comment
Share on other sites

Could you give me the link to your genealogy site, to the LIVEtest.php as well as the name of the person that is missing?

Lee

Disregard my previous post, I don't know what happened but it is working just fine now.

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