Jump to content
TNG Community

Using History Template for Extra Pages


dvfreeman

Recommended Posts

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.
Link to comment
Share on other sites

  • 2 months later...

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 code

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

BCordle413@aol.com

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

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.

Thanks

Matt Falvey

Perth W Australia

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 code

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

BCordle413@aol.com

Link to comment
Share on other sites

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 Falvey

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.

Thanks

Matt Falvey

Perth W Australia

Link to comment
Share on other sites

  • 2 months later...
Tom Glispin

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

Link to comment
Share on other sites

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

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 database

Link to comment
Share on other sites

Tom Glispin

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 database

Actually I am not getting it on any other page. I will check out the trouble shooting link.

Tom

Actually I am not getting it on any other page. I will check out the trouble shooting link.

Tom

The 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

Link to comment
Share on other sites

Actually I am not getting it on any other page. I will check out the trouble shooting link.

Tom

The 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

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Tom Glispin

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

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, Tom

Link to comment
Share on other sites

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, Tom

Tom,

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

Link to comment
Share on other sites

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

Note the icons on the right.

The screen should look like this:

http://www.robertsfamilytree.org/tng/files/Privacy-1.bmp

What have I done wrong here?

Any suggestions? I also sent an email out on tngusers2

Thanks,

Harold

Link to comment
Share on other sites

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

Note the icons on the right.

The screen should look like this:

http://www.robertsfamilytree.org/tng/files/Privacy-1.bmp

What have I done wrong here?

Any suggestions? I also sent an email out on tngusers2

Thanks,

Harold

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Please take a look at the TNG Wiki article User Pages - Getting Started

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

Link to comment
Share on other sites

Please take a look at the TNG Wiki article User Pages - Getting Started

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

Link to comment
Share on other sites

wreindollar

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

wreindollar

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

Harold,

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

Link to comment
Share on other sites

  • 3 weeks later...

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

Harold

Link to comment
Share on other sites

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

Harold

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.

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

Any 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/";

Link to comment
Share on other sites

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 does

Harold

********

EDIT

********

Here is a link to a file modified with your suggesgtions:

http://www.robertsfamilytree.org/cookbook/.../earthquake.php

here is a link to the same file with the "genealogy/begin.php" changed to absolute "/genealogy/begin.php"

http://www.robertsfamilytree.org/cookbook/...earthquake1.php

Still no luck.

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