Difference between revisions of "How TNG builds a page"

From TNG_Wiki
Jump to: navigation, search
(New page: Some of the information on how TNG builds a page can be found in the Genlib Functions Category:Understanding TNG Category:Programmer)
 
(image file v2)
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Some of the information on how TNG builds a page can be found in the [[Genlib Functions]]
+
[[Image:2How_tng_builds_a_page.png|thumb|Process Map v2]]
 +
[[Image:How_tng_builds_a_page.png|thumb|Process Map v1]]
  
[[Category:Understanding TNG]]
+
In order to effectively troubleshoot or enhance your site, you need to know how the informaiton gets put on the user's screen. How does the HTML file your visitor looks at get constructed from the php file that they select? It's an exceedingly convoluted process, and it's easy to get lost.
 +
 
 +
Let's try to map this out. For the text based folk among us, here's the list of files and the order in which they are called.
 +
 
 +
Starting with ANY main php file on your site - any "menu item" link:
 +
# begin.php
 +
## subroot.php
 +
## config.php
 +
### customconfig.php
 +
## templateconfig.php
 +
# ''[optional files depending (mapconfig, cmsevents, etc.)]''
 +
# genlib.php
 +
# getlang.php
 +
# text.php
 +
# '''connect to database''' - nothing in the previous files can refer to things in the database, because it has not yet been connected, errors will result
 +
# checklogin.php
 +
# ''[log.php, personlib.php, functions.php]''
 +
# ''[variables and scripts for this file]''<br />'''note that up to this point, only variables have been created, the web page has not yet been started'''<br />
 +
# tng_header
 +
## create doctype and xmlns lines - '''this is the beginning of the actual web page'''
 +
## <head>
 +
## title, keywords, description, scripts
 +
## css files
 +
## $custommeta => load your custom meta file as defined in Admin Setup
 +
## </head>
 +
## $customheader => load your custom header file as defined in Admin Setup
 +
## <body>
 +
## tng_icons (the three button menu that you put on left or right)
 +
# ''[stuff in the file]''
 +
# tng_coreicons (links enabled in Admin Setup - home/login/search/print/bookmark)
 +
# ''[stuff in the file]''
 +
# tng_footer
 +
## $customfooter => load your custom footer file as defined in Admin Setup
 +
## load some scripts
 +
## end.php
 +
### </body>
 +
### </html>
 +
 
 +
 
 +
tng_header, tng_icons, tng_coreicons, and tng_footer are all functions defined in the file genlib.php
 +
 
 +
Some of the information on how TNG builds a page can be found in the [[Genlib Functions]] article.
 +
 
 +
[[Category:How TNG Works]]
 
[[Category:Programmer]]
 
[[Category:Programmer]]

Revision as of 18:27, 15 July 2011

Process Map v2
Process Map v1

In order to effectively troubleshoot or enhance your site, you need to know how the informaiton gets put on the user's screen. How does the HTML file your visitor looks at get constructed from the php file that they select? It's an exceedingly convoluted process, and it's easy to get lost.

Let's try to map this out. For the text based folk among us, here's the list of files and the order in which they are called.

Starting with ANY main php file on your site - any "menu item" link:

  1. begin.php
    1. subroot.php
    2. config.php
      1. customconfig.php
    3. templateconfig.php
  2. [optional files depending (mapconfig, cmsevents, etc.)]
  3. genlib.php
  4. getlang.php
  5. text.php
  6. connect to database - nothing in the previous files can refer to things in the database, because it has not yet been connected, errors will result
  7. checklogin.php
  8. [log.php, personlib.php, functions.php]
  9. [variables and scripts for this file]
    note that up to this point, only variables have been created, the web page has not yet been started
  10. tng_header
    1. create doctype and xmlns lines - this is the beginning of the actual web page
    2. <head>
    3. title, keywords, description, scripts
    4. css files
    5. $custommeta => load your custom meta file as defined in Admin Setup
    6. </head>
    7. $customheader => load your custom header file as defined in Admin Setup
    8. <body>
    9. tng_icons (the three button menu that you put on left or right)
  11. [stuff in the file]
  12. tng_coreicons (links enabled in Admin Setup - home/login/search/print/bookmark)
  13. [stuff in the file]
  14. tng_footer
    1. $customfooter => load your custom footer file as defined in Admin Setup
    2. load some scripts
    3. end.php
      1. </body>
      2. </html>


tng_header, tng_icons, tng_coreicons, and tng_footer are all functions defined in the file genlib.php

Some of the information on how TNG builds a page can be found in the Genlib Functions article.