Classicamiga Forum Retro Edition
1 2
Thread: Website advice wanted
Harrison 02:44 1st August 2012
Here is the next example. This is a quick demo site I'm knocked up for you to take a look at to show you how to create your site using a template and php.

It's templated, so all pages load from a single template. It is fully xhtml and css coded. The layout uses purely div tags for page layout/position, with all formatting done in a css file. The different parts of the page that are static across the site are held within the template files directory so editing one element of the page is easy, and doesn't require editing the main index.php file where the whole page structure is stored.

Finally, the actual content for each page is stored in the pages directory, so page content can easily be edited without altering the actual site.

Fairly straight forward, and you will see it doesn't take much code to create. It is very basic with the only error checking being to see if a variable is set in the url for the page to load, and if it doesn't it automatically loads the home page. A lot more can be done in this regard, such as checking to see if a page set in the URL actually exists on the server, so that visitors can't break the site by typing whatever they wish into the url string.

To load the site place the whole contents of the zip file into your server's www and then load the index.php file.

Any questions, just ask.
Attached: example_site.zip (3.2 KB)
[Reply]
Stephen Coates 03:42 1st August 2012
Just had a look through those examples and I'm pleased to say it makes sense .

This will be very useful, and this method will be much better than the current one of basic HTML pages.

I ought to learn some CSS though.
[Reply]
Harrison 09:53 1st August 2012
Glad it was useful. Any questions about website coding just ask. Happy to help.
[Reply]
Stephen Coates 22:19 2nd September 2013
I had a little play with this last year but then never got round to really doing anything.

Harrison, can you recommend any books on PHP or CSS?

I might have a play with content management systems, but ultimately I would like to have something I made myself.
[Reply]
Harrison 23:42 2nd September 2013
I agree that it is a very good idea to get to grips with at least the basics of PHP, CSS and XHTML, as it is really useful, not just in creating your own small sites, but in being able to customise an existing CMS or forum software for your own needs and understand the code being used.

For books on PHP, CSS and XHTML there are loads of them about.

I actually wouldn't recommend any books that try to combine HTML, CSS, PHP and MySQL in one volume because it is too much to squeeze on and cover it all nicely. Instead I would get a decent book covering HTML and CSS, and another covering PHP and MySQL. Learn HTML and CSS first and get to grips with that, then when you move on to the PHP one you will be able to utilise everything you know about HTML and CSS for the visual page layout/presentation/construction as you learn PHP.

For HTML and CSS there is one book I love and always keep on my shelf and refer to quite often. It is called "The Complete Reference to HTML and CSS" by Thomas A. Powell, and the latest 5th edition is updated to cover HTML5. It isn't the cheapest book and it is a large book, but it is brilliant.

http://www.amazon.co.uk/HTML-CSS-Com...dp/0071496297/

The other publisher I really like for anything internet or coding related is the Wrox. Their Beginning guides are brilliant books, but very comprehensive and sometimes quite complicated. And there publish books in 3 levels of experience, starting with their beginner range, then Professional and Expert.

Maybe look at this one for PHP: http://www.amazon.co.uk/Beginning-PH.../dp/B004IPPII2

However if you want to start with something more straight forward first the "Visual Quickstart Guides" or "Sams Teach Yourself "are good books that are easy to follow and have good examples, plus not too expensive.

Maybe try this one as your first book:

http://www.amazon.co.uk/Yourself-Inc.../dp/B0030AF5CA

I also like books published by O'Reilly, but I don't recommend them for learning as they are very technical and complex, and I use them mainly for reference as they have great lookup formatting to find something very quickly.

I hope that helps? I will have a look through my eBooks to see if I have anything I can email you.
[Reply]
Stephen Coates 19:22 3rd September 2013
Thanks for the suggestions.

I'll have a look around and maybe try a Visual Quickstart Guide or a Sams book. Can't say I'd heard of Visual Quickstart Guides before.
[Reply]
Stephen Coates 22:57 14th December 2013
I've been playing around with CSS, and have finally done some updates to my site and given it a new look.

Its not finished yet, but the new look is on the home page, and will be rolled out to the other pages soon.

I chose URW Gothic L as the main font. This is more of a Linux font, so most Windows users probably won't have it. The secondary font is Century Gothic, and if you don't have that, then it just goes to the default sans-serif font. I quite like the look of that font, but I'd be grateful for other people's opinions.

How about the colour scheme, with the blue links, and light green 'hover' background? Again, I quite like it, but I'm open to opinions.

I think it definitely looks a bit neater and more modern now . I'll probably get round to incorporating some PHP some time, but HTML5 will do for now (well, I don't think I stripped out all the HTML4, but I think its mostly HTML5).
[Reply]
zapiy 22:07 6th January 2014
Great advice Harrison.. Coding is a love of mine, hardly at the level of you but i get by lol.
[Reply]
Tags:Array
1 2
Up