Showing posts with label webdesign tips. Show all posts
Showing posts with label webdesign tips. Show all posts

Saturday, 19 September 2015

Working With PHP Include : First Baby Steps For Designers - Making A Low Maintenance Website

Experiment With “Include” PHP


Maintaining a large website such as Satzuma can become time consuming.  Using “include” can take the website to the next stage of modular design. Imagine having to write 1 line of code into a php file instead of having to copy & paste the same piece of code across 70 pages, worse still… imagine that piece of code had a typo – across all 70 pages! You start to get the idea – the horror. Using PHP include can reduce the time consuming method of copy and paste, shorten time, and take your website to that next stage of design (Or look at a CMS system). With this Include method, the information you amend in one file can change across multiple webpages, just to name a couple of ideas you can use this for navigation, footers, banner adverts and much more. I cannot emphasise how much easier this will make your life when working on larger projects. Change once to  update many!



How To Go About It


As a rough example we are going to make a footer module. We also have the main document that will  “include” pull in, integrate, import a file from your website.

This tutorial/experiment will assume you already have prior knowledge of setting your website up with root folders etc, if you need some more help with this please follow these tutorials.


https://helpx.adobe.com/dreamweaver/how-to/first-website-part1.html 

Or PHP



http://php.net/manual/en/tutorial.php


You Will Need: 

 - The main file (The parent/master)
 - An external footer file (why not add some styling to your html?) 
 
 - one line of code, which you will embed into the parent folder. 
 
 - A space to upload/test your experiment. (domain and hosting)


Stage 1 - Parent File

We will treat this file as the master file, the parent which pulls in the external modules to construct the page. Remembering that if you are using this modular method for constructing your website it will make life much more efficient.

Why not call your parent file ‘master.php’ 



This image shows (with straying CSS, bleurgh! ) the master.php and Product-footer-test.html working together... or popping out of the bottom. 

PHP include shwon in image

Stage 2 - Footer File


I have used the footer in the example, as this area of the website has frequent updates with new products and information constantly being change and added, and it is spread across the entire website… As you can see, all styling is added to this queasy example with the accursed table! Any changes or modifications will be included in the master file once you add the “include” piece of code to the master file. So what you change here (the footer file) will be visible once you come to uploading all of the files and testing the file. So... Design and build your footer file and add you styling to it.



Stage 3 - The Simple Piece of Code to Paste Into Your Master PHP file. 

The image below shows in red where the piece of "include" code sits. So, imagine you have made a hollow space on your webpage, in the hollow space you are going to add this code to the bottom. As shown. 





Product-footer-test.html"); ?>


This will call on the footer module and all of its elements.  Once you upload your files you can see whether the footer has worked.

This visual diagram will show how the principle will work leaving aside how the coding works for the PHP include.
Parent, Child, Footer... How PHP include works for designers

Hope this helps, I plan to use this much more in the future.

Happy designing...

Thursday, 17 May 2012

Show Me Inspiration - Where To Find Some!

Need Creative Inspiration



Hello! We have all been there; you have been sat at your computer stuck for hours on end not really producing anything worth showing to anyone. You sit staring at the screen with your mouth hung open gawping at a piece of work that means absolutely nothing... it lacks sustenance, meaning or any real thought, you rely on your computer to have vision!  The birds chirp in the trees, sun sets – sun rises. You think,
“I know, I’ll make hot cuppa!’ you make a brew and still nothing comes, apart from a few rubbish concepts if lucky (You can never pass off a rubbish idea, everybody knows a rubbish idea when they see it.). It’s as if your brain needs an idea injection, that moment of long awaited genius but ... it doesn’t come. I know, it is almost as if I (you) have started the wrong way round; designing first, thinking after, not a great way of going about things but we’ve all done it – and probably still do from time to time!

Get away from the screen
Especially applies for my freelancing time and even working In-house, this 'non-working' working time is when my best thought processes come about, the ideas that come from nowhere or so they seem. Go for a walk in a park, get some fresh air, take some food maybe even take your camera and take some snaps.

Read something - a creative magazine! I recommend a magazine over just going to a blog because you’ll usually get a better quality content (Oh the irony!) and if you are reading a blog, you're still looking at a screen –  in work function unproductive mode. Read books, look at photos, research topics, talk to industry pro’s, take a holiday, take a shower – sleep! OK enough of the fluffy general bit, a list of helpful online resources, which is probably one of the main reasons that you have read this far.

I hope these help - and this http://www.creativeboom.co.uk/ really helpful for all round.

Regards,

Jimbo!

Monday, 5 July 2010

Beginner Freelancer Hints & Tips - Book keeping and Clients (UK)

Hello there, I decided to add a post related to general tips for creative freelancing.
I have been asked questions on a couple of occasions about topics aside from being a creative thinker. I have worked with a couple of clients from all shapes and sizes and I am now going to offer some points from my own experiences. So I hope this helps.. (please excuse my poor spelling)

1) Agreement / Plan - Before you jump into a project make sure to get some form of written agreement to the client declaring what it is they will get for their budget in concise - detailed - bullet points, this will prove to be invaluable to you later on. A written agreement in the early stages lays down a project plan and what the client will get for their money and time. You don't want to surprise the client at last stage with over spending their budget and ignoring their needs.

Agreements will also protect you as the designer from "feature packing", feature packing is when a client would ask you to produce one poster for the same budget and then somewhere in the middle they try to slip a business card design or and extra webpage without wanting to pay for the extra time. Be careful about verbal agreements too, I have agreed to a project with a vague specification from a client only for it to back fire at a later date, make sure to talk it through in some detail first without dropping the final price into the conversation.

Don't : "Hello Jeff could you design a booklet for me" and of course you'd jump at the opportunity and say "yes, great will do for £20". Great, done and dusted....that quick, you'd be lucky. You will find yourself in probable situation whereby the client keeps changing there mind, adding elements to the project and continuous criticism about the the project. You don't wont to hear the words "that's not what we have agreed", because that's what you said on the phone, remember? That's an example of being too quick to take the project and not talking it through. Do : "Could you design a poster for me?" "yes, what size, when, who, colours, time scale, budget in mind"? that is a rough example.

In the event you don't talk it through, you may get these freelance symptoms : Loss of trust from your client, time consumption, delayed payments, loss of future projects, a headache, foul language, muttering under your breathe, morale.
So : Get the written spec if possible> Discuss > Plan Declare > Agree > Begin


2) Deposits - There are many valid reasons for asking for deposits, make sure to tie this into your agreement.
A deposit can act as confirmation for a project, this will guarantee your client is serious about investing into your time and skill. It will also confirm the start date for a project and you will find the project moves quickly. If a client starts to foam at the mouth about paying you a deposit I'd be weary, It could mean they don't have the money, or don't want invest in your time and effort. (Please only use this part as a guide, some companies may have a policy where they only pay on completion, use your instinct. I find this works for me.)How much is down to you.

Perks of the deposit are as follows : Acts confirmation for you and the client, pays for you to work through the project, protects you if the project is canceled, could keep you going until the far off completion date.

3) Price - Take into consideration what your price could be saying about your service, although many clients may want something for cheap this can also work against you (the designer). Could knocking the price down to %20 (or cheap by the current market) mean you are desperate, inexperienced or easy pickings? possibly from experience, by all means don't be greedy, but don't be too be cheap either. Being too cheap can say you lack confidence in your workmanship and will work for anything.
(If you are a graduate have the take it where you can get it attitude, if its good for the folio.)
Type into Google "salary calculator" or sign up to designweek.co.uk, better still, buy a design week and feel the printy paperness between your finger tips!

4) Book keeping - Always keep hold of your receipts, bank statements etc. As a freelancer you will need to fill out a self (assessment) form ether digitally or printed stating your earnings at the end of the tax year (April - to - April). Please take into account if you a you have a paye job, this will also add to your total earnings. Take into consideration at an early stages of freelancing and store some money to to pay your taxes and national insurance contributions, even better save your self some hassle and get an accountant.(I really should do that)
Type in self assessment in the revenue and customs website all call their hotline to talk to someone who knows more about the accounting side of things.

5) Communicate - This may sound like a cop out, but the "communication is the key" (or what ever) cliche really is the key. Talk to the client and respond to their needs. Take pride and joy in the project and this will really help you shine. The client will also be more will be more inclined to give future projects as you are enthusiastic about what you do .
Think it all through and every body 'should' be happy.

I hope you can extract some juiciness from this little article and helps you to avoid bulging temple veins!

Kind Regards,

Jimm