Texelate - the Leeds Web Design StudioHomeAbout MeServicesTestimonialsPortfolioBlogQuoteContact
My BlogGet a free quote now

Tutorials and How-Tos

Archive for the ‘Tutorials and How-Tos’ Category

How to buy shared hosting from Clook

Wednesday, July 14th, 2010

This is a how–to for clients of mine wishing to buy hosting from Clook in their own name. Clook is my favourite hosting company of the many I’ve used and I recommend their shared–1 package for most new websites with moderate traffic and email demands.

Please have a valid credit or debit card ready.

If you have already registered your domain name

  1. Go to https://www.clook.info/clients/uk/cart.php?gid=2
  2. Click the first Order Now button (to the right of shared–1)
  3. Choose I will update my nameservers on an existing domain Or I will register a new domain.
  4. Enter your domain name in the two boxes below putting everything before the first dot in the first box and every after it in the second box (E.g. texelate.co.uk would be texelate and .co.uk respectively) and then click the arrow to proceed
  5. Choose Monthly or Annual billing cycle—I recommend Annually as you save some money and it cuts down on invoices
  6. Click Update Cart to proceed
  7. Review the cart contents and then click the Checkout button
  8. Now simply fill out the rest of the details using your own personal or company information; you will then be directed to a payment page to enter your card details

Once you have paid up a human will review the account (usually within a few hours but sometimes longer if out of office hours). You will then be sent a welcome email—please forward this to me.

If you need to register a domain name

Follow the above instruction only when you get to step 3 choose I want Clook Internet UK to register a new domain for me and enter your desired domain name in the text box below using the dropdown to choose the type of domain (.com, .co.uk, etc).

As well as the welcome email mentioned above you will need to send me the details of your domain. This will be a separate login with the company you registered the domain through.

If you need any help call me on 07843 483 078. Also, please let me know if the procedure has changed so I can update this blog.

How to build a good content management system

Wednesday, September 2nd, 2009

A content management system (CMS) is exactly that: a system for managing content. When referring to CMSs in the context of a website we usually refer to a set of password–protected web pages—or a piece of software—that allow a user with little or no technical skills to publish and modify the content on a website.

So, how do you build a good CMS? As with many things, there is no right or wrong answer. Here I present a few bits of advice to help you build a good CMS.

If at any time you need advice or help with your CMS, call me on 07843 483 078 or get a free quote online.

Put in online

Where possible a CMS should be fully online. A 100% web–based CMS means that users can access it from any computer with an Internet connection, regardless of what platform it runs on (Windows, Linux or Mac OS X). It also means it doesn’t rely on having to install third party software on any machine the user wishes to use for updates.

Give it to as few users as possible

The adage that ‘too many cooks spoil the broth’ applies to managing content on a website too. Don’t let everyone add and change the content on your site just because you can. Let as few users as possible do this and clearly identify his or her responsibilities to prevent any unnecessary conflicts.

Don’t give a human job to a computer (or vice versa)

Don’t automate every function for the sake of it; if a job is better done by a human, let a human do it. For example, I’ve worked a lot with photographers and other creatives and have built them CMSs that allow them to manage their portfolios online. In some cases, it has proven much better to allow their artistic mind to crop and re–size the images rather then getting a computer to do it automatically. Of course, the same is true the other way round: don’t give a human a job a computer can do better.

Don’t add too many features

A good CMS should only do what it needs to do and nothing more. Some web design companies have a ‘core CMS’ that has the features most CMSs need. Sometimes when they offer you their ‘tried and tested CMS’ they’re actually euphemistically telling you you’re paying for a bespoke CMS—but in reality you’re getting a rehash of something they’ve used in a hundred and one other projects.

Keep it simple

Above all, keep it simple! As was mentioned in the outset, a CMS is a means to update a site without requiring the knowledge of a web developer. Some CMSs can be so convoluted the user may as well have gone and bought a book on programming.

There are other good bits of advice I’ve covered before such as the dangers of going down the open–source route but I feel the above provides a good summary as to the main points that need to be considered.

So if you need a good CMS building call me on 07843 483 078 or get a free quote online.

Send an email attachment with PHP

Monday, March 9th, 2009

To send email attachments you need to make use of MIME (Multipurpose Internet Mail Extensions) – a mechanism that allows email to go beyond a basic, limited character set. MIME has many uses but for the purposes of this tutorial we will send a multipart/mixed MIME email; this means we can send a text email and attach a PDF file to it (for information on attaching other file types please see the end of this tutorial). The MIME side of things will be exaplined as we go. Firstly, let’s set the email details and the attachment details up.

Set the email and attachment Details

<?php

$to = “$name <$email>”;

$from = “John-Smith <john.smith@domain.com>”;

$subject = “Here is your attachment”;

$fileatt = “/public_html/pdfs/mypdf.pdf”;

$fileatttype = “application/pdf”;

$fileattname = “newname.pdf”;

$headers = “From: $from”;

?>

The email details are obvious; for the attachment we need the path to the file and the headers for the file type (PDF in this case). The $fileattname variable determines the name of the attachment – it doesn’t have to match the name of the original file. Next, we need to transfer the file into a variable which we’ll call $file.

Read in the attachment

<?php

$file = fopen( $fileatt, ‘rb’ );

$data = fread( $file, filesize( $fileatt ) );

fclose( $file );

?>

Now the file has been read in it needs to be converted a format that is compatible with standard email: 7-bit ASCII. Before that, the appropriate headers need to be added to the email so the recipient knows what to expect.

Add the MIME content

<?php

$semi_rand = md5( time() );

$mime_boundary = “==Multipart_Boundary_x{$semi_rand}x”;

$headers .= “nMIME-Version: 1.0n” .

“Content-Type: multipart/mixed;n” .

” boundary=”{$mime_boundary}”";

$message = “This is a multi-part message in MIME format.nn” .

“–{$mime_boundary}n” .

“Content-Type: text/plain; charset=”iso-8859-1″n” .

“Content-Transfer-Encoding: 7bitnn” .

$message . “nn”;

$data = chunk_split( base64_encode( $data ) );

$message .= “–{$mime_boundary}n” .

“Content-Type: {$fileatttype};n” .

” name=”{$fileattname}”n” .

“Content-Disposition: attachment;n” .

” filename=”{$fileattname}”n” .

“Content-Transfer-Encoding: base64nn” .

$data . “nn” .

“–{$mime_boundary}–n”;

?>

The conversion to 7-bit ASCII takes place at the $data = chunk_split( base64_encode( $data ) ) line. The file is then attached using the appropriate headers. Finally – send the email:

Send the email

<?php

if( mail( $to, $subject, $message, $headers ) ) {

echo “<p>The email was sent.</p>”;

}

else {

echo “<p>There was an error sending the mail.</p>”;

}

}

?>

You can attach any kind of file you like – you need to make sure that change the $fileatttype variable to reflect the content type of the file you are attaching (e.g. image/gif for a GIF file).

For more help call me on 07843 483 078 or get a free quote now!

 
Click here to start your web project
Texelate - the Leeds Web Design / Web Design Leeds Studio Site Map © 2010 Texelate