thewag Posted March 26, 2006 Report Share Posted March 26, 2006 Alright, I got tired of changing things in my local software, uploading the gedcom, and then having to set the living flags....again! So I created this script that will backup and restore living flags.Small cavets (sp?):personID numbers can't changegedcom names can't changeit is still in rough form.This is still very rough, but it works!! The only item it touches is to add the living flag to people you select on restore. I doesn't change anybody elses flags. Only the ones you select. It won't remove living flags.Hope someone else finds this usefull.Benbackup_living_0.8.zip Quote Link to comment Share on other sites More sharing options...
thewag Posted March 26, 2006 Author Report Share Posted March 26, 2006 Well, I found a few things to help make life easier. Return links add a little bit of JavaScript code so that you don't accidently overwrite the backup file by hitting the back button.backup_living_0.8r1.zip Quote Link to comment Share on other sites More sharing options...
granny Posted March 26, 2006 Report Share Posted March 26, 2006 Well, I found a few things to help make life easier. Return links add a little bit of JavaScript code so that you don't accidently overwrite the backup file by hitting the back button.I downloaded your script and will test it when I am off again (Wednesday or later) and let you know how it goes. Since I always "replace all," if I have a problem it won't be a big deal, I can just re-import. Quote Link to comment Share on other sites More sharing options...
granny Posted April 1, 2006 Report Share Posted April 1, 2006 Well, I found a few things to help make life easier. Return links add a little bit of JavaScript code so that you don't accidently overwrite the backup file by hitting the back button.I tried your script today and it worked perfectly! This can sure save a lot of time if one has a lot of folks who are living.You should probably include in the instructions to set permissions on the backup folder before using, then set them back when finished.Thank You! Quote Link to comment Share on other sites More sharing options...
thewag Posted April 1, 2006 Author Report Share Posted April 1, 2006 I tried your script today and it worked perfectly! This can sure save a lot of time if one has a lot of folks who are living.You should probably include in the instructions to set permissions on the backup folder before using, then set them back when finished.Thank You!Mm, yeah. Chmod 777 on your folder, run backup script, and chmod 775 afterwards. Can leave it at 777 if ya like, but not quiet recommended if you don't run your own server. Quote Link to comment Share on other sites More sharing options...
thewag Posted April 1, 2006 Author Report Share Posted April 1, 2006 Ok, added the note on file permissions to the READ file. Also made admin login required. Need to figure out how to make it point correctly to the login script.Either way, this is important as the backupscript shows b-day on all individuals. Important upgrade for anyone that has this script on their site.backup_living_0.8r2.zip Quote Link to comment Share on other sites More sharing options...
Scotty Posted April 2, 2006 Report Share Posted April 2, 2006 Ok, added the note on file permissions to the READ file. Also made admin login required. Need to figure out how to make it point correctly to the login script.I played around with this last night and found that the password function(s) actually go through several other script files as well. I've attached a standalone script that will username and password protect any folder. It came from a phpBB backup script suite. I've left it intact as to who wrote it and such.Just another avenue to try if the admin login idea is not sorted out.The only caveat is that once applied and heaven forbid you forget the user name password you have to go through your host and delete 2 files as most FTP programs will not show them. But, other than that Scottyhtaccess_protectthisfolder.php Quote Link to comment Share on other sites More sharing options...
thewag Posted April 4, 2006 Author Report Share Posted April 4, 2006 I've attached a standalone script that will username and password protect any folder. It came from a phpBB backup script suite. I've left it intact as to who wrote it and such.Scotty, I've looked at this script...and can't get it to work. Chmod as needed and owners. For some reason the username and password don't seem to be being passed. Any suggestions?I'm thinking that .htaccess and .htpasswd are the best way to go. That will eliminate the backupfile text from being world readable to the general public. That is a BIG security concern.Ben Quote Link to comment Share on other sites More sharing options...
Jpaprocki Posted April 4, 2006 Report Share Posted April 4, 2006 The only caveat is that once applied and heaven forbid you forget the user name password you have to go through your host and delete 2 files as most FTP programs will not show them.If your FTP has a command line function (I have found most do though some maybe hidden and you have to dig in the documentation to find it) use the command -la and it will show those files.I use WS_FTP Home and it has that function, just has to dig to find how to add it. Deluxe FTP is free and has the Command function.This Script will automatically create what you need to protect a directory. It's free and easy to use.Good luck Quote Link to comment Share on other sites More sharing options...
thewag Posted April 4, 2006 Author Report Share Posted April 4, 2006 If your FTP has a command line function (I have found most do though some maybe hidden and you have to dig in the documentation to find it) use the command -la and it will show those files.Actually, I prefer to ssh in and elinks from the source. 'ls -lha' tends to be my preference... Your suggestions are noted but won't run on my system (OS is linux).This Script will automatically create what you need to protect a directory. It's free and easy to use.I'll take a look at it later tonight. I did some searching last night, but between allergies, kiddies, and sleep couldn't find much. Quote Link to comment Share on other sites More sharing options...
Scotty Posted April 4, 2006 Report Share Posted April 4, 2006 Scotty, I've looked at this script...and can't get it to work. Chmod as needed and owners. For some reason the username and password don't seem to be being passed. Any suggestions?I'm thinking that .htaccess and .htpasswd are the best way to go. That will eliminate the backupfile text from being world readable to the general public. That is a BIG security concern.BenWorked for me.... I believe when you set the un/pass it is already parsed. Closing the browser or clearing cookies and trying to access the folder a second time will bring up the un/pass prompt this time.Scotty Quote Link to comment Share on other sites More sharing options...
thewag Posted April 5, 2006 Author Report Share Posted April 5, 2006 Worked for me.... I believe when you set the un/pass it is already parsed. Closing the browser or clearing cookies and trying to access the folder a second time will bring up the un/pass prompt this time.ScottyWish it was a chache problem....but it's not writing the .htaccess and .htpasswd files. I've even passed the variables directly in the URL, with still no luck. Ah well. I'm tackling a rewrite of the script right now. Let ya know what I get in a few days.Ben Quote Link to comment Share on other sites More sharing options...
thewag Posted April 6, 2006 Author Report Share Posted April 6, 2006 New version on this script is available. This script ditches the use of TNG user table and simply relies on .ht* files. Also, the pages use tng_header/footer.I like it better now. .ht* files are a major security enhancement. It reduces the chances of people viewing the backup file and getting any vitals.PLEASE UPGRADE IF YOU ARE USING THE .8 VERSION.Benbackup_living_0.9.zip Quote Link to comment Share on other sites More sharing options...
thewag Posted April 21, 2006 Author Report Share Posted April 21, 2006 New version off this script. Added a config.living.php file. Right now there is only one option. Set the $doc_root=""; for normal operation. Atleast for most. It can be changed to something like "/tng/living/" if absolute paths are needed.I also added a little on the index page that compares the number of individuals in the DB marked living and the number in the backup file.Enjoy.Benbackup_living_0.9r1.zip Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted May 22, 2006 Report Share Posted May 22, 2006 Ben,Thanks for providing this script. I can now use Replace All on import and then restore the Living Flags.I have modified descend.php to add - Living on a Descendant list when you are logged in with Admin privilege, so you can easily see if you have descendants for whom you have forgotten to set the Living flag. See post http://www.tngforum.us/index.php?s=&showto...findpost&p=5227Kenhttp://www.royandboucher.com Quote Link to comment Share on other sites More sharing options...
thewag Posted May 24, 2006 Author Report Share Posted May 24, 2006 Ben,Thanks for providing this script. I can now use Replace All on import and then restore the Living Flags.I have modified descend.php to add - Living on a Descendant list when you are logged in with Admin privilege, so you can easily see if you have descendants for whom you have forgotten to set the Living flag. See post http://www.tngforum.us/index.php?s=&showto...findpost&p=5227Kenhttp://www.royandboucher.comGlad you found a use for it! Thats what it's for. Plus, I really like your addition.Ben Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted September 27, 2006 Report Share Posted September 27, 2006 Glad you found a use for it! Thats what it's for. Plus, I really like your addition.BenThe modification for V6 to display the Living flag has moved to the descendant.php file. See TNG Forum entry http://www.tngforum.us/index.php?s=&showto...findpost&p=6958Ken Quote Link to comment Share on other sites More sharing options...
thewag Posted September 27, 2006 Author Report Share Posted September 27, 2006 I've had several questions on if the backup script works on v6. I have tested it on my box and had no problems. I could use comments, good or bad, to further "Yes, it does."Ben Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted September 28, 2006 Report Share Posted September 28, 2006 I've had several questions on if the backup script works on v6. I have tested it on my box and had no problems. I could use comments, good or bad, to further "Yes, it does."BenBen,I have used it to rebuild my living flags this morning after doing a gedcom import with replace all. Works like a charm as it did before. Thanks.Ken Quote Link to comment Share on other sites More sharing options...
Eric S Posted February 21, 2007 Report Share Posted February 21, 2007 Does anyone have any experience with this script in combination with template 4?I've just installed the backup script and it seems to work fine, but my lay-out is totally messed-up.- None of the pictures in the title bar are visible;- The fonts are different from what they should be;- All the hyperlinks in the left-menu have the subdirectory of the backup script in their path, so they don't work either.I suspect the actual problem is in topmenu.php. All the references in topmenu.php seem to be relative, and since the backup script is in its own subdirectory, topmenu.php now looks for certain files in this subdirectory as well.Does anyone know an easy fix to this problem?Eric Quote Link to comment Share on other sites More sharing options...
thewag Posted February 22, 2007 Author Report Share Posted February 22, 2007 Does anyone know an easy fix to this problem?Sorry Eric. I include the header and footer to make the pages look nicer. Didn't know it caused problems because I don't use em! I'll look into it, but I can't guarantee anything soon. I'm backlogged MASSIVELY with other projects. I'll put it on the to do list.Ben Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted February 22, 2007 Report Share Posted February 22, 2007 Does anyone have any experience with this script in combination with template 4?I suspect the actual problem is in topmenu.php. All the references in topmenu.php seem to be relative, and since the backup script is in its own subdirectory, topmenu.php now looks for certain files in this subdirectory as well.Does anyone know an easy fix to this problem?EricHi Eric,I use the Backup Script with Template 4, however I have updated my topmenu.php to provide the links relative to my genealogy directory. This might be mentioned in the historytemplate.php as an item that you must do. The headers and footers work fine, if you have updated your topmenu.php to add /genealogy/ in front of the links. Quote Link to comment Share on other sites More sharing options...
Bruce Roy Posted December 15, 2007 Report Share Posted December 15, 2007 I've had several questions on if the backup script works on v6. I have tested it on my box and had no problems. I could use comments, good or bad, to further "Yes, it does."BenBen, I have installed your scripts and it worked fine until I decided to use it a second time. Now I get this message: "To view this page, you need to log in to area “TNG Living Flag Backup/Restore Scripts” on royroyes.net:80." I cannot get my login and password to work - or maybe I am confused about which login/password to use. How can I start again? Bruce Roy Quote Link to comment Share on other sites More sharing options...
thewag Posted December 15, 2007 Author Report Share Posted December 15, 2007 Ben, I have installed your scripts and it worked fine until I decided to use it a second time. Now I get this message: "To view this page, you need to log in to area “TNG Living Flag Backup/Restore Scripts” on royroyes.net:80." I cannot get my login and password to work - or maybe I am confused about which login/password to use. How can I start again? Bruce RoyHey Bruce, In the living folder you created for the backup there is a .htaccess and .htpasswd file. You can delete them to start over with a new user/password combo. BTW, this script isn't integrated into the TNG user system, so the username/password you set up here might be different than the one you use for TNG. Or it could be an old one if you change your passwords often. That part I can't help with.G'luck.Ben Quote Link to comment Share on other sites More sharing options...
bradyfamily Posted December 17, 2007 Report Share Posted December 17, 2007 Hi, My first post.. New to TNGI have everything working and added the code to show "Living" when in as administrator.. (working)then added a "living" folder and put the living flag backup files into it... set permissions on the folder and files to "Everyone" full access (On Win2003 Server-so FTP 777 not available"when I click on the: Backup Living Flags - This will overwrite the previous backup I get a .... Popup.... Please click OK ... or CANCEL...I click OK and get:Backing Up Living Flags....Return to Main Menu\n"); die ("Couldn't open file ($filename)"); } $Query = "SELECT gedcom, personID, lastname, firstname, birthdate FROM $people_table WHERE `living` = '1' ORDER BY `lastname` ASC , `firstname` ASC"; $Result = mysql_db_query ($database_name, $Query, $Link); if (!$Result) { echo("Error performing query: ".mysql_error()."\n"); echo ("Return to Main Menu\n"); die(); } echo("\n"); echo(" Living Number Gedcom | Person ID Name Date of Birth \n"); $tmpCount=1; echo("\n"); while ($tmp = mysql_fetch_array ($Result)) { echo(" $tmpCount $tmp[0] | $tmp[1] $tmp[2], $tmp[3] $tmp[4] \n"); $tmpCount++; $tmp_fwrite="$tmp[0]|+|$tmp[1]|+|$tmp[2]|+|$tmp[3]|+|$tmp[4]\n"; if (fwrite($fp, $tmp_fwrite) === FALSE) { echo "Cannot write to file ($filename)"; echo ("Return to Main Menu\n"); die(); } } echo(" "); fclose($fp); echo ("Return to Main Menu\n"); } else { echo("There was an error connecting to the database.\n"); echo ("Return to Main Menu\n"); die(); } tng_footer(""); ?> I have tried everythink I can to get this to work but nothing seems to fix it..Using Backup_living_0.9r1.zipThanksDarryl Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.