Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 14th, 2001, 03:11 PM
tibbs14 tibbs14 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Posts: 1 tibbs14 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question How to make consistant site?

I want to make a site that is consistant throughout all the pages. By this
I mean I want a uniform top and side where I can have a banner and a navigation
bar. I looked at using templates, but once you make the template and start
using it then if you wanted to make a change to lets say the table size of
your navigation bar then you have to do it for each page.

What I want to be able to do is make a page using tables. Then make all
my page using these tables and the way they are sized and formated. Then
if I want to make a change to lets say a table size of my navigation bar
then I would like to only have to do it in one place and all the pages would
change.

Is there a way to do this? Or is this still a pipe dream?

Reply With Quote
  #2  
Old December 14th, 2001, 03:20 PM
Onslaught's Avatar
Onslaught Onslaught is online now
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,837 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 46 m 56 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
This could be done easily enough, through php and the use of objects.
You could build a simple table object that holds all of your formatting inside of the object. Then have each page use that object to create a table. When you change something in the object definition, it would filter down throughout each page that uses the object.
This is just one way, I am sure there are plenty of others out there, it is just a point of finding them.

Reply With Quote
  #3  
Old December 14th, 2001, 06:51 PM
chausfeld chausfeld is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 187 chausfeld User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 37 m 23 sec
Reputation Power: 7
this can easily be done using include files.

Reply With Quote
  #4  
Old December 14th, 2001, 06:59 PM
Onslaught's Avatar
Onslaught Onslaught is online now
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,837 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 46 m 56 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
How about being a little more descriptive in your help.

Reply With Quote
  #5  
Old December 16th, 2001, 11:24 PM
realnowhereman realnowhereman is offline
Not there when you need me
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 1,438 realnowhereman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 46 sec
Reputation Power: 8
It can be done easily using SSI

Code:
<html>
<!-- the usual <head> stuff -->
<body>
<table> <!-- Add table formatting data, col/row sizes etc. as needed --->
<tr><td colspan="2">
<!--#include file="head.html" -->
</td></tr>
<tr>
<td><!--#include file="side.html" --></td>
<td>
<!-- Everything else -->
</td></tr>
</table>
</body>
</html>


The data inside head.html and side.html will be inserted exactly as it is into the code. The server must have SSI enabled, of course. In most cases, you'll have to rename your files to .shtml .

Have a lot of fun ...

Reply With Quote
  #6  
Old December 17th, 2001, 02:23 AM
Kaleina Kaleina is offline
The Linux-Girl
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Posts: 396 Kaleina User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
and more samples

<table width="100%" border ="0">
<tr><td width="150">
<!--Menu-->
<a href="<? echo $PHP_SELF?page=page1; ?>">Page 1</a>
<a href="<? echo $PHP_SELF?page=page2; ?>">Page 2</a>
<a href="<? echo $PHP_SELF?page=page3; ?>">Page 3</a>
</td>

<td>
<?
if ($page) {
include(basename($page.".php");
} else {
include(basename("homepagetxt.php");
}
?>
</table>

I use basename for security reasons, otherwise anyone could specify $page to be anything and open any file on my url. I use includes in all my sites http://linux-girl.com

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > How to make consistant site?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway