Blog

Customising the length of post summaries (or ‘teasers’) on your Drupal site

Many Drupal-based sites create summaries when you upload a post. These are often shown in listing pages that show the first paragraph or so of the post. These post summaries called ‘teasers’ in Drupal and are extracted automatically from the main text. The software makes its best guess about how much of the text to show but it doesn’t always look right.

You can manually tell Drupal where the teaser should end by inserting a special tag in the main editing box. To do just follow the steps below:

  1. Go to the edit screen of the page you’d like to edit.
  2. Click the ‘Disable rich-text’ link just below the ‘Description’ text input box.
  3. Enter the tag <!--break--> at the point you want the summary to end and click save.

Creating emergency-resilient electronic file backups

Most computer users know about the importance of backups as it’s all too common to have years worth of information and memories wiped out by a computer crash. Generally though, the average backup strategy involves copying files into some sort of device in your home or office. This may be of little use if the building is destroyed. Furthermore, fragile electronics may not survive an evacuation should you need to leave your home in an emergency.

The key to creating emergency-resilient electronic backups is to have both local and remote copies to create several layers of redundancy.

  • Local backups (or on-site backups) are kept in your primary location, such as at home or the office. These are for convenience since it’s usually easier to make more frequent and larger backups. Should you need to restore, they are easily accessible.

  • Remote backups (or off-site backups) stored at another location are for redundancy in case your local ones are destroyed. These are likely to be the ones you’ll fall back on after a large-scale emergency.

Local backups

Your local backup storage options include CDs, DVDs, external hard-drives or memory sticks. Since they can be connected directly to your computer, you can quickly backup and restore large files. Unfortunately, they’re also the ones most likely to be lost in the event of a house fire, earthquake, flood or any number of emergencies.

To help protect them, these should ideally be stored in a strong, waterproof and fire resistant container. There are commercially available data safes that are rated to protect your backup media from fire, water and theft but these are expensive. A cheaper but still pricey alternative would be to use professional waterproof hard cases from Pelican or Wonderful. Those on a very tight budget can simply try putting the backups in a sealed plastic food container such as those from Lock & Lock or Tupperware.

However, the biggest drawback with these local backups is that you are faced with a dilemma:

  • You can keep your backup media stored in the protective case and schedule regular backups. They’ll have some protection in the event of an emergency but it’s easy to postpone or forget about making the backups. You also won’t have a copy of any files that have been edited between the backups; or

  • You can make frequent backups to a constantly attached drive, usually automatically through backup software. This makes your backup process more reliable but leaves the media at risk since they’re left out.

Image of laptops and hard-drives in temporary office space during an emergency
A make-shift office of laptops and backup drives laid out on the dining room table

Remote backups

The most convenient way to keep remote backups is to use an online service like the following:

By far the easiest to use are Dropbox and Carbonite but the most secure are rsync, SpiderOak and JungleDisk. (There are many more services available but these are the ones that I’ve personally tried.)

*SpiderOak and Dropbox have a free option. If you want to try one of these, use my referrer code and we’ll both get free extra space.

These types of services host their servers in business-grade data centers; your data will be housed in a secure facility with its own disaster recovery systems. In other words, they do the job of keeping your data safe for you. (Of course, you should never give full trust to a third-party so local backups are still important.)

Keep in mind that due to storage fees or internet speed limitations, some types of data, such as a large music or video library, may not be practical to store online. You should also expect your first backup to take a while since you’ll need to copy everything onto the remote server. For example, the first time I used SpiderOak, it took several days to backup almost 30GB of data. Fortunately, subsequent backups are quicker as most services copy over only the changes.

A solution to keeping remote backups of large files is to create a ‘backup-ring’ with friends and relatives from out-of-town. The principle behind this is quite simple: make backups and then swap disks when you visit your out-of-town friends; you keep their drive and they keep yours.

Synchronization

File synchronization is a technology that’s matured over the past few years and combines benefits of local and remote storage. It works by copying files from your computer onto online storage and when any changes are made, the older file is automatically updated with the new version.

Most services also allow you to synchronize several computers so if you have a laptop, desktop and office computer, they can all be updated with the latest changes. This feature alone can greatly simplify your backup and restore process; if one computer is unusable, you simply log in to another, synchronize then pick up where you left off. The same process applies when buying a new computer. Just install the synchronization software and your files will be copied over from the servers.

Some even offer web and mobile device access so in an emergency, you don’t even need your own computer to get hold of your files.

Dropbox, JungleDisk and SpiderOak offer computer synchronization. Note that these services require an internet connection to synchronize. During a wide scale emergency, internet links may be down or unreliable so it’s a good idea to ensure that your computers regularly go online to get updates.

Other tips

  • If your email provider supports it, try using the IMAP protocol for your emails. This essentially keeps your mail server synchronized with your computer’s mailbox changes. Even if your computer is destroyed, you can still connect to the server and have your emails in the same state of your last access: new, read, saved and deleted emails will appear as they did on the destroyed computer. Those who use web-based email, like Gmail, Hotmail and Yahoo won’t need to worry about this.

  • Remember that your backups may contain confidential files. For privacy, make sure that all backups are encrypted. Your backup software may have this feature built-in. If not, you might want to try TrueCrypt which is well-known and trusted encryption software.

  • Some files use special formats so make sure you also backup any software you need to access your files. As much as possible, try to save or export files into a widely used format. For example, PDF files can usually be opened in pretty much any operating system and most devices come with some sort of PDF reader.

  • Don’t forget to run a test restore. You may be diligently making backups but they’re useless if some error in your process means that you can’t retrieve the files when needed.

It’s all about continuity

While keeping your data safe might seem like a low priority in comparison to other preparedness tasks, the purpose behind creating emergency-resilient electronic file backups is continuity. Crises always pass and life eventually returns to normal. Since a large part of our assets, both business and personal, are now electronic, rescuing your data files will speed up your recovery.

More than anything, having data backups provide emotional security. Knowing that your digital archive of family photos or vital business documents are safe can help you focus on the immediate needs of getting through an emergency.

Apple Mail setup

Email Setup Instructions for Apple Mail

Your Settings

If you are hosting your email with our preferred hosting company, Rackspace Cloud, the settings for your email server are as follows.
Incoming server: secure.emailsrvr.com
Outgoing server: secure.emailsrvr.com
Username: Your full email address
Password: This will be sent to you separately

Setting up a new account in Apple Mail

  1. Open Apple Mail and in the menu, click Mail > Preferences
  2. Click the Accounts setting
  3. Click the + (Create an account) button
  4. Mac Mail Accounts pane

  5. The Add Account settings will appear
  6. Mac Mail Add Accounts

  7. Enter your Full Name, Email Address and Password, then select Continue
  8. Set the Incoming Mail Server settings
  9. Account type: select IMAP
    Description: this is up to you but I suggest you enter your company name
    Incoming Mail Server: type secure.emailsrvr.com
    User Name: type your user name
    Passwrord: type your password

  10. Select Continue and if the details you entered were correct, it will take you to the Outgoing Mail Server screen
  11. Set the Outgoing Mail Server settings
  12. Description: this is up to you but I suggest you enter your company name
    Outgoing Mail Server: secure.emailsrvr.com
    Check Use only this server
    Check Use Authentication
    User Name: type your user name
    Password: type your password

  13. Select Continue and if the details you entered were correct, it will take you to the Account Summary screen
  14. Select Take account online and click Create
  15. Close the Account Settings by clicking the red close button on the top-left of the screen.

If the tests at step 7 or 9 failed, the most likely reasons are:
The user name was entered incorrectly. For example, you may have only entered the part before the @ sign. On our system, the user name is made up of the while email address. e.g. [email protected]
The password was entered incorrectly. If you copied and pasted from an email, you may have inadvertently included a space character.

Editing an existing account in Apple Mail

  1. Open Apple Mail and in the menu, click Mail > Preferences
  2. Click the Accounts setting
  3. Select the Account Information tab
  4. Mac Mail Account Information pane

  5. Set Incoming Mail Server to: secure.emailsrvr.com
  6. Under Outgoing Mail Server, click the drop-down and select Edit server list
  7. Click the + button and a new server should appear (a grey note to ‘Double-click to enter’ should appear in the Server Name column.
  8. Mac Mail Server pane

  9. Double-click it and enter: secure.emailsrvr.com
  10. Select Advanced
  11. Use these settings
  12. Set the Use default ports option
    Check Use Secure Sockets Layer
    Authentication: Password
    Enter your usual username and password

  13. Click OK
  14. Make sure secure.emailsrvr.com is set under Outgoing Mail Server
  15. Close the Mail preferences window

Protecting your password

A client’s Yahoo email account was hijacked recently. She found out after an email was sent out in her name, to her entire contact list, asking to borrow several thousand pounds. This was such an obvious scam that no-one fell for it. Fortunately, other than some embarrassment and inconvenience, there were no serious consequences. It could have been much worse.

How did this happen? She’ll probably never find out but easiest route would have been by getting hold of her password. Criminals use different techniques but common methods are:

  • ‘phishing’;
  • ‘shoulder-surfing’;
  • through an infiltrated computer;
  • by capturing the transmitted information.

‘Phishing’

This method because is so common that I’d be surprised if you’ve never encountered it. Phishing is when someone tries to trick you into visiting a fake website and entering your login credentials. Treat any email asking for your account details with suspicion. If in doubt, contact the company using their published telephone number or email address to double-check.

‘Shoulder-surfing’

Shoulder-surfing is a technique where someone simply looks over your shoulder watching what you type. You’re most susceptible to this when you’re working in a public place, like an internet cafe, airport or train. To avoid this, just be aware of your surroundings.

Through an infiltrated computer

Computers can be infiltrated by software that secretly records everything you type on the keyboard. The most risky are those in internet cafes or hotel business rooms. What happens is that a malicious person will install recording software and wait for people to use the computer. A while later, the person retrieves the captured information, which would include web addresses, usernames, passwords and emails. It can be very difficult to know when this is happening so don’t trust public PCs.

Your own computer can also be infiltrated by a computer virus caught through email attachments or infected websites. Windows users should keep their anti-virus software up to date. Apple users have less to worry about but it’s still a good idea to be cautious and occasionally run virus checks.

Capturing transmitted information

This technique is probably one of the most difficult to avoid. Someone with enough technical knowledge can literally watch the passwords and emails flowing through your internet connection. Although it’s possible for this to happen with your wired office network, you’re most at risk when using WiFi.

If you have wireless internet at home, read the manual to make sure you configure it with the highest security setting possible. Things get more tricky when you’re travelling and using the wireless internet services at cafes and hotels.

To protect against this, you’ll need to use VPN software. VPN stands for Virtual Private Networking and is a way of scrambling your transmitted information, hiding it from prying eyes. Unfortunately this software can tricky to set up. They’re often used by corporations with their own IT department. As a small-business owner, this will probably be outside of your comfort zone unless you have someone technical on-board. Nevertheless, if you’re willing to give it a try, ask a computer retailer about VPN broadband routers.

Just remember to exercise caution

As you can see, the techniques range from old-fashioned confidence tricks to high-tech computerised traps. I’ve glossed over the details but key is to use the same common sense online as you would in the real world: don’t take everything at face value; be cautious when in unfamiliar surroundings; get advice on how to use your tools.

This is a complex topic so if there’s demand, I’ll write a more in-depth articles in the future.

Linking to a file in Drupal

  1. Login to your CMS at http://YOURSITE/user (replace YOURSITE with your own domain name).
  2. Create a new page or edit an existing page where you’d like to add the link.
  3. In the ‘Body’ editor box, type some text and highlight the words that you’d like to convert into a link. You may also highlight existing text.
    Linking text in Drupal
  4. With the link text highlighted, click in the ‘Insert/edit link’ icon in the editor tool bar.
    Image of Drupal's link text icon
  5. The ‘Insert/edit link’ window should now appear. If it does not, please temporarily disable your browser’s pop-up blocker.
    Image of Drupal's insert/edit link window

    • Link URL: Enter the filename prefixed by /files/
      Example: if your file is my_document.doc, you must enter /files/my_document.doc
    • Target: You may leave the setting at ‘Open link in the same window’
    • Title: Enter a descriptive title. This sets the text that appears when a visitor hovers the mouse over the link.
  6. Click ‘Insert’ on the ‘Insert/edit link’ window, then scroll down to the bottom of the page editor window and click ‘Submit’. The page will now be saved with your new link. View the page and click the link to make sure your file downloads as expected.

Updating or removing the link

You can also edit or remove the link text.

  • To update the link, follow the instructions above to bring up the ‘Insert/edit link’ window. It should appear with your pre-filled information.
  • To remove the link, highlight the link text and click the ‘Unlink’ icon. (This appears as a broken chain graphic and can be found next to the ‘Insert/edit link’ icon.

How to upload a file to your server

Introduction

These instructions relate to your public website. It will show you how to upload a file to your server. Your site is controlled by a content management system (CMS) and there are several ways to achieve the same result. Here I will show you one method, but if you find it to be unwieldy, please let us know as we can suggest alternatives.

Prerequisites

You will need the following in order to upload your file:

  1. File transfer software, also known as an ‘FTP client’.
  2. Your username and passwords to login to the server. For security, I’ve sent your username and password separately. (These credentials are not the same as those used to login to the CMS and edit your site pages.)
  3. The file you’d like to upload (of course!). You can upload any file type but to make things easier for yourself, I suggest you follow the guidelines below.

Uploading a file

  1. Open your FTP client and in the connection screen, use the following settings.
    • Host or Server
    • Username
    • Password
    • Path: you may leave this blank
    • Protocol: Use FTP or SFTP
    • Port: Most clients will fill this in for you. If it doesn’t, enter port 21 if connecting through FTP, or enter port 22 if connecting through SFTP.
  2. Click the ‘Connect’ button. Once the software has connected, it should display the files currently on the server.
  3. The files on the server are organised in a hierarchy similar to your own computer. If you did not enter a path in step one, you will be placed on the uppermost level so you’ll need to navigate to your ‘files’ directory. If you don’t know where this is, please contact the project manager or developer who worked on your site.
  4. Drag your file into the window showing the server files. (Some programs also have a section displaying your local computer files so make sure you drag it into the server window.)
  5. Wait for the file to finish uploading, then click ‘Disconnect’.

Please take care when manipulating files on the server. Deleting files here will cause content to permanently disappear from your website.

Notes

About the Protocol

The protocol is the method used by the software and server to communicate.

FTP is widely supported by file transfer programs but it’s not secure. Malicious people on your network can easily intercept your password and files when connecting through FTP.

SFTP is the secure version of FTP because it encrypts the password and files. Use SFTP if your software supports it.

File Guidelines

Following these guidelines will help reduce problems when creating your link.

  1. Try to keep the file size small. Anything up to a few megabytes (MB) is acceptable on modern internet connection speeds. If you’re pushing 25 MB or more, your visitors might not like the wait.
  2. Place the file in an easy-to-find location, such as your desktop.
  3. Use only alphanumeric characters in the filename and make sure there are no spaces. If you like, you can also use dashes ( – ) or underscores ( _ ). Unless you’re quite proficient with creating web pages, using any other characters may give you problems when creating a link to the file.

    The following examples are OK:

    • my-file-1.doc
    • MyFile.doc
    • myfile1.pdf
    • document_2.txt

    These may give you trouble when creating the link:

    • Jane’s document.pdf
    • John’s file 1.doc
    • mydocument (with hidden file extension)
    • SoldFor$10.doc

File transfer software

There are many FTP client vendors and some can be downloaded from the internet at no cost. Below are a few suggestions but an internet search for ‘FTP client’ will show more.

For Microsoft Windows

  • http://filezilla-project.org
  • http://www.smartftp.com
  • http://winscp.net

For Mac OS X

  • http://filezilla-project.org
  • http://www.panic.com/transmit/
  • http://cyberduck.ch

Should you run your own email server?

A common misconception amongst small-business owners is that you need your own email server. For most companies I’ve encountered, this is just not necessary.

Before continuing, it may help if I explain some basics. There are essentially two ways to have email:

  • Hosted email. This is when someone else manages the email server. If you have a personal Gmail or Yahoo email, it is ‘hosted’ by another company, in this case Google or Yahoo. The same is true if you use the email address provided by your internet service provider or website hosting company.
  • You run your own email server. Many medium-sized and large organisations take this route. They have a server room or data centre space, and an I.T. department who takes care of the servers.

Small-business owners sometimes feel that they need to emulate bigger companies by installing their own email server, perhaps assuming that it’s the way things are ‘supposed to be’. This is unsurprising since founders often come from a corporate environment where this set-up is normal. Furthermore, computer services companies love suggesting this route because it’s a great source of income: not only do they supply you with the hardware and software, they also get continued work through ongoing support.

Nevertheless, while email is critical for most companies, having an in-house mail server is a distraction from running the business. Do you have the resources to keep yours running reliably? Here are some examples of the many worries you’ll have if you take care of your own email server:

  • What happens to your messages if you lose power, say, from a blown fuse or road works?
  • Will the new cleaner unplug the cable to use for the vacuum cleaner?
  • What if the server is stolen during a break-in?
  • Do you have spare parts in case a component fails?
  • Can you keep the server virus-free?
  • Are you running regular backups?
  • Which software updates can you apply without causing problems?
  • Will the server overheat in the summer?

Compare this with a hosted service. Reputable providers house the servers in a data centre with backup power generators, building security, air conditioners and a round-the-clock technical team. The chances are that your email service will be more robust with them than in a computer sitting in the corner of your office.

If you think you genuinely need your own server, make sure that you’re aware of the implications. Don’t let your technology advisor push you towards this direction without a clear explanation.