Jump to content
TNG Community

Extra Pages


Alan H

Recommended Posts

I am using version 12 of TNG, templage 13.  I have added a link (in template settings feature links section) in my header bar that calls a histories file and it works fine.     

Sophia Priess, /histories/SophiaPriess.php

I am trying to add an extra page to my TNG site.  I followed the Extra_Page_Template_Procedure.doc as best I could.  I copied historytemplate.php, pasted it in my new /extrpgs directory. Then I made a copy of that file and created a file named 'userpage.php' and made the necessary changes.   (See the code below)  Since /histories and /extrapgs both live in the same main directory I assumed adding the following in the menu bar would also work.

User Page, /extrapgs/userpage.php

But when I click on 'User Page' I get an Internal Server Error.

So, I went back to Extra_Page_Template_Procedure.doc

12.       In order for users to access this page from the home page (for example), add a new home page menu item (e.g., User Help) and format the link as follows:

      <a href=”/extrapgs/userhelp.php” class=”sidelink”><strong>User Help</strong></a>

But I cannot find anyplace in template settings where I might add a new home page menu item. Now I have a 2-part question.  

How do I add an extra page to my header bar?  

How do I add a new home page menu item?

Alan H

------

<?php

//  Attempt to create a page located in the extrapgs directory

//  For simplicity in testing I am calling it userpage.php

$cms['tngpath'] = "../";

include( "../begin.php");

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");

//end of new include lines

$yourtitle = "User Pages";

$yourlink = "/extrapgs/userpage.php";

$logstring = "<a href=\"$yourlink\">$yourtitle</a>";

writelog($logstring);

preparebookmark($logstring);

$flags['noicons'] = true;

tng_header( $yourtitle, $flags );

//STEP 6: Replace the text below with your own text (do not include the headline). 

//  Use HTML tags to create paragraph breaks and other formatting. 

?>

<table align=”center” border=0 width=”95%”><tr><td>

<p>This is a blank page ready for html for the extra page named userpage.</p>

<p></p>

</td></tr></table>

<?php 

tng_footer( "" ); 

?>

Link to comment
Share on other sites

M

I get that it need to be 

<a href=”/extrapgs/userpage.php” class=”sidelink”><strong>User Help</strong></a>

 but I had not gotten that far.  I looked at the index.php in template 13 directory but haven't a clue where to put the above (bold) code.

Plus, would I have to do this for each extra page I want to add.  Seems like extra work.  Why isn't my page recognized in the header bar template settings ...  User Page, /extrapgs/userpage.php

Is it because there isn't an 'index.php' inside my newly created /extrapgs ???

Extra pages should be simple like histories pages, shouldn't they?

Alan

Link to comment
Share on other sites

I added the menu item in the template13 index.php - thanks, that was easy actually. 

I tried the link and still get the server error. I tried several variables and get the same error.

I put the file in /histories, changed /extrapgs/userpage.php to /histories/userpage.php and it works perfectly.

I'm stumped at this point.

Link to comment
Share on other sites

Newfloridian

I've used template 4 now for nigh on 15 years and have amassed about 500 Feature Articles using historytemplate.php No problem adding and indexing them T4 has four slots on its index page to start you off with these.

I don't know the architecture of template 13 so perhaps a link to your home page might be of benefit. 

Alan

 

Link to comment
Share on other sites

My php file in /extrapgs NOW WORKS!!  Turns out the permissions were not set the same for the /extrapgs directory as the other directories.  Simply Hosting made the adjustment and it works just like the /histories php files.  Yeah.

Thanks to Darrin for pointing me in the right direction.

Alan H

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