dvfreeman Posted March 10, 2007 Report Share Posted March 10, 2007 Extra_Page_Template_Procedure.docThe attached procedure provides additional detail on how to use the TNG history template to create extra pages such as FAQs, Privacy Policy, or User Help. It is based on Darrin’s guidance with a bit more detail included for us newbies. Have fun creating your own pages in the same format and look as those already on your website. Quote Link to comment Share on other sites More sharing options...
wvaanne Posted May 17, 2007 Report Share Posted May 17, 2007 I have created two new pages for my TNG site. A rank newbie has a better insight into TNG/PHP than I do. Please exlpain where you had the line of codea href="/extrapgs/readme.php#instruct" class="sidelink"><strong>User Help</strong></a>Do you put it in the index.php file? I could understand eveything you said up to the point and then I got lost. Thanks for any guidance you can give me.WVAANNE.COMBCordle413@aol.com Quote Link to comment Share on other sites More sharing options...
moreisbetter Posted November 20, 2008 Report Share Posted November 20, 2008 With the release of TNG v.7.02, does anything need to be updated for the Extra Pages instructions?Thanks,Cyndi Quote Link to comment Share on other sites More sharing options...
brummie23 Posted December 4, 2008 Report Share Posted December 4, 2008 Hi I have the same problem as WVAANNE. I have followed most of the Instructions in David Freemans TNG Tips - Creating Extra Pages for Use in TNG and I too cannot work out were to find the "home page" to add a new "home page menu item" and put the <a href="/extrapgs/readme.php#instruct" class="sidelink"><strong>User Help</strong></a>The only home titled files I can find are the: homeheader.gif, tng_home.gif and tng_home2.gif.If some kind soul could let me know were to put it I would be grateful and then maybe able to see if the rest was completed properly.ThanksMatt FalveyPerth W AustraliaI have created two new pages for my TNG site. A rank newbie has a better insight into TNG/PHP than I do. Please exlpain where you had the line of codea href="/extrapgs/readme.php#instruct" class="sidelink"><strong>User Help</strong></a>Do you put it in the index.php file? I could understand eveything you said up to the point and then I got lost. Thanks for any guidance you can give me.WVAANNE.COMBCordle413@aol.com Quote Link to comment Share on other sites More sharing options...
brummie23 Posted December 5, 2008 Report Share Posted December 5, 2008 Hi, thanks to all. I did manage to find the Home Page file that it has to be loaded into and is is called index.php on the public.html root level.Matt FalveyHi I have the same problem as WVAANNE. I have followed most of the Instructions in David Freemans TNG Tips - Creating Extra Pages for Use in TNG and I too cannot work out were to find the "home page" to add a new "home page menu item" and put the <a href="/extrapgs/readme.php#instruct" class="sidelink"><strong>User Help</strong></a>The only home titled files I can find are the: homeheader.gif, tng_home.gif and tng_home2.gif.If some kind soul could let me know were to put it I would be grateful and then maybe able to see if the rest was completed properly.ThanksMatt FalveyPerth W Australia Quote Link to comment Share on other sites More sharing options...
Tom Glispin Posted March 4, 2009 Report Share Posted March 4, 2009 I have been trying to use the historytemplate.php file to add a page to my site, but I keep getting a message that there is a problem with connecting with the database. I have renamed the file and put it in a subdirectory. If I comment out the tng_db_connect function, most every thing works. Any help or advice would be greatly appreciated.Tom Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 5, 2009 Report Share Posted March 5, 2009 I have been trying to use the historytemplate.php file to add a page to my site, but I keep getting a message that there is a problem with connecting with the database. I have renamed the file and put it in a subdirectory. If I comment out the tng_db_connect function, most every thing works. Any help or advice would be greatly appreciated.TomThe historytemplate.php usage is not related to the database connection error. If you are getting that error, you are likely getting it on all your other pages as well. See the TNG Wiki troubleshooting article on TNG not communicating with database Quote Link to comment Share on other sites More sharing options...
Tom Glispin Posted March 5, 2009 Report Share Posted March 5, 2009 The historytemplate.php usage is not related to the database connection error. If you are getting that error, you are likely getting it on all your other pages as well. See the TNG Wiki troubleshooting article on TNG not communicating with databaseActually I am not getting it on any other page. I will check out the trouble shooting link.TomActually I am not getting it on any other page. I will check out the trouble shooting link.TomThe trouble shooting link did not help. I'm running right now on an XAMP installation on my home computer. I have been using this for about two weeks now with no problems. I only have this problem when I run the new page, either with the link I added to the INFO dropdown or directly through the browser.Puzzled, Tom Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 5, 2009 Report Share Posted March 5, 2009 Actually I am not getting it on any other page. I will check out the trouble shooting link.TomThe trouble shooting link did not help. I'm running right now on an XAMP installation on my home computer. I have been using this for about two weeks now with no problems. I only have this problem when I run the new page, either with the link I added to the INFO dropdown or directly through the browser.Puzzled, TomTom,Do you have any TNG generated pages, like for an Individual on your XAMP installation? It is always more difficult to debug on a local web server, since we can't look at your pages. Maybe someone else will have a different idea of what could be wrong. Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 5, 2009 Report Share Posted March 5, 2009 Tom,Do you have any TNG generated pages, like for an Individual on your XAMP installation? It is always more difficult to debug on a local web server, since we can't look at your pages. Maybe someone else will have a different idea of what could be wrong.Tom,Where are you putting the new page you created? The historytemplate.php is designed to add pages in a subdirectory to the TNG installation directory. So if you are adding the pages to the TNG install directory, you need to adjust some lines, see TNG Wiki article on User Pages - Getting Started Quote Link to comment Share on other sites More sharing options...
Tom Glispin Posted March 5, 2009 Report Share Posted March 5, 2009 Tom,Where are you putting the new page you created? The historytemplate.php is designed to add pages in a subdirectory to the TNG installation directory. So if you are adding the pages to the TNG install directory, you need to adjust some lines, see TNG Wiki article on User Pages - Getting StartedI originally put it a subdirectory. I finally decided to try it in the install directory with the appropriate address changes. This worked! I'm satisfied with this, but I sure would like to know what was going on. I don't like unsolved mysteries.Before trying the install directory, I hard coded the database info. This worked for the database, but I was still getting a couple of errors. An include in the header function and in the footer function couldn't find the header and footer php's. It (whatever "it"is) apparently was looking in the pear folder under xamp? Another curious behavior: After getting the database connect to work, and eliminating the above errors by commenting out the header and footer, I decided to test to see if the logon function was working. After first closing the browser, then launching it again, I retreived the home page. It showed I was not logged in. I then activated the link to my new page. It went to it without asking me to logon. When I returned to the the home page, it showed I was logged in!!!Sorry for being so wordy, these things drive me crazy, Tom Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 6, 2009 Report Share Posted March 6, 2009 I originally put it a subdirectory. I finally decided to try it in the install directory with the appropriate address changes. This worked! I'm satisfied with this, but I sure would like to know what was going on. I don't like unsolved mysteries.Before trying the install directory, I hard coded the database info. This worked for the database, but I was still getting a couple of errors. An include in the header function and in the footer function couldn't find the header and footer php's. It (whatever "it"is) apparently was looking in the pear folder under xamp? Another curious behavior: After getting the database connect to work, and eliminating the above errors by commenting out the header and footer, I decided to test to see if the logon function was working. After first closing the browser, then launching it again, I retreived the home page. It showed I was not logged in. I then activated the link to my new page. It went to it without asking me to logon. When I returned to the the home page, it showed I was logged in!!!Sorry for being so wordy, these things drive me crazy, TomTom,The information at the top of the historytemplate.php, which is similar to any TNG dynamically generated pages, tells TNG where to find the code that generates those part of the pages. That code tells TNG where the begin.php file is and sets the $cms[tngpath] to indicate where the TNG installed scripts are, including the topmenu.php and other files shown directly on the page. Take a look at the Templates - Explained in the TNG Wiki and the Genlib Functions Quote Link to comment Share on other sites More sharing options...
Harold Posted March 6, 2009 Report Share Posted March 6, 2009 Ok I have tried doing this, as well as using the privacy policy example, and placing them in sub folders, I get an issue like this:http://www.robertsfamilytree.org/tng/files/Privacy-2.bmpNote the icons on the right.The screen should look like this:http://www.robertsfamilytree.org/tng/files/Privacy-1.bmpWhat have I done wrong here?Any suggestions? I also sent an email out on tngusers2Thanks,Harold Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 6, 2009 Report Share Posted March 6, 2009 Ok I have tried doing this, as well as using the privacy policy example, and placing them in sub folders, I get an issue like this:http://www.robertsfamilytree.org/tng/files/Privacy-2.bmpNote the icons on the right.The screen should look like this:http://www.robertsfamilytree.org/tng/files/Privacy-1.bmpWhat have I done wrong here?Any suggestions? I also sent an email out on tngusers2Thanks,HaroldHarold,A link to the page on your site where you are seeing the problem would be a lot more helpful than an image. It is possible that you are not setting the correct $cms[tngpath] value and also possible that you are not bringing the correct style sheets because you are not using meta.php. A view of the source for the page might provide some clues. Quote Link to comment Share on other sites More sharing options...
Harold Posted March 7, 2009 Report Share Posted March 7, 2009 Harold,A link to the page on your site where you are seeing the problem would be a lot more helpful than an image. It is possible that you are not setting the correct $cms[tngpath] value and also possible that you are not bringing the correct style sheets because you are not using meta.php. A view of the source for the page might provide some clues.You can see a file I called test at:http://www.robertsfamilytree.org/genealogy/extrapgs/Test.php Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 7, 2009 Report Share Posted March 7, 2009 You can see a file I called test at:http://www.robertsfamilytree.org/genealogy/extrapgs/Test.phpPlease take a look at the TNG Wiki article User Pages - Getting StartedYou appear to be still using the topmenu file from TNG version 6 which has hard-coded bgcolor= parameters that were all replaced with style sheet classes. I don't know whether that is part of the problem, but if you open the historytemplate.php and follow the instructions in the TNG Wiki article, it should work. Sorry I don't have too much time to look at it at the moment. Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 7, 2009 Report Share Posted March 7, 2009 Please take a look at the TNG Wiki article User Pages - Getting StartedYou appear to be still using the topmenu file from TNG version 6 which has hard-coded bgcolor= parameters that were all replaced with style sheet classes. I don't know whether that is part of the problem, but if you open the historytemplate.php and follow the instructions in the TNG Wiki article, it should work. Sorry I don't have too much time to look at it at the moment.Harold,I think your problem is that you are not using the meta.php file for your Custom Meta. Go to Admin >> Setup >> General Settings >> Site Design and update Custom Meta to use meta.php instead of meta.html. Then copy the meta.php file from the special folder that was unzipped as part of your upgrade. The problem is the style sheets are not being found, as best as I can tell. On my site when I call a file from a subdirectory, the generated source for the style sheets is <link href="../genstyle.css" rel="stylesheet" type="text/css" /><link href="../templatestyle.css" rel="stylesheet" type="text/css" /><link href="../mytngstyle.css" rel="stylesheet" type="text/css" /> whereas on your site the ../ that indicates those files are in a directory above where the file is being called from is not there. Quote Link to comment Share on other sites More sharing options...
wreindollar Posted March 7, 2009 Report Share Posted March 7, 2009 Harold,I think your problem is that you are not using the meta.php file for your Custom Meta. Go to Admin >> Setup >> General Settings >> Site Design and update Custom Meta to use meta.php instead of meta.html. Then copy the meta.php file from the special folder that was unzipped as part of your upgrade. Ken, I have been following this thread as I was having trouble also. Changing the meta from html to php fixed my troubles. Also want to say *Thanks* to you and everyone else who gives input to the forum and the TNG Wiki site. It has helped me more then once.Wayne. Quote Link to comment Share on other sites More sharing options...
Harold Posted March 8, 2009 Report Share Posted March 8, 2009 Ken, I have been following this thread as I was having trouble also. Changing the meta from html to php fixed my troubles. Also want to say *Thanks* to you and everyone else who gives input to the forum and the TNG Wiki site. It has helped me more then once.Wayne.Wayne and Ken,Ken,Thanks I tried what you said and because I am using template 6, there was no difference in the templates from ver. 6 to 7.Wayne,You solution worked for me. Everything works wonders now.Thanks for YOUR help in this one.Harold Quote Link to comment Share on other sites More sharing options...
wreindollar Posted March 8, 2009 Report Share Posted March 8, 2009 Wayne and Ken,Ken,Thanks I tried what you said and because I am using template 6, there was no difference in the templates from ver. 6 to 7.Wayne,You solution worked for me. Everything works wonders now.Thanks for YOUR help in this one.HaroldHarold, I can't take any credit for fixing anything. I was only quoting what Ken said in his post, and I was following Ken's suggestion for the trouble. So all the Kudo's go to Ken for his suggestion. Glad to hear it fixed you problem also and your system is running fine.Wayne Quote Link to comment Share on other sites More sharing options...
Harold Posted March 24, 2009 Report Share Posted March 24, 2009 Ok here is a new one for you. What if I wanted to use the history template file to create a file above the genealogy folder.In otherwords my root and other subfolders to root besides genealogy.On my site the genealogy is not the root,and I have links to other parts of my site, is it possible to possible use the same template on all pages?the site is:http://www.robertsfamilytree.orgHarold Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 24, 2009 Report Share Posted March 24, 2009 Ok here is a new one for you. What if I wanted to use the history template file to create a file above the genealogy folder.In otherwords my root and other subfolders to root besides genealogy.On my site the genealogy is not the root,and I have links to other parts of my site, is it possible to possible use the same template on all pages?the site is:http://www.robertsfamilytree.orgHaroldHarold,Yes, you can but you have to adjust the following statements to include("genealogy/begin.php");if( !$cms[support] ) $cms[tngpath] = "genealogy/"; to reflect where you installed TNG. Quote Link to comment Share on other sites More sharing options...
Harold Posted March 25, 2009 Report Share Posted March 25, 2009 I have tried this, however these do not work. I get all sorts of function errors. I have tried both /genealogy/begin.php, and genealogy/begin.phpAny other suggestions that I can try?Harold,Yes, you can but you have to adjust the following statements to include("genealogy/begin.php");if( !$cms[support] ) $cms[tngpath] = "genealogy/"; to reflect where you installed TNG. Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 25, 2009 Report Share Posted March 25, 2009 I have tried this, however these do not work. I get all sorts of function errors. I have tried both /genealogy/begin.php, and genealogy/begin.phpAny other suggestions that I can try?Harold,That code should work if you use meta.php for your custom meta file. Go to Admin >> Setup >> General Settings >> Site Design and make sure it has meta.php. If not update it to use the .php version rather than the .html version and then copy the meta.php from the special folder in the TNG upgrade unzipped folders.Unless your TNG scripts are not in the genealogy subdirectory. Did you also change the $cms[tngpath] line to include the genealogy directory as shown in the code snippet?include("genealogy/begin.php");if( !$cms[support] ) $cms[tngpath] = "genealogy/"; Quote Link to comment Share on other sites More sharing options...
Harold Posted March 27, 2009 Report Share Posted March 27, 2009 Harold,That code should work if you use meta.php for your custom meta file. Go to Admin >> Setup >> General Settings >> Site Design and make sure it has meta.php. If not update it to use the .php version rather than the .html version and then copy the meta.php from the special folder in the TNG upgrade unzipped folders.Unless your TNG scripts are not in the genealogy subdirectory. Did you also change the $cms[tngpath] line to include the genealogy directory as shown in the code snippet?include("genealogy/begin.php");if( !$cms[support] ) $cms[tngpath] = "genealogy/";I did, I will change it again, and send you a link to it, so you can see what it doesHarold********EDIT********Here is a link to a file modified with your suggesgtions:http://www.robertsfamilytree.org/cookbook/.../earthquake.phphere is a link to the same file with the "genealogy/begin.php" changed to absolute "/genealogy/begin.php"http://www.robertsfamilytree.org/cookbook/...earthquake1.phpStill no luck. 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.