brightlemon web design london [accesskey: .] brightlemon london web design
company services products support case studies training resources contact us
Web contact
Call me back
Request a quote
PQQs/RFPs

Search blog

Pages
  • About the Brightlemon web design london blog

  • Archives
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • December 2007
  • November 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006

  • Categories
  • Accessibility (16)
  • Adobe (3)
  • ajax (3)
  • Analytics (1)
  • Apache (8)
  • Blogs (5)
  • Brightlemon news (19)
  • case study (8)
  • command line (6)
  • content management (3)
  • CSS (28)
  • database administration (1)
  • Design (11)
  • Dreamweaver (12)
  • Drupal (33)
  • Drupal configuration (22)
  • Drupal courses (4)
  • Drupal customisation (19)
  • Drupal development (26)
  • Drupal modules (21)
  • Drupal optimisation (13)
  • Drupal regions (9)
  • Drupal scalability (10)
  • Drupal styling (12)
  • Drupal Themes (19)
  • Drupal training (6)
  • Drupal video (10)
  • Drupal views (10)
  • e-commerce (6)
  • Email (2)
  • Errors (5)
  • Firefox Add-Ons (6)
  • Flash (18)
  • FTP (5)
  • HTML (20)
  • Illustrator (13)
  • Information Architecture (4)
  • Internet Security (10)
  • JavaScript (9)
  • javascript (3)
  • jquery (2)
  • LAMP (9)
  • Linux (12)
  • mathematics (3)
  • maths (3)
  • mobile web (2)
  • mysql (6)
  • Open Source (15)
  • Photoshop (22)
  • php (14)
  • Quality Assurance (4)
  • research & strategy (5)
  • Search engine optimisation (8)
  • seo (7)
  • Server administration (7)
  • Smarty (1)
  • social bookmarking (5)
  • social networking (15)
  • social tagging (4)
  • ssh (3)
  • subversion (2)
  • svn (1)
  • Tips (22)
  • typography (3)
  • Uncategorized (1)
  • Unix (4)
  • Usability (4)
  • Useful Links (14)
  • version control (1)
  • W3C (17)
  • Web 2.0 (44)
  • Web browsers (18)
  • Web design (84)
  • Web development (124)
  • Web marketing (5)
  • Web standards (12)
  • Web video (8)
  • xhtml (3)
  •       go - (© brightlemon web design london)

    Repair all mysql tables (and check and optimise them) in one command

    May 24th, 2009

    Here’s how to check, repair and optimise all your mysql tables in all databases on a server…

    Am really loving the mysqlcheck command… it allows you to:

    • check all mysql tables
    • repair all mysql tables
    • optimise all mysql tables

    in one command…! Mysql rocks..!

    mysqlcheck - u root - p - -auto-repair - -check - -optimize - -all-databases

    That’s it..

    Some tips:

    1. it’s probably best to kill all incoming processes to speed this up
    2. even better just to stop the web server (httpd) run this command and restart (add a friendly message for users to see while the site is down)

    (Remember if you are using a tool like phpmyadmin (http://www.phpmyadmin.com) you can always log in, browse to the table, select operations and choose “repair”, “check”, “analyse” or “optimise table”)

    Interesting Links

    April 9th, 2009

    15 Essential Checks Before Launching Your Website via Smashing Magazine

    Good checklist of things to do before releasing your site to the public. For example: cross browser compatibility, META data, validate XHTML & CSS.

    Also available is an indepth PDF: website_launch_checklist_v1.pdf

    10 Ways to Automatically & Manually Backup MYSQL Databases via Noupe

    This article gives 10 ways that you can quickly backup your databases. Well written and easy to follow.

    Twitter, So Easy, You Have To Do It via Mashable

    “Every now and then there’s talk about folks who don’t want to tweet. It looks as though there is some kind of Twitter-tyranny going on, where everyone who’s not into Twitter (Twitter reviews) is some kind of social outcast, ostracized and shunned by the rest of the world.”

    Twitterfall

    Very innovative use of the Twitter REST API, Search API and the new OAuth. Twitterfall displays tweets as a casdading list and allows you to filter by popular trends or #hashtag. Just sit back and watch them scroll in. Great to watch while eating lunch.

    Font Families for the web

    March 13th, 2009

    The essentials of CSS and HTML as web standards opened new doors for web designers but also forced them to adapt their thinking. A case in point is fonts.

    In web terms there are few fonts which are recognised by all browser/operating system combinations. Split into font families these are:

    Serif: Times, Times New Roman, Georgia, New Century Schoolbook.
    Sans-Serif: Arial, Helvetica, Verdana, Trebuchet.
    Monospace: Courier, Courier New.
    Cursive: Comic Sans, Zapf Chancery, Coronet.
    Fantasy: Impact, Western, Papyrus.

    Controlling fonts online is not easy since each browser has got a different default font; the best way to declare fonts is in cascading style sheets (css).

    It is always good not to declare just one font type

    body {font-family: Times;},

    In case the browser doesn’t have a default font as the chosen font.

    Instead use multiple font decoration:

    body {font-family: Times, Times New Roman, Georgia, New Century Schoolbook;}

    In this way you ensure that if the first font is not available the browser will choose a latter one and your design will look as you intended.

    We can force css to use a font that is not in the list of fonts for the web. But other browsers might not support the same font and the result would be a different work flow from our design. To be safe always use the fonts for web.

    Keep in mind:
    - font with the same decoration should relate to the same font family;
    - size and spacing could have a different visual effect even if the fonts are from the same font family.

    Source: Lynda.com

    Different measurements for fonts in css

    March 13th, 2009

    There are 2 general categories for measuring font sizes in cascading style sheets (css) - fixed units and relative measurements.

    Fixed units are used for print:
    points (12pt)
    in (.25in)
    cm (30cm)

    Relative measurements are used for the web:
    em (1em)
    ex (1.2ex)
    percentage (100%)
    pixels (16px)

    1em: is relative to the nearest parent font size, and is the most secure because it is supported in Internet Explorer (I.E.).

    Ex: is equal to the “x” size of particular font, but the size of the font can change dramatically when changing the font family.

    Percentage: is the percentage of the size of the text compared to the default value (100%).

    Px: pixels are based on the current resolution of the view, but with I.E. 7 this can create some problems, because the browser doesn’t allow for screen resizing by pixel based font size, so users are not able to change the font size.

    The most secure font measurements to use for a web page are therefore: em and percentage.

    Source: http://www.lynda.com interactive training.

    Favicons in drupal

    March 6th, 2009

    The favicon is the little icon that usually appears next to the navigation tool bar of your browser.
    img 01

    First of all, you need to create a favcion.

    In Photoshop open the icon or logo that you want to use as favicon.
    Reduce the size of the icon to 16 pixels by 16 pixels, and save it in PNG 24.

    After you save the icon in your image folder, change the name of the file to favico.ico (instead of png).

    Then open the website that you are working on, login as admin, go to
    ADMINISTER > Themes > Configure

    img 02

    img 03

    img 04

    At the bottom of the page you will see a box “Short cut icon settings”.
    Browse the file called favicon.ico and upland the file.

    img 05

    Tick off the “default shortcut icon” and save configuration.

    What is jQuery?

    February 8th, 2009

    jQuery is a lightweight JavaScript library which allows you to create dynamic client-side effects with simple code. The code is very stripped back from typical JavaScript – the code for selecting elements and their descendents is more similar to CSS than DOM syntax. The logic behind the code is also similar to CSS. Like how CSS separates design from the HTML structure, jQuery separates the behavior. jQuery can be activated simply by linking to it as you would any other external JavaScript file.

    To reference a jQuery function, you must supply a namespace. This can be written as ‘jQuery’, but is conventionally written as ‘$’. For example;
    jQuery.trim(string);
    // is the same as
    $.trim(string);

    Whole elements can be selected, including those with particular classes or IDs. The class and ID selectors are ‘.’ and ‘#’ respectively, the same as in CSS.
    // select all paragraphs
    $(“p”);
    // select all paragraphs with the ‘main’ class
    $(“p.main”);
    // set the value of the element with the ID of ‘unique'
    $(“#unique”).val(“testing”);

    Adding and removing classes to tags can be done easily with the addClass() and removeClass() functions.
    $(“a”).addClass(“primary-link”);
    $(“a”).removeClass(“primary-link”);

    You can test if an element has a class by using the hasClass() function.
    if ( $(“p”).hasClass(“important”) )

    Functions are also chainable to help with more complicated selection and tasks.
    // add an “impressive” class to all paragraphs within the “parent” div
    $(“div#parent”).add(“p”).addClass(“impressive”);

    As you can see from these code examples, jQuery allows you to do a lot with very little code. It’s this simplification and separation from the main HTML structure that makes it so useful for web developers. Use of jQuery has risen dramatically since its launch in 2006, with big names like the BBC, MSNBC and Digg now using it prominently. This popularity should see it stick around for a while, and is a useful addition to any developer’s toolkit.

    How do I create a module configuration page?

    February 8th, 2009

    A customized Drupal module won’t be very useful if the admin user can’t configure it to their needs. This usually consists of several form fields where variables and inputs can be set. Within the module these fields are created within a function, however unlike other common module functions this one is not a hook and does not need a specific function name (although the names are usually along the lines of testmodule_admin or testmodule_settings). The following is an example of the structure these functions can take.

    function testmodule_admin_settings() {
    $form[‘testmodule_nodeno’] = array(
    ‘#type’ => ‘textfield’,
    ‘#title’ => t(‘Number of nodes to include’),
    ‘#default_value’ => variable_get(‘testmodule_nodeno’, 5),
    ‘#size’ => 2,
    ‘#maxlength’ => 2,
    ‘#description’ => t(‘The number of nodes to display.’),
    ‘#required’ => true,
    );
    return system_settings_form($form);
    }

    No HTML has to be coded to create the form, as this is all done by Drupal. The systems_settings_form function is used to add default buttons and set a form prefix. Note that variable_get is used to set the default value.

    However, these settings mean nothing if they don’t interact with how the main module displays its contents. In most cases this involves grabbing information from the database – this information needs to conform to our configuration settings. In this example, we want to limit the number of nodes retrieved to 5.

    $nodesmax = variable_get(‘testmodule_nodeno’, 5);
    $sql = ‘SELECT nid, title FROM {node}’;
    $result = db_query_range($sql, 0, $nodesmax);

    To add this page to the sites menu system we must make use of hook_menu. Here we can set the page path, title and permissions.

    function testmodule_menu() {
    $items = array();
    $items[‘admin/settings/testmodule’] = array (
    ‘title’ => ‘Test module settings’,
    ‘description’ => ‘Set a node limit to your test module.’,
    ‘page callback’ => ‘drupal_get_form’,
    ‘page arguments’ => array(‘testmodule_admin_settings’),
    ‘access arguments’ => array(‘access administration pages’),
    ‘type’ => MENU_NORMAL_ITEM,
    );
    return $item;
    }

    If you have already installed and enabled your module, it may be worth disabling and enabling it again for the new settings page to work properly.

    Resource: http://drupal.org/node/206761

    Understanding the Drupal module .info files

    February 8th, 2009

    Modules are the building blocks for Drupal sites. They’re an easy way to add functionality to your site, and there’s a wide variety to choose from. All modules must include a modulename.info file, which explains descriptive information about the module.

    There are 3 required details needed in this file – the module name, a description, and the version of Drupal the module is built for. This should be written as below:

    name = Test module name
    description = A simple module to test my coding skills.
    core = 6.x

    Note: in the module name, only the first letter should be capitalised. For the description, apostrophes should be avoided, instead use HTML entities.

    There also optional strings that can be included in the .info file. If your module relies on any other modules to work, then these should be included in this file. In the following example, our new module relies on the blog and profile modules.

    dependencies[] = blog
    dependencies[] = profile

    Another optional string is called ‘package’. On the main module list page the blocks are grouped by type for legibility. The idea is to place your module alongside similar modules to make it easy to find. For example, if you module involved video, then you could place with other video modules by using the following code:

    package = “Video”

    English Online social network approaches the 90,000 user mark!

    December 28th, 2008

    The British Council’s educational social network site - English Online (http://www.englishonline.hk/en and http://m.englishonline.hk/en (mobile version)) has now almost 90,000 registered users! (88,460 registered usesr at the current time of writing on 28th December 2008).

    Well done to Andy Newton and the English Online team at the British Council… at this rate of growth the site will have over 100,000 users in early 2009!

    English Online was built using Drupal by Brightlemon. To find out how to use Drupal and social networking concepts to power your projects - contact Brightlemon today…

    Latest Members
    There are 88,460 users on British Council - English Online.
    English Online has over 88,000 registered users

    Drupal based sites continue to grow!

    November 28th, 2008

    Below are some examples of websites that use Drupal’s successful framework.

    Music organisations such as MTV UK, Warner Brothers Records and Sony BMG.
    Drupal-Music-Organisations

    Individual record artists websites - Bob Dylan, Grateful Dead, Ozzzy Osbourne, Avril Lavigne
    Drupal-Music-Artist

    Non Governmental Organisations - amnesty International and End Poverty 2015
    Drupal-NGO

    Sites which benefit from advance Drupal functionality - Spread Firefox & Yahoo research
    Drupal-Research
    Drupal-News

    social networking
    e-commerce
    search engine optimisation
    web design
    content management
    accessibility
    brightlemon london web design
    UK and London web site visitors

    Visiting from the UK or London? Visit our London web site...