• Hey all, due to some issues with false DMCA takedown requests, we've had to remove and censor a few things until the situation is resolved. Sorry for any inconvenience.
  • Be sure to join the discussion on our discord at: Discord.gg/serebii
  • If you're still waiting for the e-mail, be sure to check your junk/spam e-mail folders

Html

IcySealeo

Well-Known Member
Hey everybody.
I'm building a website by HTML.
I want to ask someone who's know very well HTML:
How Serebii change the next episode in Japan every week in all the pages?
It's a big work... or they have a trick?
 
If you are building a website with a simple text editor, you will need to create a template, then copy and paste that template in every page that uses it. Serebii probably uses an advanced program, like Adobe Dreamweaver, seeing on how rapidly his site changes.

Also, scripting isn't a bad idea either, this is more so my personal site,
http://douglasgoodwin.ath.cx/, in which the Photo Sampler page is written entirely in Python. Without a script, it would be next to impossible to create a page like that
 
I'm guessing they use Server Side Includes to do it. All they need to do is update one page, specify the other pages that have the same change, and it does it automatically. There are ups and downs to using SSI, I honestly wouldn't use it.

The method I would use is PHP includes. It basically involves creating two or more seperate html files (assuming it's: header.html for the banner/header, footer.html for the footer, and nav.html for the navigation). Then, if you wanted to create another page that uses all three, you can use either a PHP include function, or a require function. This method works better, imo, as you can edit the individual files and upload that. http://www.w3schools.com/PHP/DEfaULT.asP

Move onto PHP when you've done learning HTML. Don't worry about server side includes for now.
 
Serebii uses SHTML pages so he would use SSI insead of PHP includes.

To use SSI you just need to give all your pages a .shtml extension, then put this code to include another file:
Code:
<!--#include virtual="/path/to/file.html" -->
Then you just update the included file and it's updated on every page.

PHP is similar, just call your pages something.php and add:
Code:
<?php include 'path/to/file.html'; ?>

This is also useful for having one or two includes with your whole page design in, including header, menu, footer, etc. You can make tweaks to your design across the whole site by changing just a few things.
 
Serebii uses SHTML pages so he would use SSI insead of PHP includes.

To use SSI you just need to give all your pages a .shtml extension, then put this code to include another file:
Code:
<!--#include virtual="/path/to/file.html" -->
Then you just update the included file and it's updated on every page.

PHP is similar, just call your pages something.php and add:
Code:
<?php include 'path/to/file.html'; ?>

This is also useful for having one or two includes with your whole page design in, including header, menu, footer, etc. You can make tweaks to your design across the whole site by changing just a few things.
 
Back
Top