Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
There must be a better way, please help
Old 10-01-2006, 10:59 AM There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Ok, I have a main page and then other pages which are the exact same code except for one little difference in the php code for the main content. Because what I have is a main page and then people can select what category they want and then that page only diplays that category. So each category has its own page that is exactly the same as the main page.

The problem lies when I change the main page. I then have to make the same exact changes to all of the category pages. This is a real pain. Is there any easier way to do this?

Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by lunchbox170; 10-01-2006 at 11:02 AM..
lunchbox170 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-01-2006, 11:05 AM Re: There must be a better way, please help
Defies a Status

Posts: 1,606
Trades: 0
Are you using the include function or is each page complete.

Better yet post a url.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 10-01-2006, 11:57 AM Re: There must be a better way, please help
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
example of how to use includes:

PHP Code:
<?php include(header.php);?>

<?php /* minor code change per page you were talking about*/ ?>

<?php include(footer.php);?>
The header and footer would then all be exactly the same. and it's only one file to change.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 10-01-2006, 12:54 PM Re: There must be a better way, please help
Silent77's Avatar
Ultra Talker

Posts: 269
Name: Silent
Location: Ohio
Trades: 0
the include method is a very good idea, but if that doesn't work post the url like colbyt said.
__________________
Firefox
rediscover the web

Please login or register to view this content. Registration is FREE
Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
Old 10-01-2006, 10:32 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Whoops, I must have forgot to post the url.

here it is: http://www.thelnews.com

that is the main page

then here is one of the category pages.

http://www.thelnews.com/category/hardware.php

If you look there is almost no difference

the only difference is this:

Code:
<?php
$number = 4
category ="2"  the number of the category changes thats it
lsdjkffasdfjpsd  then i forget what is here but you get the idea

?>
So you see it is a mega pain if I make a littel change to the main page I have to make the same change for all of these pages.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-01-2006, 10:56 PM Re: There must be a better way, please help
Silent77's Avatar
Ultra Talker

Posts: 269
Name: Silent
Location: Ohio
Trades: 0
I would recommend doing what AliKat suggested.
__________________
Firefox
rediscover the web

Please login or register to view this content. Registration is FREE
Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
Old 10-02-2006, 04:30 AM Re: There must be a better way, please help
Kirtan's Avatar
Who Am I?

Posts: 376
Name: Venkat Raj
Location: Salem, South India
Trades: 3
Use Templates. It is that much simple
__________________
All the Buddhas of all the ages have been telling you a very simple fact: Be -- don't try to become.
Kirtan is offline
Reply With Quote
View Public Profile Visit Kirtan's homepage!
 
Old 10-02-2006, 04:52 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
I like alikat suggested, but could you explain that in a little more detail.

Do I just have a include for all of the elements?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-03-2006, 08:16 PM Re: There must be a better way, please help
kIDJOE's Avatar
Extreme Talker

Posts: 186
Location: Hollywood, CA
Trades: 0
Ti change a single variable man you can send it as a query string for each link

<a href="Page?VARIABLE=Different">Link 1 </a>
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

kIDJOE is offline
Reply With Quote
View Public Profile Visit kIDJOE's homepage!
 
Old 10-03-2006, 09:22 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
I have no clue what you are talking about...
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-04-2006, 01:30 PM Re: There must be a better way, please help
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
if this is the code that changes:

PHP Code:
<?php
$number 
4
category 
="2"  the number of the category changes thats it
lsdjkffasdfjpsd  then i forget what is here but you get the idea

?>
Then it would look like:

PHP Code:
<?php 
include(header.php);


$number 4
category 
="2"  the number of the category changes thats it
lsdjkffasdfjpsd  then i forget what is here but you get the idea

include(footer.php);
?>
Where header.php contains all the information ABOVE the changing content and footer.php contains the information BELOW the changing content.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 10-04-2006, 03:44 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
But header and footer don't exsist, and how would it know to get the HTML code. These are seperate files.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-06-2006, 12:45 PM Re: There must be a better way, please help
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
dude, you have MAKE header and footer...

post your entire page of code for both a normal page and a category page... and I'll show you. or someone else will.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 10-06-2006, 03:41 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Ok, sorry I have never done this before, I am a little confussed. Here is my entire code for the HOME Page

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<script language="JavaScript1.2" type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-->
</script>

<title>The "L"</title>

<META NAME="description" CONTENT="Technology News">

 <META NAME="keywords" CONTENT="weblog, blog, video games, games, reviews, downloads, quotes, news, computers, technology, links, forum, lunchbox, current events, game reviews, programs, posts, funstuff, contests, music, movies, TV, google, google news, apple, articles, guides, tutorials, security, podcast, software, ">
  

  <style type="text/css">

/*---------------------------------------------
          The "L"
Designer:     Benjamin H.
Date Started: June 23, 2005
-----------------------------------------------*/

body {
  background:#575757;
  margin-top:-23px;
  padding:40px 20px;
  font:x-small Georgia,Serif;
  text-align:center;
  color:#333;
  font-size/* */:/**/small;
  font-size: /**/small;
  }
a:link {
  color:#58a;
  text-decoration:none;
  }
a:visited {
  color:#969;
  text-decoration:none;
  }
a:hover {
  color:#c60;
  text-decoration:underline;
  }
a img {
  border-width:0;
  }

/* Content
----------------------------------------------- */
#left_sidebar {
   width:200px;
  float:left;
  margin:15px 10px 0 0;
  font-size:97%;
  line-height:1.5em;
  border: none;
  padding:2px;
  }
  
#content {
  width:950px;
  margin:0 auto;
  padding:0;
  text-align:left;
  margin-top:-15px;
  }
#main {
  width:500px;
  float:left;
  }
#sidebar {
  width:200px;
  float:right;
  margin:15px 10px 0 0;
  font-size:97%;
  line-height:1.5em;
  border: none;
  padding:2px;
  }


/* Footer
----------------------------------------------- */
#footer {
  width:850px;
  clear:both;
  margin:0 auto;
  align:center;
   }
#footer hr {
  display:none;
  }
#footer p {
  margin:0;
  padding-top:15px;
  font:78%/1.6em "Trebuchet MS",Trebuchet,Verdana,Sans-serif;
  text-transform:uppercase;
  letter-spacing:.1em;
  }


/*Float Post Images*/
img.right
{
    float:right;
    padding:5px;
}

img.left
{
    float:left;
    padding:5px;
}

</style>

<!--External Global Style Sheets-->
<link rel="stylesheet" type="text/css" href="/backgrounds.css">
<link rel="stylesheet" type="text/css" href="/linkcolors.css">


</head>

<body>

<!--Logo-->
<div align="center">
<img src="/images_main/png/thelbannernew9.png">
</div>
<!--End Logo-->

<!--Navigation-->
<div align="center">
<div id="main_nav_bg">
<div style="position:relative; top:22px; font-size:x-large; color:#EEEEEE;">   <!--Controls position of links-->
<p>
<a href="/index.php" class="nav">Home</a> | <a href="/apple.php" class="nav">Apple</a> | <a href="http://www.thelpodcast.com" class="nav">The "L" Cast</a> | <a href="/aboutus.html" class="nav">About us</a> | <a href="/contactus.html" class="nav">Contact us</a>
</p>
</div>
</div>
</div>
<!--End Navigation-->


<!--Easter Egg-->
<a href="http://img134.imageshack.us/img134/1504/goodeggsig5fo.jpg"><img src="/images_main/png/easteregg.png"></a>

<!-- Begin #content -->
<div id="content">

<!-- Begin Left Sidebar -->
<div id="left_sidebar"><div id="left_sidebar2">

<!--Category Links-->
<div id="category">
<div id="box_links">
<a href="/index.php" class="box">All</a>
<a href="/category/hardware.php" class="box">Hardware</a>
<a href="/category/industrynews.php" class="box">Industry News</a>
<a href="/category/security.php" class="box">Security</a>
<a href="/category/software.php" class="box">Software</a>
<a href="/category/programming.php" class="box">Programming</a>
<a href="/category/sitenews.php" class="box">Site news</a>
</div>
</div>
<!--End Category Links-->
<br>

<!--Tech News-->
<div id="background_rss">
<div id="ontop_text">

<script type="text/javascript" src="http://app.feeddigest.com/digest3/P8QI8ZGTXO.js"><noscript><a href="http://app.feeddigest.com/digest3/P8QI8ZGTXO.html">Click for &quot;Tech News&quot;.</a> By <a href="http://www.feeddigest.com/">Feed Digest</a></noscript></script>
</div></div>
<!--End Tech news-->

<br>

<!--Links-->
<div id="background_links">
<div id="ontop_text" style="margin-left:10px;">

<a href="http://www.digg.com">Digg</a><br>
<a href="http://news.google.com/news?sourceid=navclient-ff&rls=GGGL,GGGL:2006-14,GGGL:en&topic=t">Google News -Tech</a><br>
<a href="http://www.tomorrowstrends.com/">Tomorrow's Trends</a><br>
<a href="http://prattmic.homedns.org/blog/">Open Journalism</a><br>
<a href="http://amcptwo.blogspot.com/">AMCP Tech Blog</a><br>
</div></div>

<!--End Left Sidebar-->
</div></div>

<!-- Begin #main -->
<div id="main">
<div id="main_position">
<img src="/images_main/pod/top.png">
<div id="pod">

<div id="pod_content">
<br>
<!--Begin Main content-->
<?PHP
$number=4;
$category = "1,2,3,4,5,7,8,9";
include("/homepages/35/d174315280/htdocs/cutenews/show_news.php");
?>
<br>
<div align="center">
<a title="RSS Feed" href="http://www.thelnews.com/cutenews/rss.php?number=5"><img src="http://www.thelnews.com/cutenews/skins/images/rss_icon.gif" border=0  /></a>
</div>
<!--END Main Content-->

<br><br>
<!--Archive Button-->
<div id="archive_button">
<table border="0" cellpadding="0" cellspacing="0" width="495">
<!-- fwtable fwsrc="/images_main/archivebutton/archivesbutton.png" fwbase="/images_main/archivebutton/archivesbutton.jpg" fwstyle="Dreamweaver" fwdocid = "404064007" fwnested="0" -->
  
<tr>
   <td><img name="archivesbutton_r1_c1" src="/images_main/archivebutton/archivesbutton_r1_c1.jpg" width="188" height="51" border="0" id="archivesbutton_r1_c1" alt="" /></td>
   <td><a href="/archive/archives.php" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('archivesbutton_r1_c2','','/images_main/archivebutton/archivesbutton_r1_c2_f2.jpg',1);"><img name="archivesbutton_r1_c2" src="/images_main/archivebutton/archivesbutton_r1_c2.jpg" width="141" height="51" border="0" id="archivesbutton_r1_c2" alt="See all of The "L" Posts" /></a></td>
   <td><img name="archivesbutton_r1_c3" src="/images_main/archivebutton/archivesbutton_r1_c3.jpg" width="166" height="51" border="0" id="archivesbutton_r1_c3" alt="" /></td>
   <td><img src="/images_main/archivebutton/spacer.gif" width="1" height="51" border="0" alt="" /></td>
  </tr>
</table>
</div>
<!--END BUTTON-->

</div> <!--ENDS pod containter div-->

</div>  <!--ENDS POD-->
<img src="/images_main/pod/bottom.png" style="position: relative; left: 1px; bottom: 3px;">


</div></div></div>    <!--ENDS main and main_position-->
<!-- End #main -->

<!-- Begin #sidebar -->
<div id="sidebar"><div id="sidebar2">

<div align="center">
<div id="blank_content">
<h4>What should go here?</h4>

<p>
Y<br><br>O<br><br>U<br><br><br>D<br><br>E<br><br>C<br><br>I<br><br>D<br><br>E
</p>
<br>
<a href="mailto:webmaster@thelnews.com" style="font-size:large; color:#EEEEEE;">Make a suggestion</a>

</div>
</div>


<br>

<!--The L Cast Button-->
<a href="http://www.thelpodcast.com"><img src="/images_main/buttons/thelcastbutton2.png"></a>

</div></div>
<!--End right sidebar-->

</div>
<!-- End #content -->


<!-- Begin #footer -->
<!--Foot can go here id= footer-->
<!-- End #footer -->

<!--Google Analytics-->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-310740-2";
urchinTracker();
</script>
<!--End Google Analytics-->
</body>
</html>
Here is one of the category pages

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<script language="JavaScript1.2" type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-->
</script>

<title>The "L"</title>

<META NAME="description" CONTENT="Technology News">

 <META NAME="keywords" CONTENT="weblog, blog, video games, games, reviews, downloads, quotes, news, computers, technology, links, forum, lunchbox, current events, game reviews, programs, posts, funstuff, contests, music, movies, TV, google, google news, apple, articles, guides, tutorials, security, podcast, software, ">
  

  <style type="text/css">

/*---------------------------------------------
          The "L"
Designer:     Benjamin H.
Date Started: June 23, 2005
-----------------------------------------------*/

body {
  background:#575757;
  margin-top:-23px;
  padding:40px 20px;
  font:x-small Georgia,Serif;
  text-align:center;
  color:#333;
  font-size/* */:/**/small;
  font-size: /**/small;
  }
a:link {
  color:#58a;
  text-decoration:none;
  }
a:visited {
  color:#969;
  text-decoration:none;
  }
a:hover {
  color:#c60;
  text-decoration:underline;
  }
a img {
  border-width:0;
  }

/* Content
----------------------------------------------- */
#left_sidebar {
   width:200px;
  float:left;
  margin:15px 10px 0 0;
  font-size:97%;
  line-height:1.5em;
  border: none;
  padding:2px;
  }
  
#content {
  width:950px;
  margin:0 auto;
  padding:0;
  text-align:left;
  margin-top:-15px;
  }
#main {
  width:500px;
  float:left;
  }
#sidebar {
  width:200px;
  float:right;
  margin:15px 10px 0 0;
  font-size:97%;
  line-height:1.5em;
  border: none;
  padding:2px;
  }


/* Footer
----------------------------------------------- */
#footer {
  width:850px;
  clear:both;
  margin:0 auto;
  align:center;
   }
#footer hr {
  display:none;
  }
#footer p {
  margin:0;
  padding-top:15px;
  font:78%/1.6em "Trebuchet MS",Trebuchet,Verdana,Sans-serif;
  text-transform:uppercase;
  letter-spacing:.1em;
  }


/*Float Post Images*/
img.right
{
    float:right;
    padding:5px;
}

img.left
{
    float:left;
    padding:5px;
}

</style>

<!--External Global Style Sheets-->
<link rel="stylesheet" type="text/css" href="/backgrounds.css">
<link rel="stylesheet" type="text/css" href="/linkcolors.css">


</head>

<body>

<!--Logo-->
<div align="center">
<img src="/images_main/png/thelbannernew8.png">
</div>
<!--End Logo-->

<!--Navigation-->
<div align="center">
<div id="main_nav_bg">
<div style="position:relative; top:22px; font-size:x-large; color:#EEEEEE;">   <!--Controls position of links-->
<p>
<a href="/index.php" class="nav">Home</a> | <a href="/apple/apple.html" class="nav">Apple</a> | <a href="/google/google.html" class="nav">Google</a> | <a href="/security/security.html" class="nav">Security</a> | <a href="/articles/articles.html" class="nav">Articles</a> | <a href="/aboutus.html" class="nav">About us</a> | <a href="/contactus.html" class="nav">Contact us</a>
</p>
</div>
</div>
</div>
<!--End Navigation-->


<!--Easter Egg-->
<a href="http://img134.imageshack.us/img134/1504/goodeggsig5fo.jpg"><img src="/images_main/png/easteregg.png"></a>

<!-- Begin #content -->
<div id="content">

<!-- Begin Left Sidebar -->
<div id="left_sidebar"><div id="left_sidebar2">

<!--Category Links-->
<div id="category">
<div id="box_links">
<a href="/index.php" class="box">All</a>
<a href="/category/hardware.php" class="box">Hardware</a>
<a href="/category/industrynews.php" class="box">Industry News</a>
<a href="/category/security.php" class="box">Security</a>
<a href="/category/software.php" class="box">Software</a>
<a href="/category/programming.php" class="box">Programming</a>
<a href="/category/sitenews.php" class="box">Site news</a>
</div>
</div>
<!--End Category Links-->
<br>

<!--Tech News-->
<div id="background_rss">
<div id="ontop_text">

<script type="text/javascript" src="http://app.feeddigest.com/digest3/P8QI8ZGTXO.js"><noscript><a href="http://app.feeddigest.com/digest3/P8QI8ZGTXO.html">Click for &quot;Tech News&quot;.</a> By <a href="http://www.feeddigest.com/">Feed Digest</a></noscript></script>
</div></div>
<!--End Tech news-->

<br>

<!--Links-->
<div id="background_links">
<div id="ontop_text" style="margin-left:10px;">

<a href="http://www.digg.com">Digg</a><br>
<a href="http://news.google.com/news?sourceid=navclient-ff&rls=GGGL,GGGL:2006-14,GGGL:en&topic=t">Google News -Tech</a><br>
<a href="http://www.tomorrowstrends.com/">Tomorrow's Trends</a><br>
<a href="http://prattmic.homedns.org/blog/">Open Journalism</a><br>
<a href="http://amcptwo.blogspot.com/">AMCP Tech Blog</a><br>
</div></div>

<!--End Left Sidebar-->
</div></div>

<!-- Begin #main -->
<div id="main">
<div id="main_position">
<img src="/images_main/pod/top.png">
<div id="pod">

<div id="pod_content">
<br>

<!--Begin Main content--> <!--HARDWARE CATEGORY-->
<?PHP
$category = "8";
include("/homepages/35/d174315280/htdocs/cutenews/show_news.php");
?>

<br>
<div align="center">
<a title="RSS Feed" href="http://www.thelnews.com/cutenews/rss.php?number=5"><img src="http://www.thelnews.com/cutenews/skins/images/rss_icon.gif" border=0  /></a>
</div>
<!--END Main Content-->

<br><br>
<!--Archive Button-->
<div id="archive_button">
<table border="0" cellpadding="0" cellspacing="0" width="495">
<!-- fwtable fwsrc="/images_main/archivebutton/archivesbutton.png" fwbase="/images_main/archivebutton/archivesbutton.jpg" fwstyle="Dreamweaver" fwdocid = "404064007" fwnested="0" -->
  <tr>
   <td><img src="/images_main/archivebutton/spacer.gif" width="188" height="1" border="0" alt="" /></td>
   <td><img src="/images_main/archivebutton/spacer.gif" width="141" height="1" border="0" alt="" /></td>
   <td><img src="/images_main/archivebutton/spacer.gif" width="166" height="1" border="0" alt="" /></td>
   <td><img src="/images_main/archivebutton/spacer.gif" width="1" height="1" border="0" alt="" /></td>
  </tr>

  <tr>
   <td><img name="archivesbutton_r1_c1" src="/images_main/archivebutton/archivesbutton_r1_c1.jpg" width="188" height="51" border="0" id="archivesbutton_r1_c1" alt="" /></td>
   <td><a href="/archives.php" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('archivesbutton_r1_c2','','/images_main/archivebutton/archivesbutton_r1_c2_f2.jpg',1);"><img name="archivesbutton_r1_c2" src="/images_main/archivebutton/archivesbutton_r1_c2.jpg" width="141" height="51" border="0" id="archivesbutton_r1_c2" alt="See all of The "L" Posts" /></a></td>
   <td><img name="archivesbutton_r1_c3" src="/images_main/archivebutton/archivesbutton_r1_c3.jpg" width="166" height="51" border="0" id="archivesbutton_r1_c3" alt="" /></td>
   <td><img src="/images_main/archivebutton/spacer.gif" width="1" height="51" border="0" alt="" /></td>
  </tr>
</table>
</div>
<!--END BUTTON-->

</div> <!--ENDS pod containter div-->

</div>  <!--ENDS POD-->
<img src="/images_main/pod/bottom.png" style="position: relative; left: 1px; bottom: 3px;">


</div></div></div>    <!--ENDS main and main_position-->
<!-- End #main -->

<!-- Begin #sidebar -->
<div id="sidebar"><div id="sidebar2">


<!--The L Cast Button-->
<a href="http://www.thelpodcast.com"><img src="/images_main/buttons/thelcastbutton2.png"></a>

</div></div>
<!--End right sidebar-->

</div>
<!-- End #content -->


<!-- Begin #footer -->
<!--Foot can go here id= footer-->
<!-- End #footer -->

<!--Google Analytics-->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-310740-2";
urchinTracker();
</script>
<!--End Google Analytics-->
</body>
</html>
You will find that the change between the homepage and the category page is minimal. The change occurs in the main section.

Thanks for help
Ben
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-06-2006, 06:35 PM Re: There must be a better way, please help
Novice Talker

Posts: 7
Name: Musicmaza
Trades: 0
Yes there is a easiest way! When u design your website upto 10 pages or more then you must make your template file ext ".tmp" and start designing your website in this file and save your file as ".htm" or ".html". Simple is that.

Best Regards

Musicmaza
<please create a forum signature>

Last edited by vangogh; 10-08-2006 at 06:05 PM..
musicmaza is offline
Reply With Quote
View Public Profile
 
Old 10-07-2006, 01:12 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
How do you make a template file. Just go with the assumption that I am stupid and don't know anything because you guys are not explaining this very well.

Thanks for the help but please explain better.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-08-2006, 07:00 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Anyone? Please Help
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-09-2006, 09:52 AM Re: There must be a better way, please help
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
Here is header.php

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<
head>

<
script language="JavaScript1.2" type="text/javascript">
<!--
function 
MM_findObj(nd) { //v4.01
  
var p,i,x;  if(!dd=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    
d=parent.frames[n.substring(p+1)].documentn=n.substring(0,p);}
  if(!(
x=d[n])&&d.allx=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(
i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!
&& d.getElementByIdx=d.getElementById(n); return x;
}
function 
MM_swapImage() { //v3.0
  
var i,j=0,x,a=MM_swapImage.argumentsdocument.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((
x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrcx.oSrc=x.srcx.src=a[i+2];}
}
function 
MM_swapImgRestore() { //v3.0
  
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function 
MM_preloadImages() { //v3.0
  
var d=document; if(d.images){ if(!d.MM_pd.MM_p=new Array();
    var 
i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0i<a.lengthi++)
    if (
a[i].indexOf("#")!=0){ d.MM_p[j]=new Imaged.MM_p[j++].src=a[i];}}
}

//-->
</script>

<title>The "L"</title>

<META NAME="description" CONTENT="Technology News">

 <META NAME="keywords" CONTENT="weblog, blog, video games, games, reviews, downloads, quotes, news, computers, technology, links, forum, lunchbox, current events, game reviews, programs, posts, funstuff, contests, music, movies, TV, google, google news, apple, articles, guides, tutorials, security, podcast, software, ">
  

  <style type="text/css">

/*---------------------------------------------
          The "L"
Designer:     Benjamin H.
Date Started: June 23, 2005
-----------------------------------------------*/

body {
  background:#575757;
  margin-top:-23px;
  padding:40px 20px;
  font:x-small Georgia,Serif;
  text-align:center;
  color:#333;
  font-size/* */:/**/small;
  font-size: /**/small;
  }
a:link {
  color:#58a;
  text-decoration:none;
  }
a:visited {
  color:#969;
  text-decoration:none;
  }
a:hover {
  color:#c60;
  text-decoration:underline;
  }
a img {
  border-width:0;
  }

/* Content
----------------------------------------------- */
#left_sidebar {
   width:200px;
  float:left;
  margin:15px 10px 0 0;
  font-size:97%;
  line-height:1.5em;
  border: none;
  padding:2px;
  }
  
#content {
  width:950px;
  margin:0 auto;
  padding:0;
  text-align:left;
  margin-top:-15px;
  }
#main {
  width:500px;
  float:left;
  }
#sidebar {
  width:200px;
  float:right;
  margin:15px 10px 0 0;
  font-size:97%;
  line-height:1.5em;
  border: none;
  padding:2px;
  }


/* Footer
----------------------------------------------- */
#footer {
  width:850px;
  clear:both;
  margin:0 auto;
  align:center;
   }
#footer hr {
  display:none;
  }
#footer p {
  margin:0;
  padding-top:15px;
  font:78%/1.6em "Trebuchet MS",Trebuchet,Verdana,Sans-serif;
  text-transform:uppercase;
  letter-spacing:.1em;
  }


/*Float Post Images*/
img.right
{
    float:right;
    padding:5px;
}

img.left
{
    float:left;
    padding:5px;
}

</style>

<!--External Global Style Sheets-->
<link rel="stylesheet" type="text/css" href="/backgrounds.css">
<link rel="stylesheet" type="text/css" href="/linkcolors.css">


</head>

<body>

<!--Logo-->
<div align="center">
<img src="/images_main/png/thelbannernew9.png">
</div>
<!--End Logo-->

<!--Navigation-->
<div align="center">
<div id="main_nav_bg">
<div style="position:relative; top:22px; font-size:x-large; color:#EEEEEE;">   <!--Controls position of links-->
<p>
<a href="/index.php" class="nav">Home</a> | <a href="/apple.php" class="nav">Apple</a> | <a href="http://www.thelpodcast.com" class="nav">The "L" Cast</a> | <a href="/aboutus.html" class="nav">About us</a> | <a href="/contactus.html" class="nav">Contact us</a>
</p>
</div>
</div>
</div>
<!--End Navigation-->


<!--Easter Egg-->
<a href="http://img134.imageshack.us/img134/1504/goodeggsig5fo.jpg"><img src="/images_main/png/easteregg.png"></a>

<!-- Begin #content -->
<div id="content">

<!-- Begin Left Sidebar -->
<div id="left_sidebar"><div id="left_sidebar2">

<!--Category Links-->
<div id="category">
<div id="box_links">
<a href="/index.php" class="box">All</a>
<a href="/category/hardware.php" class="box">Hardware</a>
<a href="/category/industrynews.php" class="box">Industry News</a>
<a href="/category/security.php" class="box">Security</a>
<a href="/category/software.php" class="box">Software</a>
<a href="/category/programming.php" class="box">Programming</a>
<a href="/category/sitenews.php" class="box">Site news</a>
</div>
</div>
<!--End Category Links-->
<br>

<!--Tech News-->
<div id="background_rss">
<div id="ontop_text">

<script type="text/javascript" src="http://app.feeddigest.com/digest3/P8QI8ZGTXO.js"><noscript><a href="http://app.feeddigest.com/digest3/P8QI8ZGTXO.html">Click for &quot;Tech News&quot;.</a> By <a href="http://www.feeddigest.com/">Feed Digest</a></noscript></script>
</div></div>
<!--End Tech news-->

<br>

<!--Links-->
<div id="background_links">
<div id="ontop_text" style="margin-left:10px;">

<a href="http://www.digg.com">Digg</a><br>
<a href="http://news.google.com/news?sourceid=navclient-ff&rls=GGGL,GGGL:2006-14,GGGL:en&topic=t">Google News -Tech</a><br>
<a href="http://www.tomorrowstrends.com/">Tomorrow's Trends</a><br>
<a href="http://prattmic.homedns.org/blog/">Open Journalism</a><br>
<a href="http://amcptwo.blogspot.com/">AMCP Tech Blog</a><br>
</div></div>

<!--End Left Sidebar-->
</div></div>

<!-- Begin #main -->
<div id="main">
<div id="main_position">
<img src="/images_main/pod/top.png">
<div id="pod">

<div id="pod_content">
<br> 
here is footer.php

PHP Code:
<br><br>
<!--
Archive Button-->
<
div id="archive_button">
<
table border="0" cellpadding="0" cellspacing="0" width="495">
<!-- 
fwtable fwsrc="/images_main/archivebutton/archivesbutton.png" fwbase="/images_main/archivebutton/archivesbutton.jpg" fwstyle="Dreamweaver" fwdocid "404064007" fwnested="0" -->
  
<
tr>
   <
td><img name="archivesbutton_r1_c1" src="/images_main/archivebutton/archivesbutton_r1_c1.jpg" width="188" height="51" border="0" id="archivesbutton_r1_c1" alt="" /></td>
   <
td><a href="/archive/archives.php" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('archivesbutton_r1_c2','','/images_main/archivebutton/archivesbutton_r1_c2_f2.jpg',1);"><img name="archivesbutton_r1_c2" src="/images_main/archivebutton/archivesbutton_r1_c2.jpg" width="141" height="51" border="0" id="archivesbutton_r1_c2" alt="See all of The "L" Posts" /></a></td>
   <
td><img name="archivesbutton_r1_c3" src="/images_main/archivebutton/archivesbutton_r1_c3.jpg" width="166" height="51" border="0" id="archivesbutton_r1_c3" alt="" /></td>
   <
td><img src="/images_main/archivebutton/spacer.gif" width="1" height="51" border="0" alt="" /></td>
  </
tr>
</
table>
</
div>
<!--
END BUTTON-->

</
div> <!--ENDS pod containter div-->

</
div>  <!--ENDS POD-->
<
img src="/images_main/pod/bottom.png" style="position: relative; left: 1px; bottom: 3px;">


</
div></div></div>    <!--ENDS main and main_position-->
<!-- 
End #main -->

<!-- Begin #sidebar -->
<div id="sidebar"><div id="sidebar2">

<
div align="center">
<
div id="blank_content">
<
h4>What should go here?</h4>

<
p>
Y<br><br>O<br><br>U<br><br><br>D<br><br>E<br><br>C<br><br>I<br><br>D<br><br>E
</p>
<
br>
<
a href="mailto:webmaster@thelnews.com" style="font-size:large; color:#EEEEEE;">Make a suggestion</a>

</
div>
</
div>


<
br>

<!--
The L Cast Button-->
<
a href="http://www.thelpodcast.com"><img src="/images_main/buttons/thelcastbutton2.png"></a>

</
div></div>
<!--
End right sidebar-->

</
div>
<!-- 
End #content -->


<!-- Begin #footer -->
<!--Foot can go here idfooter-->
<!-- 
End #footer -->

<!--Google Analytics-->
<
script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-310740-2";
urchinTracker();
</script>
<!--End Google Analytics-->
</body>
</html> 
Here is your main page:

PHP Code:
<!--Begin Main content-->
<?PHP
include("header.php");

$number=4;
$category "1,2,3,4,5,7,8,9";
include(
"/homepages/35/d174315280/htdocs/cutenews/show_news.php");
?>
<br>
<div align="center">
<a title="RSS Feed" href="http://www.thelnews.com/cutenews/rss.php?number=5"><img src="http://www.thelnews.com/cutenews/skins/images/rss_icon.gif" border=0  /></a>
</div>
<!--END Main Content-->

<?php include("footer.php"); ?>
Here is your category page:

PHP Code:
<!--Begin Main content--> <!--HARDWARE CATEGORY-->
<?PHP
include("header.php");

$category "8";
include(
"/homepages/35/d174315280/htdocs/cutenews/show_news.php");
?>

<br>
<div align="center">
<a title="RSS Feed" href="http://www.thelnews.com/cutenews/rss.php?number=5"><img src="http://www.thelnews.com/cutenews/skins/images/rss_icon.gif" border=0  /></a>
</div>

<!--END Main Content-->

<?php include("footer.php"); ?>
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 10-09-2006, 04:28 PM Re: There must be a better way, please help
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
well that makes more sense, but for the main page and the category page I still have all of the header and footer code right? Like What code goes where? This is probably so simple and I just am missing somthing.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 10-09-2006, 05:34 PM Re: There must be a better way, please help
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
it's ALL there. you know what an include does you have it in your page already.

if you include header and footer into your main and category pages it will show up. The code is ALL there.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Reply     « Reply to There must be a better way, please help

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61157 seconds with 12 queries