logo

Custom TNG Index File [index.php]

Resources - Genealogy

Strictly logic, no content in this file.

Index.php file as of Jan 2010
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php	
/*	custom index.php modified by ldp */
 
include("begin.php");	// security check and locate configuration files
include($cms[tngpath] . "genlib.php");	// load settings and functions
include($cms[tngpath] . "getlang.php");	// language settings and values
include($cms[tngpath] . "$mylanguage/text.php");
 
// connect to the database
tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit;
 
include($cms[tngpath] . "checklogin.php");	// is user logged in or generic
 
	/*	begin creation of the html file
		starts at doctype
		entire <head> section - including custom meta (meta.php)
		begin <body> section - load custom header  (header.php)
		drop-down menus (based on noicons flag setting)	*/
$flags[noicons] = true;
tng_header( $text[ourpages], $flags );
 
	/*	continue creation of the html file
		custom front page content goes in this included file	*/
include($tngconfig[templatepath] . "homepagecontent.php");
 
	/*	close out the html file
		load content of custom footer (footer.php)
		load scripts as needed
		load end.php	*/
tng_footer( "" ); 
?> 


Perhaps all of the $cms[tngpath] statements should change to $rootpath? Or, frankly, they could just be eliminated altogether since I know that index.php and these other files are in the same directory.

All index.php does is layout the structure of the homepage by reference to other files:

  1. function tng_header which loads meta.php and topmenu.php
  2. file custom/homepagecontent.php which has the articles and pictures
  3. funtion tng_footer which loads footer.php and end.php

Thus I am using the TNG functions tng_header and tng_footer to create the framework which surrounds all program content.


blog comments powered by Disqus
Copyright © 2012 American Roots. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.