Code
The website is written using PHP and MySQL (see Database Structure)
Step A
- The user calls the page (e.g.: http://www.gpgearheads.org/84) .
Step B
- The script extracts the '84' out of the URL.
Step C - Generate the Node Path
-
The below snippet of code is PHP. It is the recursive function used to generate the path taken to get to the node. The path to this node (in human readable form) would be root->What We Do (and How)->Everything Else->Website->Code. The output of that function would be _16_77_78_84.
-
The below snippet of code is PHP. It is the recursive function used to generate the path taken to get to the node. The path to this node (in human readable form) would be root->What We Do (and How)->Everything Else->Website->Code. The output of that function would be _16_77_78_84.
Step D - Generate Left Menu
-
The below snippet of code is also PHP. It is the recursive function used to generate the menu seen at the left of the page.
-
The below snippet of code is also PHP. It is the recursive function used to generate the menu seen at the left of the page.
Step E - Load Template
- The template is simply an xhtml page which is shared among all pages. The template shared among all these nodes can be seen simply by looking at different nodes. Everything that does not change is on the template. The things that do change (this content, the left menu, and the title) are generated separately and put in the template.
Step F - Finished Product
- After the template is filled with the generated content, it is sent to the user for their viewing pleasure.
