Webmaster - tips
How to make diagrams.
An easy way to make diagrams is to
:
- draw in an MSWord blank document using the Drawing palette
- group all parts using Draw >> Group
- save as html file which converts the drawings to gif, jpg, png or bmp images. A big advantage of gif files is that they permit transparency around text so that the text appears to be written directly onto your web page. Jpeg does not allow this.
Microsoft Photo Editor allows a jpg image to be copied onto a gif image, and fused into one image.
- use Adobe Photoshop to convert to required format, probably the universal patent-free png or jpg
- use Adobe Photoshop to reduce the file to the required size, probably less than 10KB, using:
- Image >> Image-size
width = 600px to fill the PT website window
width = 100-120px for a thumbnail image
- File >> Save for Web >> Image quality
Photoshop gives 4 images showing one for each level of quality, accompanied by file-size and the user's downloading time - brilliant !
Templating
Save yourself heaps of monotonous repetition and frustration from mistakes by templating.
To template every category of file
:
- Script a short document containing all possible formating tags.
- View it in several browsers to see if you like the format in all of them.
- Validate it at http://validator.w3.org/#validate_by_upload.
Validation means to have this official website check whether your scripting conforms to xhtml standards.
This site will usually show you the error of your ways, but sometimes an error is mis-read and that causes good code down the page to be read as errors.
Example: when my first word after <body> was not a tag such as <p>, or <h1>, then my <br /> tags were incorrectly listed as errors.
Correct the mistake, browse the file again and revalidate. This can remove scores of incorrectly read error readings.
- Copy your file into your folder for templates and rename as template_main.htm or temp_links.htm or t_index.htm or similar, to indicate it is a template. If all your templates begin with the same letter, they remain grouped under 't' wherever you move them, and easily found.
- Remove from the file all content, but leave the formating tags, such as <sup class="sup1"></sup>/<sub class="sub1"></sub>
Document
Documenting. This page is part of my documentation. I am now documenting what, why and how I script. Within documents I add comments on why I have chosen certain styles, used margins instead of padding, used inline instead of outside, and so on. It helps to avoid changing script, re-testing and re-learning. It advises the new incoming webmaster that his new visionary ideas that so excite him to scythe thru the website, cutting and trashing the boring tired code of the past, it gently advises him that such visionary changes have already been tried, tested and failed - so dont go there.
A new webmaster is a frightening thing. His unguided and untempered enthusiasm can, inside an hour, wreck years of work, creating months of reconstruction.
This I know from the many times I have re-written this website. Changing one item can necessitate the changing of thousands of files, file-by-file. This brings in mistakes, necessitating re-doing those same thousands of files. And often you learn, after changing thousands of files, that making that one change, necessitates making another. And you have to begin all over again.
This happens even with documentation. It would be far worse if I failed to document.
So do not lose hundreds of hours in otherwise needless repetitive work just because someone is too busy to document. All because someone has not formed the habit of
commenting his work (adding comments or advice). Be disciplined.
Worse than all that time lost, a website undergoing changes can frustrate users into leaving forever.
All this trouble because the webmaster thought that documenting is a waste of time, or that the documenting could or would be done later.
Document everything for the webmasters who will follow you. Producing clear concise documentation is part of your professionalism. Do you do it ?
Document everything for yourself. Looking back thru old script you will wonder why you did something. Not remembering, you might decide to change it, only to find that your old self had found the best solution to a problem, a solution you have by now forgotten. Then you have to undo your changes. Documentation can avoid such time-wasting.
Use your webhost
Your webhost's server has many wonderful facilities. Use them.
Here are some
:
- PHP to reduce your files and your workload. To make your website interactive. Let your users format your webpage on their computers. Let your users send messages, ask for advice and help, and even talk with you.
- Apache, PEAR, Javascript, Java
- MySQL to provide you with a database to hold thousands of files.
- Multiple email addresses with the ability to forward the important ones to your private email address.
- Statistics of traffic, visitors, visitor preferences.
XHTML
There is XHTML and then there is a browser's rendering of XHTML.
The two are
not the same.
Different browsers have different rendering, which prevents your script from looking good on every browser, or even on any browser. Very frustrating. Accept it.
I do not like to admit it, but I prefer the rendering of IE (Internet Explorer) to that of Firefox. But then, IE is created for money, whereas Firefox is created by the generosity of freelance programmers. So, on principal, Firefox is my main browser. Other browsers I use for testing to see how users of IE, Opera, etc, will see my website.
Script validation requires the following
: