|
|
(9 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | <font color=red>''If you are not comfortable with html and php editing, this page may not be for you''</font>
| + | '''The description and Installation Instructions for this mod have been moved to the TNG Wiki.''' |
| | | |
− | | + | Please refer to the [[http://tng.lythgoes.net/wiki/index.php?title=Private_Note_Mod Private Note Mod]] information on the TNG Wiki Site. |
− | | + | |
− | ==Overview==
| + | |
− | | + | |
− | This TNG modification deals with notes. It is a modification to the person pages so that notes that are marked "Private" will display for admin users.
| + | |
− | | + | |
− | <font color="green">
| + | |
− | Revision History
| + | |
− | | + | |
− | * Initial Release - Dec 13, 2006 - initial release (A request from the tngusers2 mail list.
| + | |
− | </font>
| + | |
− | | + | |
− | ==Requirements==
| + | |
− | | + | |
− | # A working [http://lythgoes.net/genealogy/software.php TNG] installation - see ''[http://lythgoes.net/genealogy/software.php The Next Generation of Genealogy Sitebuilding]''
| + | |
− | # A backup of your TNG '''personlib.php''' files
| + | |
− | | + | |
− | | + | |
− | == Side effects == | + | |
− | | + | |
− | # As with most source code modifications, these changes will likely be overwritten during your next TNG revision upgrade and will need to be re-implemented.
| + | |
− | # The TNG "Private" flag for notes will be overwritten during a GEDCOM import. This mod is most useful for those who use TNG as their only genealogy database program and do not use a desktop application with a GEDCOM import to TNG.
| + | |
− | | + | |
− |
| + | |
− | ==TNG Modifications V6.0.3==
| + | |
− | | + | |
− | # backup your existing TNG personlib.php file
| + | |
− | # open a copy of your personlib.php file
| + | |
− | # There are two sections to change, both within 30 lines of each other
| + | |
− | #* locate the following code
| + | |
− | <nowiki>
| + | |
− | function getNotes( $persfamID, $flag ) {
| + | |
− | global $notelinks_table, $xnotes_table, $tree, $eventtypes_table, $events_table, $text, $eventswithnotes;
| + | |
− | </nowiki>
| + | |
− | ::* change to this <font color=red><b>(red sections are the differences)</b></font>
| + | |
− | <nowiki>
| + | |
− | function getNotes( $persfamID, $flag ) {
| + | |
− | global </nowiki><font color=red><b>$allow_admin, </b></font><nowiki>$notelinks_table, $xnotes_table, $tree, $eventtypes_table, $events_table, $text, $eventswithnotes;
| + | |
− | </nowiki>
| + | |
− | | + | |
− | :* and locate the following code
| + | |
− | <nowiki>
| + | |
− | | + | |
− | $query = "SELECT display, $xnotes_table.note as note, $notelinks_table.eventID as eventID,$notelinks_table.xnoteID as xnoteID, $notelinks_table.ID as ID, noteID FROM $notelinks_table
| + | |
− | LEFT JOIN $xnotes_table on $notelinks_table.xnoteID = $xnotes_table.ID AND $notelinks_table.gedcom = $xnotes_table.gedcom
| + | |
− | LEFT JOIN $events_table ON $notelinks_table.eventID = $events_table.eventID
| + | |
− | LEFT JOIN $eventtypes_table on $eventtypes_table.eventtypeID = $events_table.eventtypeID
| + | |
− | WHERE $notelinks_table.persfamID=\"$persfamID\" AND $notelinks_table.gedcom=\"$tree\" AND secret!=\"1\"
| + | |
− | ORDER BY ordernum, tag, eventdatetr, $notelinks_table.ID";
| + | |
− | </nowiki>
| + | |
− | ::* change to this <font color=red><b>(red sections are the differences)</b></font>
| + | |
− | <font color=red><b><nowiki>
| + | |
− | if( $allow_admin == "1") {
| + | |
− | $hidenotes = " ";
| + | |
− | }
| + | |
− | else {
| + | |
− | $hidenotes = " AND secret !=\"1\" ";
| + | |
− | }
| + | |
− | </nowiki></b></font><nowiki>
| + | |
− | $query = "SELECT display, $xnotes_table.note as note, $notelinks_table.eventID as eventID,$notelinks_table.xnoteID as xnoteID, $notelinks_table.ID as ID, noteID FROM $notelinks_table
| + | |
− | LEFT JOIN $xnotes_table on $notelinks_table.xnoteID = $xnotes_table.ID AND $notelinks_table.gedcom = $xnotes_table.gedcom
| + | |
− | LEFT JOIN $events_table ON $notelinks_table.eventID = $events_table.eventID
| + | |
− | LEFT JOIN $eventtypes_table on $eventtypes_table.eventtypeID = $events_table.eventtypeID
| + | |
− | WHERE $notelinks_table.persfamID=\"$persfamID\" AND $notelinks_table.gedcom=\"$tree\" </nowiki><font color=red><b>$hidenotes</b></font><nowiki>
| + | |
− | ORDER BY ordernum, tag, eventdatetr, $notelinks_table.ID";
| + | |
− | </nowiki>
| + | |
− | | + | |
− | ::* you can copy the bits of red text from above to paste into your file
| + | |
− | <ol start=4>
| + | |
− | <li> close your personlib.php file and copy it to your base TNG directory </li>
| + | |
− | <li> check it out </li>
| + | |
− | </ol>
| + | |
− | | + | |
− | | + | |
− | ==In the event of a problem with your TNG site and this mod==
| + | |
− | | + | |
− | # copy your backup personlib.php to your base TNG directory
| + | |
− | #* all should be well now
| + | |
− | | + | |
− | | + | |
− | ==Support==
| + | |
− | | + | |
− | # You're sort of on your own... If you have a specific question, or feel some additional info in the above would help others, feel free to contact me directly. [mailto:genealogy@mcfadyen.ca Mail me here]
| + | |
− | #* Please post suggestions, or your own flavour of this mod to the forum or list
| + | |