Jump to content
TNG Community

Adding 'features' pages template 4


Martin J Mosley

Recommended Posts

Martin J Mosley

I am an old hand at genealogy, but new to the idea of coding webpages. (Although I'm still smiling!!)

Is there anyone out there with the time or patience to help me get somewhere? I'm trying to add features, using the 'empty links' on template 4 with the intention of showing transcripts of a diary, some professional background histories etc.

I'm sure this is dead simple for all you coders out there, but I've spent the best part of a week getting confused and would appreciate step by step instructions.

If anyone can help, it would be greatly appreciated.

Many thanks

Martin

www.mosleyfamilies.net

Link to comment
Share on other sites

Probably the best thing to do is take a look at the historytemplate.php file in your TNG folder.

I'm not sure how much HTML you know, but the section that has "Your history goes here (do not include a BODY tag)...." is where you would but the HTML code.

Save the file off as feature1.php (or whatever you would like) and make sure the link on the home page points to that file.

Hopefully that will get you going in the right direction, but let us know if you problems with it.

Rush

Link to comment
Share on other sites

Martin J Mosley

Thanks Rush,

I have to admit to being a complete newby! I have never coded anything.

As you will no doubt see if you look at my pages, I have tried to activate the link 'Elizabeth Websters Diary' but I am obviously missing something simple because I'm getting a string of errors showing.

Can you or anyone else point me where I need to look and what I need to enter etc?

I'm sorry to look so helpless, but I guess we all gotta begin somewhere!

Thanks for all your patience and help

Martin

Link to comment
Share on other sites

Thanks Rush,

I have to admit to being a complete newby! I have never coded anything.

As you will no doubt see if you look at my pages, I have tried to activate the link 'Elizabeth Websters Diary' but I am obviously missing something simple because I'm getting a string of errors showing.

Can you or anyone else point me where I need to look and what I need to enter etc?

I'm sorry to look so helpless, but I guess we all gotta begin somewhere!

Thanks for all your patience and help

Martin

Martin,

I too am using the template 4 and have customized it for My site.

I have created some of the 'features' :

Russ

Here is the link to one of my history files History of the Halladay Name

I have attached the file that generates this page for you to look at, which was created from the historytemplate and customized for my site.

You did not give us a link to your webpage so we can see what you are trying to do. :!:

Hope this will help.

If you attach your history file maybe we can look at it :grin:

HalladayNameOrigin.php

Link to comment
Share on other sites

Martin J Mosley

Well,

With a little help from my 'friends' on here, and a little experimentation of my own, I have at least got the page showing, and the principal link is functioning.

Many thanks to you all for your help so far.

Now... How do I get the headers, together with the links back from my features page to other pages, to work?

If anyone can help out once more I will be eternally grateful.

Martin

Link to comment
Share on other sites

Now... How do I get the headers, together with the links back from my features page to other pages, to work?

:cool:

Martin,

The first thing you need to check is to make sure the diary.php file is pointing to the right place with absolute links. the first part of the diary.php file should look like this:

<?php
//Replace all the "include" lines in your pre-5.x histories with the following lines (up to the next comment)
include( "../begin.php");   //Nuke users must include "../../../begin.php" here
if( !$cms[support] )
    $cms[tngpath] = "../";
include($cms[tngpath] ."genlib.php");
include($cms[tngpath] ."getlang.php");
include($cms[tngpath] ."$mylanguage/text.php");
tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit;
include($cms[tngpath] ."checklogin.php");
include($cms[tngpath] . "log.php");
writelog( "<a href=\"histories/diary.php\">diary.php</a>" );
//end of new include lines
Then you will need to edit your meta.php and topmenu.php files and make the links absolute instead of realative also. In your meta.php file find the line that references your style sheet.
<link href="genstyle.css" rel="stylesheet" type="text/css">
and change it to
<link href="/genstyle.css" rel="stylesheet" type="text/css">
This should fix the style of the links problem. In your topmenu.php file you need to make all the links absolute also by putting a forward slash ("/") in front of <b>all references to file names</b> such as:
<a href="searchform.php"><img src="search4.gif" alt="Search for Names" width="109" height="35" vspace="0" border="0"></a>
change to:
<a href="/searchform.php"><img src="/search4.gif" alt="Search for Names" width="109" height="35" vspace="0" border="0"></a>

You will need to do this to all the links in this file.

I also noticed that you have enabled the ability to change the language to French. You should also add "English" to your Language table so that if it gets changed to French, a person could change it back to "English".

Hope this helps if you send your file I could take a look at it.

Russ :smile:

Link to comment
Share on other sites

Martin J Mosley

Russ,

Thanks so much, I really am grateful, and am sure I would never be able to face this entirely new learning curve without the help you and many others on these forums have offered. It feels like a real community here and its encouraging to know that help is rarely far away.

As you will see, I have made the changes, and things are working better. Still one or two problems to iron out, but its going in the right direction.

I've attached my index.php, and the diary.php files for you to take a look at. If these are the wrong ones please let me know.

Thanks once again

Martin

diary_code.txt

index_code.txt

Link to comment
Share on other sites

Russ,

Thanks so much, I really am grateful, and am sure I would never be able to face this entirely new learning curve without the help you and many others on these forums have offered. It feels like a real community here and its encouraging to know that help is rarely far away.

As you will see, I have made the changes, and things are working better. Still one or two problems to iron out, but its going in the right direction.

I've attached my index.php, and the diary.php files for you to take a look at. If these are the wrong ones please let me know.

Thanks once again

Martin

Martin,

I checked those files and they look ok. You need to fix the links in the topmenu.php file so that the href files have a foward slash in front of the file names so the link menus will work.

to fix the session-cashe error message that is showing on the page check out the forum about this type of error message:

session-cache errors

Russ :roll:

Link to comment
Share on other sites

  • 2 months later...

Hi Newbie here again.

Followed all the instructions here. and the file opens up lovely as it should.

If I use the tabs and the menus from them, ( I think they are also called the icons), everything is fine and works well.

If I use the menu on the left every one gives a 404 errors, as in:

"The requested URL /histories/places.php was not found on this server."

It's as if it can't find it's way back out of the histories folder. I've put the slashes in front of all the href items.

I bet it's something simple, but for the life of me I can't find it. Can anybody help?

Link to comment
Share on other sites

Hi Newbie here again.

Followed all the instructions here. and the file opens up lovely as it should.

If I use the tabs and the menus from them, ( I think they are also called the icons), everything is fine and works well.

If I use the menu on the left every one gives a 404 errors, as in:

"The requested URL /histories/places.php was not found on this server."

It's as if it can't find it's way back out of the histories folder. I've put the slashes in front of all the href items.

I bet it's something simple, but for the life of me I can't find it. Can anybody help?

Martin,

It all looks like it works ok for me, however your 2nd history item won't open for me as you have it protected and it is asking for the password to open it.

Russ

Link to comment
Share on other sites

A mate of mine sorted the problem by changing the meta.html to a php file.

After he had done this I checked your instructions again Russ. Your instructions stated to change the META.PHP which my mate did and sorted my problem. What I can't understand is that there was no meta.php in the download only a meta.html

Ardwyn

Link to comment
Share on other sites

  • 2 weeks later...

A mate of mine sorted the problem by changing the meta.html to a php file.

After he had done this I checked your instructions again Russ. Your instructions stated to change the META.PHP which my mate did and sorted my problem. What I can't understand is that there was no meta.php in the download only a meta.html

Ardwyn

Thats because the download doesn't come with the meta.php it is a customized version of meta.html with some php functions to it.

Russ

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