Page 1 of 1

Coding Errors, Ways To Make Code Shorter etc.

Posted: 25 Oct 2005, 17:51
by Devanté
OK, I'll just edit this post later with some results I find.

Anyways, I've created this thread for a two reasons:

1) To make coding smaller to save...small space.
2) To spot errors in coding on the Knightmare site.

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 25 Oct 2005, 18:08
by TheBrollachan
Ah, the good old W3 validator:
http://validator.w3.org/

Just a quick example...
http://validator.w3.org/check?uri=http% ... htmare.com

In terms of coding etc I go by the rule of create for Firefox then adapt to get Internet Explorer to behave itself. As I use Firefox I have the following extension/addon installed, which allows me to check my websites fairly thoroughly...
https://addons.mozilla.org/extensions/m ... g=10&id=60

Edit: Link is now working again this morning, the file/page has reappeared.

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 27 Oct 2005, 13:03
by Illusion
Thanks for raising this, Devanté.

I am aware that there are literally hundreds of coding errors throughout the site. This is mostly because the bulk of the original pages were made using rubbish HTML editors many years ago.

I'd love to re-do the whole site, clean up the coding, re capture images and video at higher quality, but unfortunatly finding the time to do it will be extremely difficult.

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 27 Oct 2005, 19:22
by Devanté
Speaking of which, what software did you use?

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 28 Oct 2005, 18:51
by Illusion
First I used HotMetal Pro, then FrontPage. Now I use 1st Page 2000.

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 28 Oct 2005, 21:29
by Devanté
Ah, OK.

I use Dreamweaver 2004, but I can't be bothered getting 8 because you can do a lot with the current one you have rather than getting a new one...

Also, here is the code for 'The Eye Shield' page which hasn't been shortened but has had some unnecessary spacing removed.

Code: Select all

<html><head><title>The Eye Shield</title></head>
<body background="shieldbak.jpg">

<p align="center"><img src="teslogo.gif" alt="teslogo.gif (4352 bytes)" width="402"
height="124"></p>

<p align="center"><font size="5" face="Roman"><img src="kaclogo2.gif"
alt="kaclogo2.GIF (5275 bytes)" width="199" height="90"></font></p>

<p align="center"><font face="Arial"><strong>Editors:</strong> Paul McIntosh/Jake Collins<br>

<font size="2"><b>Webmaster:</b> Illusion<br>
</font><a href="email.htm">Contact us</a> </p>

<p align="center"><a href="issues.htm"> Issue Contents</a>  : <a
href="bbk.htm">Bring Back Knightmare</a></p>

<p align="center"><b>July 2001: <a href="newissues.htm">New issues</a> of TES now online!</b></p>

<p><font color="#FF0000" face="Arial"><strong>The Eye Shield</strong></font> was a quarterly printed Knightmare fanzine, launched in December 1995. The
magazine was produced by life-long Knightmare fan - <font color="#FF0000"
face="Arial">Paul McIntosh</font><font face="Arial">. He was disappointed to see
Knightmare fade away, and so set up 'The Eye Shield', originally intended to be an
independent 'fanzine', separate from Broadsword Television (who were keen on the idea).</font></p>

<p><font face="Arial">Paul kept in contact with Broadsword Television, and eventually the
fanzine became ' The Official Knightmare Magazine', and they did their part by passing on
all Knightmare mail onto him, and helping out wherever possible.</font></p>

<p><font face="Arial"><em>"But I never heard about 'The Eye Shield!'"</em></font></p>

<p><font face="Arial">It is likely that you did not hear about the magazine. It was going
to be mentioned in the last edition of 'The Quest', but there was a slight hiccup, and it
was missed out. All remaining copies of 'The Quest' were therefore sent out to as many
people as possible with a leaflet advertising the new fanzine. </font>So well done if you were one of the lucky ones!</p>

<p><font face="Arial">TES was packed full with news, competitions, reader letters, games,
puzzles and artwork. Not forgetting exclusive interviews with </font><font
color="#FF0000" face="Arial">David Learner</font><font face="Arial"> (Pickle), </font><font
color="#FF0000" face="Arial">Hugo Myatt</font><font face="Arial"> (Treguard), </font><font
color="#FF0000" face="Arial">Tim Child</font><font face="Arial"> (Creator/Producer) and </font><font
color="#FF0000" face="Arial">Jason Karl</font><font face="Arial"> (Winner, Series
2). TES was also mentioned on the Sci-Fi channel after an repeat episode of
Knightmare in February 1996. A 15-second address card brought in lots of new readers!</font></p>

<p><font face="Arial">Part of The Eye Shield's role was to start a '</font><font
color="#FF0000" face="Arial">Bring Back Knightmare</font><font face="Arial">' campaign.
Indeed many readers wrote in to CITV and other channels demanding Knightmare's return, but
they were not interested. </font></p>

<p><font face="Arial">The magazine's last issue was in December 1997, two years after its
launch. Unfortunately, there were fewer and fewer readers each issue so Paul decided it
was time for a break from producing the magazine, in order to devote his spare time and
resources to get a bigger fan base for the magazine, and in particular - the BBK campaign.
It would then be re-launched.</font></p>

<p> After I set this site up in January 1999, I have managed
to contact Paul and it was agreed that this was the perfect opportunity to re-launch the
magazine and the Bring Back Knightmare Campaign. Paul sent me all the issues,
except Issue 9 which was sent to me by <font color="#FF0000">Jake Collins</font>.
You can now find all the issues on this site.</p>

<p>And thanks to Jake, TES was re-launched in July 2001 and new issues are
now available on the site! However, the BBK campaign has now been taken over by <font color="#FF0000">Alan
Boyd</font>. See <a href="http://www.bringbackknightmare.co.uk" target="_blank">http://www.bringbackknightmare.co.uk</a>
for more details. </p>

<p><font face="Arial">If you have any comments, questions, ideas or contributions
regarding TES, you can e-mail the Editor using the address at the top of this page.</font></p>

<p align="center"><a href="issues.htm"> Issue Contents</a>  : <a
href="bbk.htm">Bring Back Knightmare</a><br>
<a href="../page1.htm"> Knightmare Home</a></p></body></html>
Of course it doesn't have all spacing removed but I'll get to that later.

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 28 Oct 2005, 21:53
by Becxsmagic
Hmmm, I've used Dreamweaver, it's pretty easy to use but I've gotten rid of it now. The code looks good to me so far. I can't really make any suggestions with this though, I'm not smart enough. ;)

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 29 Oct 2005, 08:14
by Devanté
I just quickly typed this out so there will probably be a mistake or two, this is just an estimate of what the HTML for the Eye Shield page is.

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 31 Oct 2005, 10:44
by NeilJones
Illusion wrote: Thanks for raising this, Devanté.

I am aware that there are literally hundreds of coding errors throughout the site. This is mostly because the bulk of the original pages were made using rubbish HTML editors many years ago.

I'd love to re-do the whole site, clean up the coding, re capture images and video at higher quality, but unfortunatly finding the time to do it will be extremely difficult.
You could always do what's known as "content wrapping", your current host supports this.

Uses technology called PHP. At a very simple level, all you do is make one file for the top half of each page (for example, the headers and site links) and one for the bottom of each page (copyright and contact details for example).

Then you just make separate pages for the bits in between and have a little script that sticks them all together and puts them on the screen for the visitors.

Benefits of all this is, saves time in the long run as once you've converted the pages once, no need to do it again as if or when you decide to change the layout/colours/design, just alter the wrappers and everything else will take care of itself.

You could always throw some of the work out to the community as well, I suppose.

Re:Coding Errors, Ways To Make Code Shorter etc.

Posted: 31 Oct 2005, 11:57
by NeilJones
Something like this:

Open a new file in Notepad, save it as index.php and put this in it:

Code: Select all

<?php
include("header.inc");
?>
<h3>This is the main content of your page</h3>
<p>If you right click me and choose View Source, you'll see that I've stuck three bits of HTML together to make a web page!</p>

<?php
include("footer.inc");
?>
Now make another file called header.inc and put this in it:

Code: Select all

<html>
<head>
<title>Test Page Type Thing</title>
</head>
<body>
Finally, make another file called footer.inc and put this in it:

Code: Select all

</body>
</html>
Upload all three files to a folder on the server, ensure that they're all in the same folder together and then go to that page on the server.

That's all there is to it. Can be made as simple or as complicated as you like.