Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Stupid question about web design
Stupid question about web design
2008-02-25, 2:44 PM #1
My personal website contains dozens of pages with an identical format. The content goes into the main table, but things such as the background, title image, and copyright/disclaimer at the bottom are the same on every page.

I'd like to have it so that I can change something like the copyright notice just once and have it change on every page, without having to manually change each HTML file, which is my current stone-age method. What exactly is needed in order to do this? I suppose I'm just looking for the name of whatever term this technique is called.

Yes, yes, I know "google is your friend". I'm not asking for anyone to do my work for me or teach me how to do it, I'm just trying to find out what exactly this is called so I can search for the proper thing.
Pyro Universe The ultimate fireworks site!
2008-02-25, 2:46 PM #2
You probably need something like PHP or Perl to do that.
2008-02-25, 2:48 PM #3
That's kind of what I suspected. Thanks!
Pyro Universe The ultimate fireworks site!
2008-02-25, 2:50 PM #4
I've extremely limited web design knowledge, but years ago people used to do this with something called Server Side Includes. It can also be done with PHP. I have no idea what the preferred method is these days.

http://www.boutell.com/newfaq/creating/include.html
2008-02-25, 2:52 PM #5
I really don't know much about webdesign, but you could generate the HTML for each page using a javascript function. It would require you to add one line <script type="text/javascript">drawCopyright();</script> to replace your current code for the copyright section. When you change the code in the function, it will change in all the pages that you visit that use the function. This would be entirely client side.

Like I said, I'm new at web stuffs and this probably isn't the best way.

edit: the best way I can think of but that would probably be too much work for you would be to redesign the site as one html page. Since only the contents section changes at any time, you could generate that part either using javascript/DOM or by using some creative visibility settings (eg, when users click a link write javascript to change a different div box's visibility to show or hide.
2008-02-25, 2:56 PM #6
Frames!
Warhead[97]
2008-02-25, 2:57 PM #7
Server Side Includes are the way that I had done it in the past.

You know, back before i started using FLASH
[01:52] <~Nikumubeki> Because it's MBEGGAR BEGS LIKE A BEGONI.
2008-02-25, 3:11 PM #8
Php includes are an easy way of doing things.
Sneaky sneaks. I'm actually a werewolf. Woof.
2008-02-25, 3:28 PM #9
I'd say it depends on what's available on your host.
2008-02-25, 4:02 PM #10
Your server will probably already be PHP-ready (although you might have to turn it on in the control panel). I use those include once commands a lot.

Just put your information (like the copyright stuff) in a separate file, and then use this command where you want the file to show up.

Quote:
<?include_once("name_of_your_file_here.php");?>
"Harriet, sweet Harriet - hard-hearted harbinger of haggis."
2008-02-25, 6:32 PM #11
Yeah, PHP includes are the most likely to work. Server side includes aren't that well supported.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2008-02-25, 7:56 PM #12
I haven't heard "Server side includes" in probably 4 years..
"Nulla tenaci invia est via"
2008-02-25, 8:10 PM #13
Sadly, the vast majority of Massassi's site uses server side includes >.>
2008-02-26, 4:52 PM #14
Php includes was exactly what I was looking for. Thanks a lot, guys, it works perfectly!
Pyro Universe The ultimate fireworks site!
2008-02-26, 4:55 PM #15
I love you for taking "Try PHP Inclues" and managing to figure it out all by yourself. <3
2008-02-26, 5:20 PM #16
Yes, this was one of the least incompetent requests for help in a very long time.

I wish we had some sort of suitable prize :(
Detty. Professional Expert.
Flickr Twitter
2008-02-26, 5:38 PM #17
Originally posted by Chewbubba:
Just put your information (like the copyright stuff) in a separate file, and then use this command where you want the file to show up.
<?include_once("name_of_your_file_here.php");?>


Originally posted by Vinny:
I love you for taking "Try PHP Inclues" and managing to figure it out all by yourself. <3


FAIL.
"Harriet, sweet Harriet - hard-hearted harbinger of haggis."
2008-02-26, 6:16 PM #18
I'll give him a prize!

Pick a custom title and color of your choice and I'll add it!

↑ Up to the top!