• Welcome Visitor! Please take a few seconds and Register for our forum. Even if you don't want to post, you can still 'Like' and react to posts.

Any php programers here??


Jim Oaks

Just some guy with a website
Administrator
Founder / Site Owner
Supporting Vendor
Article Contributor
TRS Banner 2010-2011
TRS Banner 2012-2015
TRS 20th Anniversary
VAGABOND
TRS Event Participant
GMRS Radio License
TRS 25th Anniversary
Joined
Aug 2, 2000
Messages
15,086
Age
57
City
Nocona
State - Country
TX - USA
Other
2005 Jaguar XJ8
Vehicle Year
2021
Vehicle
Ford Ranger
Drive
4WD
Engine
2.3 EcoBoost
Transmission
Automatic
Total Lift
3.5-inches
Tire Size
295/70/17
I would like to update The Ranger Station. I have over 600 html pages here. To change the look, I have to change each and every page.

I'd like to be able to change to a php setup where I can change header/footer and have it effect every page, without me having to open and save the page like you do with a basic html include script.

I would need a template that I could paste the current page info in, or a script to add/replace on the current pages, that would allow me to convert them to php and give me the result I want. Then later if I want to make a style change, I only have to edit a couple of files.

I there anyone here that can help me with that??
 
What are you looking to do? Replace the html header and footer in each of the pages with an include, or load all of the data on the pages in into a database and use 1 file to display all articles? The latter would need a maintenance tool to add update articles. Could even group them for the tech library so that displays dynamically.
 
The pages in the tech library uses this code to place the header on each page:

Code:
<!--webbot bot="Include" U-Include="header.htm" TAG="BODY" startspan -->

This is a code used in php pages for wordpress for the header:

Code:
<?php get_header(); ?>

Changing the header php will take effect on every page wordpress uses with the first code above.

However, if I change header.htm in my current setup, it doesn't change the header on any html page using that second code above.

I don't want to be writing to a database.
 
It looks like I may be able to replace:

Code:
<!--webbot bot="Include" U-Include="header.htm" TAG="BODY" startspan -->

with something like this, but will actually change the look of pages without having to open each one and save it like you do with the first code:

article0012-02.gif


So what's the difference between:

Code:
<?php get_header(); ?>

and:

Code:
<? php include "header.php"; ">
 
Last edited:
I am doing a LOT of php research and have a few sites under my belt now, nothing super fancy but well within the scope of this issue.

PHP:
<?php get_header(); ?>
Is a wordpress specific function that wont work unless you are using it with a wordpress installation where as
PHP:
<? php include "header.php"; ">

Is general PHP santax that is supported by default.

Depending on how, and what you really needed/wanted to do, it would be a rather simple (but time consuming) process to convert all of the stuff over to have the headers and footers ripped off.
 
Last edited:
I have over 600 pages to be edited. I only want to do it once. I cringe at the idea of editing over 600 pages.
 
One file for the header and footer (plus any other variables you want to pass the final page) that I decided to call constant, since its contents will be the same for all pages:
PHP:
<?php
$header = <<<Header
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="keywords" content="ford ranger, Ford, Ranger, 4.0L, 4.0, liter, engine, cologne, ford 4.0, ford ranger 4.0">
<META NAME="Description" CONTENT="The Ford Ranger 4.0L Engine - The Ranger Station">
<META NAME="ROBOTS" CONTENT="INDEX,FOLLOW">
<title>The Ford Ranger 4.0L Engine - The Ranger Station</title>
<link rel="icon" href="favicon.ico" type="image/gif" />
<STYLE TYPE="text/css" />
<!--
  A  {text-decoration: none}

-->
</STYLE>
</head>
<body vlink="#000080" link="#000080" bgcolor="#000000" text="#000000" alink="#FF0000">
<!--webbot bot="Include" U-Include="header.htm" TAG="BODY" startspan -->

<table border="0" width="98%" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="100%" height="127">
      <table border="0" width="100%" bgcolor="#002080" cellpadding="0" cellspacing="0">
        <tr>
          <td width="25%">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%">

<i><b><font color="#FFFFFF" face="Arial" size="2"><img border="0" src="../logos/trsweb_navy_small_2.gif" width="250" height="135"></font></b></i>
    </td>
  </tr>
  <tr>
    <td width="100%">
      <p style="margin-left: 3"><i><font face="Impact" color="#ffffff" size="5">TheRangerStation.com 
      </font></i><font face="Arial" color="#ffffff" size="2"><i><b>SM </b></i></font></p>
    </td>
  </tr>
</table>
          </td>
                      
            <td width="75%" valign="bottom" align="right">
            <p align="right" style="margin-right: 5"><i><b><font color="#FFFFFF" face="Arial" size="2">Serving
            Ranger, Bronco II, Explorer & Mazda B-Series Owners Since 1999 </font></b></i>
            <p align="right" style="margin-right: 5"> 
            <!-- SiteSearch Google -->
           
<form action="http://www.google.com/cse" id="cse-search-box" target="_blank">
  <div>
    <input type="hidden" name="cx" value="partner-pub-5354086480683247:rc95zhwn0br" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>

<!-- SiteSearch Google -->
            
            <br>
      
   
            
            
          </td>
        </table>
    </td>
  </tr>
  </table>
<div align="center">
  <center>
<table border="5" cellpadding="2" cellspacing="0" width="98%" bordercolor="#000000" bgcolor="#0000FF">
  <tr>
    <td width="11.11%" align="center"><b><a href="../index.php"><font face="Arial" color="#FFFFFF" size="2">Home</font></a></b></td>
    <td width="11.11%" align="center"><b><a href="http://www.therangerstation.com/forums"><font face="Arial" color="#FFFFFF" size="2">Forums</font></a></b></td>
    <td width="11.11%" align="center"><b><a href="index.php"><font face="Arial" color="#FFFFFF" size="2">Tech
      Library</font></a></b></td>
    <td width="11.11%" align="center"><b><font size="2" face="Arial"><a href="../resources/index.htm"><font color="#FFFFFF">Resources</font></a></font></b></td>
    <td width="11.11%" align="center"><b><a href="../Magazine/index.htm"><font face="Arial" color="#FFFFFF" size="2">Magazine</font></a></b></td>
    <td width="11.11%" align="center"><b><a href="../galleries/index.htm"><font face="Arial" color="#FFFFFF" size="2">Truck
      Galleries</font></a></b></td>
    <td width="11.11%" align="center"><b><a href="http://www.therangerstation.com/forums/classifieds/index.php"><font size="2" face="Arial" color="#FFFFFF">Classifieds</font></a></b></td>
    <td width="11.11%" align="center"><b><a href="../products/index.htm"><font face="Arial" color="#FFFFFF" size="2">Shirts
      & Decals</font></a></b></td>
    <td width="11.11%" align="center"><b><a href="http://www.jamesoaksenterprises.com" target="_blank"><font size="2" face="Arial" color="#FFFFFF">Parts</font></a></b></td>
  </tr>
</table>
  </center>
</div>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#404040">
    <tr>
      <td width="100%">
      
      <center>
      <script type="text/javascript"><!--
google_ad_client = "pub-5354086480683247";
/* 728x90, created 9/12/10 */
google_ad_slot = "0330513440";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
      </center>

      
      </td>
    </tr>
  </table>
  </center>
</div>
<!--webbot bot="Include" endspan i-checksum="6238" -->
Header;

$footer = <<<Footer
<!--webbot bot="Include"
      U-Include="footer.htm" TAG="BODY" startspan -->

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%">
      <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#FFFFFF">
          <tr>
            <td width="100%">
              <p align="center">
               
              <script type="text/javascript">
  var vglnk = { api_url: '//api.viglink.com/api',
                key: 'a681dde15d2caef382aa0137ce096166' };

  (function(d, t) {
    var s = d.createElement(t); s.type = 'text/javascript'; s.async = true;
    s.src = ('https:' == document.location.protocol ? vglnk.api_url :
             '//cdn.viglink.com/api') + '/vglnk.js';
    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);
  }(document, 'script'));
</script>
             
</table>



<table width="100%">
          <tr>
            <td width="100%">
              <p align="center">      
              <center>
              <script type="text/javascript"><!--
google_ad_client = "pub-5354086480683247";
/* 728x90, created 11/28/10 */
google_ad_slot = "2605375252";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>        </center>
                           
              </td>
          </tr>
          <tr>
            <td width="100%"><font size="2" face="Arial"> </font></td>
          </tr>
          <tr>
            <td width="100%" align="center"><font size="2" face="Arial">Copyright©
              1999-2011  -  <a href="http://www.959media.com" target="_blank"><font color="#000000">959
              Media LLC</font></a><font color="#000000">  </font>-  All Rights Reserved</font></td>
          </tr>
          <tr>
            <td width="100%" align="center"><font size="2" face="Arial">The
              Ranger Station is in no way affiliated with the Ford Motor
              Company.</font></td>
          </tr>
          <tr>
            <td width="100%" align="center"><font size="2" face="Arial"><a href="mailto:admin@therangerstation.com"><font color="#000000">Webmaster </font></a>
              <font color="#000000">
              / </font><a href="../resources/legal.htm"><font color="#000000">Terms
              of Use</font></a><font color="#000000"> / </font><a href="../resources/legal.htm"><font color="#000000"> Privacy Notice</font></a><font color="#000000"> 
              / </font><a href="../resources/legal.htm"><font color="#000000"> Legal</a></font></font></td>
          </tr>
          <tr>
            <td width="100%" align="center"><font color="#000000" size="2" face="Arial"> </font></td>
          </tr>

      </table>

<!--webbot bot="Include" endspan i-checksum="18448" -->

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

  </center>
</div>

</body>
Footer;

Then you would have a .php file for the content, this page requires the "constant.php" we have above and then echo's out the page's unique contents:
PHP:
<?php
include_once 'constant.php';
echo $header;
echo '
    
<div align="center">
  <center>

<table border="0" width="98%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" bgcolor="#000000" height="7">
      <p align="center"><b><font class="Helvetica24" face="Arial, Helvetica, adobe-helvetica, Arial Narrow" color="#FFFFFF" size="5">The
      Ford
      Ranger 4.0L OHV & SOHC V6</font></b></td>
  </tr>
</table>
  </center>
</div>
<div align="center">
  <center>
<table border="0" width="98%" bgcolor="#FFFFFF">
  <tr>
    <td width="100%" bgcolor="#FFFFFF">
      <div align="center">
        <p align="center" style="margin-left: 5; margin-right: 5"><img border="0" src="images/40_engine.jpg" width="400" height="300"></div>
      <div align="center">
        <p align="left" style="margin-left: 10; margin-right: 10"><font size="3" face="Arial">The
        4.0L OHV (Over Head Valve) V-6 engine found its way in to the Ford
        Ranger in 1990 and ultimately replaced the 2.9L V-6. This
        evolutionary redesign of the American 2.9L solved many of the
        reliability issues that plagued its predecessor. A beefier cylinder head
        design eliminated the 2.9L's common failure of cracked heads. Hydraulic
        roller lifters replaced the simple hydraulic lifters used in the 2.9L,
        which were sometimes overly sensitive to oil contamination, often
        requiring the lifters to be replaced prematurely. However, one major
        design fault was not completely eliminated: Valve rockers and upper
        pushrod tips still received poor oil supply, resulting in eventual wear
        to these areas, and consequential valvetrain noise as a result of the
        increased clearance. Required replacement of these parts is common in
        older engines.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 10; margin-right: 10"><font size="3" face="Arial">The
        4.0L OHV engine was produced
        until 2000 and was used in the Ford Explorer and Ranger. Output was 160hp
        and 225 ft·lbf. Though there is some variation, typically 155hp
        is quoted as horsepower for 1990-1992 applications.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 10; margin-right: 10"><font size="3" face="Arial">In
        1998 the 4.0L SOHC (Single Over Head Cam) engine replaced the 4.0L OHV
        engine producing 207hp.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 10; margin-right: 10"><font size="3" face="Arial"><b>SOHC
        & OHV Engine Differences:</b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial">The
        difference between a SOHC 4.0L and OHV 4.0L is that in a SOHC engine
        there is a camshaft sitting on the top of each cylinder head with the
        valves running directly off the camshaft. It doesn't rely on push rods,
        rocker arms, or lifters. The SOHC engine uses a jackshaft in place of a
        camshaft to drive a timing chain to each cylinder head. Three timing
        chains are used, one from the crank to the jackshaft, one in the front
        of the engine to drive the cam for the left bank, and one on the back of
        the engine to drive the cam for the right bank.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial">The
        OHV engine has the cam mounted above the crank. The cam and crank are
        joined in time by a timing chain. Lifters ride on the cam and push rods
        that extend to rocker arms in the heads which push the valves.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 5; margin-right: 5"> </div>
      <div align="center">
        <table border="1" cellpadding="2" cellspacing="0" width="95%" bordercolor="#000000">
          <tr>
            <td width="100%" colspan="2" bgcolor="#000000">
              <p align="center"><font size="4" face="Arial" color="#FFFFFF"><b>Specifications</b></font></td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Engine
              Displacement (Cubic Inches)</font></td>
            <td width="50%"><font size="3" face="Arial Narrow">245 CID</font></td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Type</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">OHV (1990 - 2000) (VIN
                    Code X)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">SOHC (2001 - 2007) (VIN
                    Code E)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Bore x Stroke</font></td>
            <td width="50%"><font size="3" face="Arial Narrow">3.95 x 3.31
              inches</font></td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Compression Ratio</font></td>
            <td width="50%"><font size="3" face="Arial Narrow">9.0:1</font></td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Fuel System</font></td>
            <td width="50%"><font size="3" face="Arial Narrow">Sequential Fuel
              Injection</font></td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Fuel Pressure</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">39 - 40 PSI (30 PSI
              @ idle) (OHV Engines)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">64 - 75 PSI (SOHC
                    Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Horsepower</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">160hp @ 4200 RPM (1990
                    - 2000)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">207hp @ 5250 RPM (2001
                    - 2007) </font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Torque</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">220 @ 2400 RPM (1990 -
                    2000)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">238 @ 3000 RPM (2001 -
                    2007)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Oil Pressure</font></td>
            <td width="50%"><font size="3" face="Arial Narrow">40 - 60 PSI @
              2000 RPM</font></td>
          </tr>
          <tr>
            <td width="100%" colspan="2" bgcolor="#808080">
              <p align="center"><b><font size="4" face="Arial" color="#FFFFFF">Tune
              Up</font></b></td>
          </tr>
          <tr>
            <td width="50%" valign="top" align="left"><font size="3" face="Arial Narrow">Spark Plug
              (Motorcraft)</font>
              <p><font size="3" face="Arial Narrow"><b>Important Note:</b> The
              SOHC spark plug is about 1/4 inch longer then that of the OHV. The
              OHV plug will fit but it won't operate properly.</font></p>
              <p align="center"><img border="0" src="images/spark_plug_comparo.JPG" width="398" height="170"></p>
              <p align="center"><font face="Arial Narrow" size="3">(OHV spark
              plug at the top - SOHC plug on the bottom)<br>
              </font></p>
            </td>
            <td width="50%" valign="top" align="left">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">1990-1996 uses SP486
                    (Platinum)  (old part number is AWSF42P)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">1997-2000 uses SP500
                    (Platinum) (old part number is AGSF22PP) or </font><font size="3" face="Arial Narrow">SP413
                    (Premium Nickel)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">2001-2005 uses SP498 (Platinum)
                    (old part number is </font><font size="3" face="Arial Narrow">AGSF34FP)</font><font size="3" face="Arial Narrow">
                    or SP412 (Nickel) </font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Spark Plug Gap</font></td>
            <td width="50%"><font size="3" face="Arial Narrow">0.054 inches</font></td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Ignition Timing</font></td>
            <td width="50%"><font face="Arial Narrow" size="3">10 degrees BTDC</font></td>
          </tr>
          <tr>
            <td width="50%"><font size="3" face="Arial Narrow">Firing Order</font></td>
            <td width="50%"><font size="3" face="Arial Narrow">1-4-2-5-3-6</font></td>
          </tr>
          <tr>
            <td width="100%" colspan="2" bgcolor="#808080">
              <p align="center"><b><font size="4" face="Arial" color="#FFFFFF">Capacities</font></b></td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Oil Capacity With Filter
              Change</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">5 Quarts (OHV Engines)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">5 Quarts (SOHC Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Cooling System Capacity
              (Quarts)</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">W/AC- 7.2 / W/O AC 6.5
                    (OHV Engines)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">13.2 Quarts (SOHC
                    Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="100%" colspan="2" bgcolor="#808080">
              <p align="center"><b><font size="4" face="Arial" color="#FFFFFF">Torque
              Specifications</font></b></td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Cylinder Head</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font face="Arial Narrow" size="3">Torque in 3 steps [1st (22-26ft-lbs),
              2nd (52-56ft-lbs), 3rd (Tighten another 90-degrees)] (OHV Engines)</font></td>
                </tr>
                <tr>
                  <td><font face="Arial Narrow" size="3">Torque in 2 steps [1st
                    (24ft-lbs),
              2nd (Tighten another 90-degrees)] (SOHC Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Main Bearing Bolts</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">66 - 77 ft-lbs (OHV
                    Engines)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">72 ft-lbs (SOHC
                    Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Rod Bearing Bolts</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">19 - 24 ft-lbs (OHV
                    Engines)</font></td>
                </tr>
                <tr>
                  <td><font face="Arial Narrow" size="3">Torque in 2 steps [1st
                    (15ft-lbs),
              2nd (Tighten another 90-degrees)] (SOHC Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Crankshaft Pulley Bolts</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font face="Arial Narrow" size="3">Torque in 2 steps [1st
                    (30-37ft-lbs),
              2nd (Tighten another 90-degrees)] (OHV Engines)</font></td>
                </tr>
                <tr>
                  <td><font face="Arial Narrow" size="3">Torque in 2 steps [1st
                    (37ft-lbs),
              2nd (Tighten another 90-degrees)] (SOHC Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Flywheel to Crankshaft
              Bolts</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">59 ft-lbs (OHV Engines)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">75 - 85 ft-lbs (SOHC
                    Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Lower Intake
              Manifold / Throttle Body</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">Torque in 4 steps [1st
                    (3-6ft-lbs), 2nd (6-11ft-lbs), 3rd (11-15ft-lbs) 4th
                    (15-18ft-lbs)] (OHV Engines) </font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">7 ft-lbs (SOHC Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="50%"><font face="Arial Narrow" size="3">Exhaust Manifold</font></td>
            <td width="50%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td><font size="3" face="Arial Narrow">19 ft-lbs (OHV Engines)</font></td>
                </tr>
                <tr>
                  <td><font size="3" face="Arial Narrow">16 ft-lbs (SOHC
                    Engines)</font></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </div>
      <div align="center">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td width="100%">
              <p align="center"><font size="4" face="Arial"><b>4.0L Firing Order</b></font></td>
          </tr>
          <tr>
            <td width="100%">
              <p align="center"><img border="0" src="diagrams/FiringOrder6a.gif" width="164" height="174"></td>
          </tr>
          <tr>
            <td width="100%">
              <p align="center"><font class="Helvetica13" size="3" face="Arial">4.0L
              Engines Firing Order: 1-4-2-5-3-6 DIS Ignition System</font></td>
          </tr>
        </table>
      </div>
      <p align="left" style="margin-left: 10; margin-right: 10"><b><font face="Arial" size="4" color="#800000">Known
      Problems:</font></b></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><font face="Arial" size="3"><b>Missing
      or Bogging</b> -  There are several things that could be causing
      this.  First off your MAF may be dirty. Check <b><a href="CleanMAF.html">HERE</a></b>
      on how to clean it. Then there are the obvious - plugs, wires, dirty
      injectors. Tune up items basically.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><font face="Arial" size="3">Also,
      if you get a problem with hesitation, check the wires around the exhaust.
      One of the oxygen sensor wires may have been damaged by the exhaust.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><font face="Arial" size="3"><b>Loose
      Intake Manifold Bolts -</b>  Some 90's 4.0L's have a problem with loose
      intake bolts. Click <b><a href="4_0-loose-intake-bolts.html">HERE</a></b>
      for more details.</font></p>
      <p align="left" style="margin-left: 10; margin-right: 10"><b><font face="Arial" size="4" color="#000000">Performance
      Parts:</font></b></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.moranav6racing.com/category.html?CategoryID=32" target="_blank">Tom
      Morana</a>:</b></font></p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Offers
      stroker kits, camshafts, connecting rods, pistons, cylinder heads</font></p>
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td width="25%"></td>
          <td width="25%" valign="bottom"><img border="0" src="images/40_stroker.jpg" width="300" height="225"></td>
          <td width="25%" valign="bottom"><img border="0" src="images/40_carbintake.jpg" width="300" height="181"></td>
          <td width="25%"></td>
        </tr>
        <tr>
          <td width="25%" align="center"></td>
          <td width="25%" align="center"><font size="3" face="Arial">4.0 Stroker
            Kits</font></td>
          <td width="25%" align="center"><font size="3" face="Arial">4.0 Intake
            Manifold For Carburetor</font></td>
          <td width="25%" align="center"></td>
        </tr>
      </table>
      <p align="left" style="margin-left: 20; margin-right: 10"><b><a href="http://www.knfilters.com/" target="_blank"><font size="3" face="Arial">K&N
      Filters</font></a><font size="3" face="Arial">:</font></b></p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Carries
      products including new air intake systems for some 4.0L Rangers.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><b><a href="http://www.camcraftcams.com/" target="_blank"><font size="3" face="Arial">Camcraft</font></a><font size="3" face="Arial">:</font></b></p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Offers
      a new camshaft for the 4.0L.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><b><a href="http://www.kustomz.com/" target="_blank"><font size="3" face="Arial">Kurtz
      Kustomz</font></a><font size="3" face="Arial">:</font></b></p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Sells
      a True-Rev Sport Induction Kit.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.supersixmotorsports.com/" target="_blank">Super
      Six Motorsports:</a></b></font></p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Offers
      heads and intakes for the 4.0L engines.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><a HREF="http://www.compcams.com" TARGET="_parent"><b><font class="TimesRoman16" size="3" face="Arial">Competition Cams</font></b></a><b><font class="TimesRoman16" size="3" face="Arial">:</font></b></p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font class="TimesRoman16" size="3" face="Arial">Offers camshaft# 49-410-8 as an OEM replacement good for towing and all around performance.
      Camshaft# 49-422-8 is a more aggressive cam for 4.0's with other modifications. It is designed to improve midrange power and torque.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><b><a target="_blank" href="http://www.boosthead.com/home.php"><font class="TimesRoman16" size="3" face="Arial">Thomas
        Knight</font></a><font class="TimesRoman16" size="3" face="Arial">:</font></b> </p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font class="TimesRoman16" size="3" face="Arial">Offers
      a kit to install an Eaton supercharger on the 4.0L Ranger.</font></p>
      <p align="left" style="margin-left: 20; margin-right: 10"><font class="TimesRoman16" size="3" face="Arial"><b><a target="_blank" href="http://stores.ebay.com/Banshee-Supercharger-Inc">eBay
      Supercharger Kit</a>:</b></font></p>
      <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial"><font class="TimesRoman16">We
      found this kit on eBay to mount an Eaton supercharger on a newer SOHC 4.0
      Ranger. </font><font class="TimesRoman16">The kit does not include the
      supercharger.  </font>The supercharger required is the 3rd generation
      m90, from the 1989 thru 1993 Ford T-Bird Supercoupe. (the inlet is oval).
      The manifold is all (aluminum), each port uses 2"OD aluminum 90
      degree ells. There are 3-1/8" threaded pipe plugs in the manifold for
      sensor,  water or alcohol injection, etc. The manifold will handle
      the weight of the M90 (without) additional support. This kit includes all
      component parts to install an Eaton M90, 3rd generation Supercharger on a
      2002 Ford Ranger 4.0 SOHC.</font></p>
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td width="16%" align="center"></td>
          <td width="33%" valign="bottom" align="center">
            <p align="center"><img border="0" src="images/40_superchargerkit1.jpg" width="351" height="254"></td>
          <td width="34%" valign="bottom" align="center"><img border="0" src="images/40_superchargerkit2.jpg" width="386" height="244"></td>
          <td width="17%" align="center"></td>
        </tr>
        <tr>
          <td width="16%" align="center"></td>
          <td width="33%" valign="bottom" align="center"><img border="0" src="images/40_superchargerkit3.jpg" width="259" height="258"></td>
          <td width="34%" valign="bottom" align="center"><img border="0" src="images/40_superchargerkit4.jpg" width="335" height="222"></td>
          <td width="17%" align="center"></td>
        </tr>
        <tr>
          <td width="16%"></td>
          <td width="33%"></td>
          <td width="34%"></td>
          <td width="17%"></td>
        </tr>
        <tr>
          <td width="16%"></td>
          <td width="33%"></td>
          <td width="34%"></td>
          <td width="17%"></td>
        </tr>
      </table>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 20"><b><a href="http://www.explorerexpress.com/ranger-9807-superchargers-c-1_27.html" target="_blank"><font size="3" face="Arial">Explorer
        Express</font></a><font size="3" face="Arial">:</font></b></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 20"><font size="3" face="Arial">Offers
        the X-Charger for the 4.0 SOHC Ranger.</font></div>
      <div align="center">
        <p align="center" style="margin-left: 5; margin-right: 5"><font size="3" face="Arial"><img border="0" src="images/40_xcharger.jpg" width="400" height="300"></font></div>
      <div align="center">
        <p align="center" style="margin-left: 5; margin-right: 5"><font size="3" face="Arial">Explorer
        Express X-Charger</font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Explorer
        Express also offers headers, spark plug wires, throttle bodies, and
        intake tube for the 4.0L OHV Ranger.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial"><b>Vortec</b>
        and <b> Paxton</b> had produced superchargers for the 4.0L engine but we can no
        longer find them listed.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.bbkperformance.com/" target="_blank">BBK
        Performance</a>:</b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">BBK
        offers 66mm throttle bodies for the 4.0L OHV Ranger.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.airaid.com/home.asp" target="_blank">Airaid:</a></b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Offers
        a throttle body spacer that's said to increase low end performance and
        horsepower.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.pacesetterexhaust.com/headers_truck.php" target="_blank">Pacesetter:</a></b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Pacesetter
        offers headers for the 4.0L OHV Ranger.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.jbaheaders.com/feature_pages/04rangernew.asp" target="_blank">JBA:</a></b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">JBA
        offers headers and ignition wires for the 4.0L Ranger.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.hedman.com/" target="_blank">Hedman
        Hedders:</a></b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Offers
        headers for the 4.0L engines.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.gibsonperformance.com/" target="_blank">Gibson</a></b>
        and <b><a href="http://www.dynomax.com/" target="_blank">Dynomax:</a></b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Both
        offer cat-back exhaust systems for the Ranger.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b><a href="http://www.holley.com/index.asp?division=NOS" target="_blank">Nitrous
        Oxide Systems (NOS):</a></b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font size="3" face="Arial">Nitrous
        Oxide Systems (NOS) showed the world how to effectively harness the
        power of nitrous oxide for automotive use in the 1970's. Since then, NOS
        has powered more racers than any other brand of nitrous. When you're
        looking to go fast, rely on NOS to deliver the most power per dollar
        available. From stock engines to race vehicles, jet skis to trucks, NOS
        has a kit for you.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 10; margin-right: 10"><b><font face="Arial" size="4" color="#000000">Modifications:</font></b></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font size="3" face="Arial"><b>Head
        Porting:</b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font class="Helvetica13" face="Arial" size="3">Port
        your upper and lower intake.  The intakes don't line up diameter to
        diameter.  Porting opens this up and allows better flow. 
        Knife edge the intake side of the throttle body to remove the front lip. 
        You can use a Dremel tool to grind, sand and buff this area to obtain a
        smooth airflow in to the engine.  You can also mill down the
        butterfly to blend in to the shaft for a smoother air flow.</font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font class="Helvetica13" face="Arial" size="3">For
        details on how to port your heads, click <b><a href="http://www.therangerstation.com/tech_library/pdf_documents/head_porting.pdf" target="_blank">HERE</a>.</b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 20; margin-right: 10"><font class="Helvetica13" face="Arial" size="3"><b>Ignition:</b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font class="Helvetica24" face="Arial" size="3">MSD
        - </font><font class="Helvetica13" face="Arial" size="3">Manufactures a
        DIS ignition system along with wiring harnesses.  Find their parts
        at <a href="http://www.summitracing.com" target="_blank"><b>Summit
        Racing</b></a><b>.</b></font></div>
      <div align="center">
        <p align="left" style="margin-left: 30; margin-right: 10"><font class="Helvetica13" face="Arial" size="3">JetChip
        - Makes a module to reprogram the engines computer. Click <b><a href="http://www.jetchip.com/" target="_blank">HERE</a>.</b></font></div>
      <div align="left">
        <p style="margin-left: 10; margin-right: 10"><b><font face="Arial" size="4" color="#000000">4.0
          Computer Numbers Submitted by:</font></b>  <font face="Arial" size="4" color="#000000">  <b>skineral</b></font></div><div align="left">
        <p style="margin-left: 30; margin-right: 10"><font face="Arial"><font size="3">1991
          Explorer 4.0 Manual Transmission 4x4</font></font></div><div align="left">
        <p style="margin-left: 50; margin-right: 10"><font face="Arial" size="3">Calf   3006  (F07F-12A650-YA) & (F07F-VAMR)<br>
          Fed   3007  (F07F-12A650-VA) & (F07F-VAMR)</font></div><div align="left">
        <p style="margin-left: 30; margin-right: 10"><font face="Arial" size="3">1992 Explorer 4.0 Manual
        Transmission 4x4</font></div><div align="left">
        <p style="margin-left: 50; margin-right: 10"><font face="Arial" size="3">Calf  3397 (F27F-12A650-VC) & (F27F-12A650-VCMR)<br>
          Fed  3398 (F27F-12A650-TC) & (F27F-12A650-TCMR)</font></div><div align="left">
        <p style="margin-left: 30; margin-right: 10"><font face="Arial" size="3">1993
        Explorer 4.0 Manual Transmission 4x4</font></div><div align="left">
        <p style="margin-left: 50; margin-right: 10"><font face="Arial" size="3">Calf  3729 ( F37F-12A650-XB) & (F37F12A650-CRA)<br>
          Fed  3726 (F37F-12A650-UC) & (F37F-12A650-YR) & (YMBR)</font></div><div align="left">
        <p style="margin-left: 30; margin-right: 10"><font face="Arial" size="3">1990 Ranger 4.0
        Manual Transmission 4x4</font></div><div align="left">
        <p style="margin-left: 50; margin-right: 10"><font face="Arial" size="3">
          Calf  3064 (F07F-12A650-P1A)<br>
          Fed  3065 (F07F-12A650-M1A)</font></div><div align="left">
        <p style="margin-left: 30; margin-right: 10"><font face="Arial" size="3">1991 Ranger 4.0
        Manual Transmission 4x4</font></div><div align="left">
        <p style="margin-left: 50; margin-right: 10"><font face="Arial" size="3">
          3065  ( F07F-M1A)<br>
          3256  (F17F-ADA)</font></div><div align="left">
        <p style="margin-left: 30; margin-right: 10"><font face="Arial" size="3">1992
        Ranger 4.0 Manual Transmission 4x4</font></div><div align="left">
        <p style="margin-left: 50; margin-right: 10"><font face="Arial" size="3">3433</font></div><div align="left">
        <p style="margin-left: 30; margin-right: 10"><font face="Arial" size="3">1993
        Ranger 4.0 Manual Transmission 4x4</font></div><div align="left">
        <p style="margin-left: 50; margin-right: 10"><font face="Arial" size="3">
          3723  (F37F-LA)</font><font face="Arial" size="2"><br>
           </font></div>
      <p style="margin-left: 10; margin-right: 10"><b><font face="Arial" color="#000000" size="4">Cylinder
      Head Diagrams:</font></b></p>
      <p align="center"><img border="0" src="diagrams/40_headinstall.gif" width="770" height="535"></p>
      <p align="center"><font size="3" face="Arial"><b>4.0 OHV Cylinder Head
      Install</b></font></p>
      <p align="center"><img border="0" src="diagrams/40_cylinderheadtorque.gif" width="362" height="234"></p>
      <p align="center"> </p>
      <p align="center"> </p>
      <p align="center"> &nbsp

';
echo $footer;


I am sure there may be a better way to do this, but this way there is only one simple file that has the header and footer in it, plus you can add other variables in there and then display them in the content as well.

The HEREDOC PHP String has to be formatted in a certain way, so take a quick read over that link if you need some with that.
 
Last edited:
So, wait. I'm slow. The first set of code would be a file called constant.php.

Would I add the second set of code to my current html pages and save them as a php? Where does it go in the page??

How would I implement this in my current pages using this one as an example:

http://www.therangerstation.com/tech_library/4_0_Page.html
 
I edited my code posts above.

I would also suggest trying to pull all the styling out of the HTML and making a separate CSS file. I will help a bunch with bandwidth and overall code readability and maintainability.
 
Any suggestion on how to implement css? I know how to edit css with programs like Wordpress, but I don't know how to convert an html page and add it.
 
i have no idea what you're talking about, but good luck
 
How About this, I will try to go through that whole page you linked me to and I will try to clean it up, and validate the code as HTML5 and CSS2.1, and hopefully get back to you tomorrow afternoon?
 
Sounds good. Thanks.
 
I don't want to be writing to a database.

Reason why I asked is because you'll still have 600 static html pages. A little bit of pain now can save a lot of pain later on, DB will only have the page content, completely independent of layout structure. Literally 1 php file would display all 600, and it would be clean to boot.

But going the replace route, I would build a php script to load each of the html files, write a series of pattern matches to determine what's the header and footer in the file (I wouldn't expect them to be all consistent seeing how they are edited individually), and replace the text with an include. You'd either need to save as a php file so that the web server processes the include code, or in .htaccess you'd need to set html files to go through the php interrupter for the directory the articles are in. Either way, you can tar the html files as a back up in case something goes wrong.
 
Can I just suggest moving the majority of the site to a CMS like Concrete5? It will give you much better markup (cleaner and faster code) and make your life easier with in site editing, plus you could give server staff access to editing pages like the tech library, so you wouldn't hold the burden to do it all yourself.


Another option for the tech library would be setting up a "wiki" to have even greater freedom as to who and what can get added to the tech library.

If you want play with concrete5 I can will gladly host a fresh install for you to mess with, I personally really like it.
 

Sponsored Ad


Sponsored Ad

TRS Events

Member & Vendor Upgrades

For a small yearly donation, you can support this forum and receive a 'Supporting Member' banner, or become a 'Supporting Vendor' and promote your products here. Click the banner to find out how.

Recently Featured

Want to see your truck here? Share your photos and details in the forum.

Ranger Adventure Video

TRS Merchandise

Follow TRS On Instagram

TRS Sponsors


Sponsored Ad


Sponsored Ad


Amazon Deals

Sponsored Ad

Back
Top