Ok the object here is to get code on my siite more manageable. I have made quite a bit of progress the past day or so. But need some honest input/feedback on this code (i.e. the comments being detailed enough, etc...
Basically what I did was broke the code up a bit to ease any confusion on what is what and here edits need to be made. I am most likely going to be updating it even more as time goes on, but this is IMHO a good stepping stone for me...
The following code is a test page that I setup using one of the "live" pages from my site. I got notes to explain what each variable does, and the bulk of the code is in a .tpl file since it does not have to be modified. All edits for each page will be made using the code below. Each motherboard page as it stands right now will look like this:
Code:
<?php
/* File revision 7/04/05 @ 4:15AM:- There is an information link at the bottom or this page. PLEASE keep an eye on that thread and post as necessary in that thread!!! */
$meta_title = "Tahiti 2.x - HP OEM Asus A7V-VM Motherboard";
/* $meta_title is what found between the <title></title> */
$content1 = "Spec sheet and downloads for the HP Tahiti motherboard";
/* $content1 is the description portion of the meta tags */
$content2 = "HP, Tahiti 2.x, motherboard, spec sheet, downloads, information";
/* $content2 is the keywords portion of the meta tags */
$page_name = "Tahiti 2.x";
/* $page_name is what shows on the top of the pages NOT the title bar!! */
$image = "/common/noimage.jpg";
/* $image is the code that controls the actual pic on the page. Not the actual size control but the location of the image. */
$processors = "Unknown";
/* $processors is the code that controls the listing for the processor for the board(s) */
$bus = "Unknown";
/* $bus is the code that controls the listing for the bus speed for the board(s) */
$chipset = "Unknown";
/* $chipset is the code that controls the listing for the chipset for the board(s) */
$RAM = "Unknown";
/* $RAM is the code that controls the listing for the RAM for the board(s) */
$video = "Unknown";
/* $video is the code that controls the listing for the Video for the board(s) */
$audio = "Unknown";
/* $audio is the code that controls the listing for the Audio for the board(s) */
$expansion = "Unknown";
/* $expansion is the code that controls the listing for the Expansion Slots for the board(s) */
$part_numbers = "Unknown";
/* $part_numbers is the code that controls the listing for the Spare Part Numbers for the board(s) */
$add_images = "None";
/* $add_images is the code that controls the listing for any additional image(s) such as Front Panel pinouts, etc.. */
$models = "<b>HP</b> - <i>7770(P3052A-ABU), 7830(P3077A-ABN), 7830(P3082A-ABE), 7840(P3066A-ABH),
7850(P3073A-ABS), 7860(P2881A-ABF), 7860(P3085A-ABE), 7861(P2997A-ABM),
7870(P2883A-ABF), 7880(P3061A-ABU), 7880(P3068A-ABH), 7880(P3074A-ABS),
7880(P3079A-ABN), 7890(P2887A-ABF), 7891(P3064A-ABU), 8705(D7205Y-ABA),
8705(D7206A-ABA), 8705(D7206B-ABA), 8705(D7206C-ABA), 8705(D7206D-ABA),
8705(D7206E-ABA), 8705(D7206F-ABA), 8705(D7206G-ABA), 8710(D7206W-ABA),
8710(D7206Y-ABA), 8720(D7206P-ABA), 8720(D7206Q-ABA), 8750(P2882A-ABS),
8760(P2885A-ABS), 8775(P2849A-ABU), 8776C(P2978A-ABA), 8860(P2941A-ABA),
8870(P2942A-ABA), 8890(P3128A-ARS), 9720(P2852A-ABU), 9725(P1433A-ABF),
9726(P2906A-ARS), 9726(P2906A-UUB), 9730(P2864A-ABF), 9740(P2854A-ABU),
T9715(P2862A-ABF), XL844(P3978A-ABA), XL847(P3980A-ABA), XL866(P3945A-ABA),
XL876(P3946A-ABA), 7835, 7865, 7885, FR 7939, UK 7940, US/CAN 7950, FR 7950, NL 7950, NW 7950, UK 7950, LA 7957, SP 7960, xL946 US/CAN, 9720 cfg-PC, AP 8886</i>";
/* $models is the code that controls what systems this board is found in. This particular test file pertains to a board that is only found/reported in HP systems. Please follow the link at the bottom of this page for more detailed information... */
$b_docs = "None";
/* $b_docs is the code that controls what manuals/documentation/etc is availible for this board. */
$retail = "This motherboard is an OEM Asus A7V-VM. <br><i>No retail information availible at this time.</i>";
/* $retail is the code that controls What the manufacturer and model of the board is. Please be sure to keep the code tags intact!! */
$notes = "HP";
/* $notes is what adjusts the Manufacturer in the notes section of each page. You will need to update this accordingly!! */
$f_link = "/forum/viewtopic.php?t=552";
/* $f_link represents the link to the Motherboard Pages Discussions thread */
include ('includes/header2.inc');
include ('includes/template1.tpl');
/* header2.inc is the code that contains the Title, META tags, and HEAD code. You need not worry about this file with the availible adjustments above.
template1.tpl --->> See http://www.ctechinfo.org/forum/viewtopic.php?t=655 For more information..
*/
?>
So please do not hold back. Tell me what you think. I am ahead of myself in many respects with php code. But I have managed some workarounds to suit my needs... Major limitations right now is no extra MySQL DB space nor do I have the knowlege at this time to get into MySQL programming...
The one nice feature to this new coding setup is that it will reduce the space used on the server since I will be using on .tpl file for all the pages instead of having hundreds of pages containing all the same code....
Thanks in advance