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
  • August 2009
  • July 2009
  • 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 (9)
  • Blogs (5)
  • Brightlemon news (19)
  • case study (8)
  • command line (6)
  • content management (4)
  • CSS (28)
  • database administration (1)
  • Design (11)
  • Dreamweaver (12)
  • Drupal (34)
  • Drupal configuration (22)
  • Drupal courses (4)
  • Drupal customisation (20)
  • Drupal development (27)
  • Drupal modules (22)
  • Drupal optimisation (13)
  • Drupal regions (9)
  • Drupal scalability (11)
  • 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 (10)
  • Linux (12)
  • mathematics (3)
  • maths (3)
  • mobile web (2)
  • mysql (7)
  • Open Source (15)
  • Photoshop (22)
  • php (15)
  • 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 (23)
  • 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 (133)
  • Web marketing (5)
  • Web standards (12)
  • Web video (8)
  • xhtml (3)
  •       go - (© brightlemon web design london)

    Archive for the 'Drupal' Category

    Customizing Apache SOLR Search Results

    Friday, July 17th, 2009

    Whilst the default Drupal search is ample for most sites, we needed a search system that was faceted, wouldn’t bog down MySQL, and would work on a cluster. There was one clear winner – Apache SOLR.

    From the same people that brought you the ubiquitous HTTP server, SOLR is a java search engine that is hugely sophisticated, yet through the joys of Drupal modules, is really easy to set up. Simply grab this module, and follow this guide.

    A bit more work is required to really replace the Drupal search. The Suppress Search module completely hides the drupal search, and redirects all searches via SOLR. How about reformatting the SOLR search results though?

    Using Drupal hooks, changing how the SOLR search results look is really easy. There are two hooks of interest: hook_apachesolr_process_results() and hook_apachesolr_search_result_alter().

    hook_apachesolr_process_results() is called for each item in the search result. It is passed an object containing the raw search result – the node title, search score (relevancy) etc. The node title displayed can be edited to include the relevancy score:

    function apachesolr_custom_results_apachesolr_search_result_alter(&$arg)
    {
    $show_score = variable_get("apachesolr_custom_results_showscore", 'hide');if($show_score == "show")
    {
    // append score to title
    $arg->title .= " [".$arg->score."]";
    }
    
    return $arg;
    
    }

    hook_apachesolr_search_result_alter(), on the other hand, is only called once. At this point the raw search result from SOLR has been converted to node objects, so all node details are available to tweak. In the code snippet below I’m hiding or showing the author’s avatar next to each result:

    function apachesolr_custom_results_apachesolr_process_results(&$arg)
    {
    // loop through each result, performing desired actions
    for($i = 0, $l = count($arg); $i < $l; $i++)
    {
    $show_author = variable_get("apachesolr_custom_results_hideauthor", 'def');if($show_author == 'hide')
    {
    // remove user
    $arg[$i]['user'] = "";
    }
    elseif($show_author == 'pic')
    {
    // show user avatar
    $author = user_load($arg[$i]['node']->uid);
    
    if ($author->picture)
    {
    $arg[$i][’user’] = theme(’user_picture’, $author);
    }
    else
    {
    $arg[$i][’user’] = ‘Default User Picture‘;
    }
    
    }
    }
    
    }

    To simplify deployment, I’ve made a module enabling some simple customization of the results. Whilst not that useful in itself, it would make a good starting point for further development.

    Module Download

    Favicons in drupal

    Friday, 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.

    How do I create a module configuration page?

    Sunday, 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

    Sunday, 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!

    Sunday, 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!

    Friday, 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

    Brightlemon implements new features in English Online

    Friday, November 28th, 2008

    British Council - English Online

    Please visit the site at www.englishonline.org.cn

    About the British Council
    enligh-online-british-council

    The British Council connect people with learning opportunities and creative ideas from the UK to build lasting relationships around the world.

    Brightlemon were asked to design and build a community based website (English Online) to help promote the learning of English in China.

    Visit the British Council’s English Online social networking website external link

    The requirement

    Design, creation and implementation of a complete educational social networking site to assist Chinese students in learning the English language.

    The following list summarises some of the features of the site:


    Personalised newsletters

    Like many websites, users can sign up for a html newsletter from English Online to be delivered to their email inbox.

    However what is unusual about English Online is that the actual content of the newsletter delivered is tailored to each user’s specific interests and learning level.

    This is achieved by sophisticated taxonomy techniques which matches content with users based on their learning records and achievements, user role (learner, teacher, school) and other profile information.


    Personalised content

    One of the main requirements for the English Online site was that each user would be able to create their own ‘profile’ (similar to that which might be found on sites like myspace, facebook etc.) as a virtual toolbox for their study of the English language.

    As they work through exercises, lessons and exams on the site, their progress is stored within this profile along with records of all other activities they have been involved in within the website (blogs, forum posts, pictures shared with other users etc.)

    Users can choose from various pre-made templates to theme their profiles.

    There are even different templates available for different user groups such as Learners, Teachers and Schools.


    Personal blogs
    enligh-online-web-blogs

    Blogs provide commentary or news on a particular subject; some function as more personal online diaries. A typical blog combines text, images, and links to other blogs, web pages, and other media related to its topic. The ability for readers to leave comments in an interactive format is an important part of many blogs. Most blogs are part of a wider network of social media.

    For the English Online website each user has their own indivual blog - presented within their user profile page.


    Multiple languages
    enligh-online-web-multi-language

    Obviously with the website primarily aimed at Chinese people wanting to learn English it was imperative that users of all skill levels would be able to access and understand the information and content presented.

    For this purpose the site content needs to be available in both Chinese and English, but not only that as there are two main forms of written Chinese (traditional and simplified) and both of these are needed.

    So brightlemon implemented a system where the user can instantly change the language of the site from any one of these three languages to another with one simple click of a mouse, no matter what page they are on.


    Streaming videos
    enligh-online-web-videos


    Forums
    enligh-online-web-forums

    An Internet forum is a web application for holding discussions and posting user generated content. Internet forums are also commonly referred to as web forums, message boards, discussion boards, (electronic) discussion groups, discussion forums, bulletin boards or simply forums.

    The forums on the English Online site provide a valuable discussion point for students, teachers and school administrators, where they can share advice and experiences with and ask questions of other English Online users.


    Online Polls
    enligh-online-web-polls

    Another point of interactivity is web based polls where users can vote on specific questions and share the automatically collated results.


    Multiple Colours - Customisable Interfaces
    enligh-online-web-multi-colour

    To truly personalise the user experience people can also instantly change the colour scheme of the entire website by simply clicking a tab in the site’s ‘colour chooser’, which sits top left of every page.


    Mobile site development
    enligh-online-web-mobile-site

    English Online has a dedicated theme that is designed for mobile phone users. This theme is set as the default when accessing the site via http://m.englishonline.org.cn/ - view mobile demo via Opera mobile. This simplifies the site display so it can easily be used via a phone’s smaller and more limited browser. Figure M1 shows how the latest members block is displayed via the Opera Mini browser, one of the most common mobile browsers.


    Widget development

    enligh-online-web-more-widgets

    enligh-online-web-more-widgets

    Widgets provide a way for users to actively participate in a website without the need of opening a web browser. Using Adobe Flex technology, widgets can be created that run on a variety of different platforms, giving users access to diverse rich media content.

    For EnglishOnline.org.cn, a widget was created in order to provide a personalized user environment for all registered users. This environment allowed users to be able to quickly check the site for updates. Figure W1 shows the widget displaying the latest blog posts on the website.

    Further than just being able to show updates to the website, the widget also enabled users to interact with their account.
    Many of the web 2.0 features of the website were accessible through the widget. For example, the widget allowed users to check their friends list, read their messages (see Figure W2) and access their profile.

    Widgets created with Adobe Flex technology can be seamlessly connected to the Drupal 6 framework, allowing for simple and fast viewing of data and media.

    Brightlemon develops pilot site for British Council - Learn English

    Friday, November 28th, 2008

    Learn English

    Brightlemon has been commissioned to design a pilot website for British Council – Learn English.

    The site will be divided into two main sections that will cater to their specific target audience. Learn English Adults (teens, adults, professionals, migrant workers and English exam takers) and Learn English (aimed primarily at children, parents and teachers of children). These two sites, in terms of design, offer two different proposition (see below)

    The Learn English website will incorporate the existing sites (Learn English Central, Learn English Professionals and Learn English Kids) into a brand new, fresher and more user friendly design. At present these sites attract more than 900,000 visitors per month.


    Learn English Adults


    Design and layout

    The design aims to highly navigable, modern, light use of graphics and not too much text

    British Council Learn English Brightlemon

    Ability to choose languages

    British Council Learn English Brightlemon

    Part of the requirement of the brief is that the website should be ‘multi language’. English, Chinese Simplified, Chinese Traditional, Arabic and Russian versions.

    -

    Help blocks

    British Council Learn English Brightlemon

    Profiles and accounts for the new site.

    British Council Learn English Brightlemon

    Events Calendar
    British Council Learn English Brightlemon

    Multiple navigation options – most popular, recently viewed or polled content.
    British Council Learn English Brightlemon

    Look at latest comments and blogs.
    British Council Learn English Brightlemon

    Learn English kids

    Design and layout

    Clear, simple, vibrant, child-friendly, youthful, strong use of colours, simple navigation, images, graphics for navigation, speech bubbles, not too much text.

    British Council Learn English Brightlemon

    Main graphic navigation carousel

    British Council Learn English Brightlemon

    Content Block styling
    British Council Learn English Brightlemon

    Learn English Flash Games

    British Council Learn English Brightlemon

    Latest competition module

    British Council Learn English Brightlemon

    Login modules

    British Council Learn English Brightlemon

    Opinion Polls

    British Council Learn English Brightlemon

    Recent comments

    British Council Learn English Brightlemon

    English Online website featured on site of Drupal creator Dries Buytaert

    Friday, November 28th, 2008

    The British Council’s English Online - built by Brightlemon - was recently featured on the home page of Dries Buytaert’s website http://buytaert.net/british-council-using-drupal. For more details about this project see the brightlemon blog.

    Dries Buytaert English Online

    Customising themes in Drupal

    Friday, November 14th, 2008

    To start, create an account with the Drupal web site at www.drupal.org.

    drupal web site

    Click on “download” button from the top right tabbed menu, and select “Themes”.

    drupal themes

    You will see a page full of themes, which you can filter by type (version of Drupal that you are working on etc) using the drop-down at the very top of the page.

    drupal select version

    Choose a theme (or more than one) that are similar in layout to your design (same number of columns etc.) and download them.

    drupal themes page

    The themes will be downloaded in the format: tar.gz these are compressed files which can be opened with most commonly available zip utilities (winzip etc).

    To make your new themes available to your Drupal site they first need to be uploaded to the correct directory:
    sites >> all >> themes.

    To activate your new theme, login to the admin area of your Drupal site, navigate to site building >> themes and tick the ENABLE check box next to your new theme.

    To make your new theme the site’s default (which is that one that you uploaded) tick the radio button next to the check box and click the save button at the bottom of the page.

    drupal select theme

    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...