Drupal

Now that jQuery UI is included in D7 core, we'll see a lot more application style functions using the UI library. Here's a quick example for adding an accordion to node content (enable and select PHP filter) demonstrating how easy it is to add jQuery UI effects and widgets in Drupal 7.

I would like to share a code snippet for a site I'm currently developing which I thought was particularly cool.

The following code adjusts the page margins in a dynamic fashion and is nice on the liquid layout I'm designing. Basically it sets the page margins (or padding in this case) logarithmically (sort of) so in a really wide screen there's heaps of margin and on low res (1024 wide) there is very little. Percentages didn't cut it.

  1. Lack of attention to title tags or leaving title tags as automatically generated on important pages or having duplicate titles. The single most important thing you can do to improve Drupal SEO is improve page titles - Page Title module
  2. No quality backlinks. This will take a huge effort, back-links or inbound links from related sites, suppliers and clients will help bring traffic and build SEO. For goodness sake do not buy back-links.

I've been working on the Drupal 6.x dev version of the Andreas03 theme (http://drupal.org/project/andreas03) for which there is no left sidebar region. I was kind of stuck on the regions where on a fresh installation, enabling the theme automatically put the navigation/login in the header by default.

I wanted something different to replace the ajax animated gif (Drupal throbber) so here it is:

Also, see my post Change throbber.gif in Drupal for instructions on replacing throbber.gif without effecting core.

To replace core Drupal ajax animated gif (throbber.gif) add the following to your theme's CSS and put the replacement throbber.gif file in the images folder of your theme.

html.js input.form-autocomplete {
  background-image: url(images/throbber.gif);
}

Top 5 Drupal Modules

  1. CCK - of course!
  2. Admin Menu - I've been using this since D5.x and it really changed my life.
  3. Image Cache (Image API, File Field, Image Field and Image Cache) - Really the only way to add consistent image content.
  4. FCKeditor (IMCE, Image Resize Filter, Better Formats and FCKeditor) - For the end user or client, why do they still get into trouble? 
  5. Google Analytics

Drupal is inherently pretty good for search placement. I've noticed after doing site conversions, most times placement improves, other times it improves dramatically. There are some simple steps to further SEO, while it may take some time to complete you will find the process worthwhile. Even if you plan no further efforts to for your SEO, you should at least consider completing the tasks set out by the SEO Checklist module.
 

File extension handling

Add Drupal file types to the Extensions.txt file so Dreamweaver knows how to handle them:

Documents and Settings -> [user] -> Application Data -> Adobe Dreamweaver -> Configuration

Edit: Extensions.txt To the first line add MODULE, PROFILE, INFO:

HTM,HTML,SHTM,SHTML, ... ,TXT,PHP,PHP3,PHP4,PHP5,MODULE,PROFILE,INFO,JSP,WML,TPL, ... ,MASTER: All Documents

To the PHP Files line add MODULE,PROFILE,INC like so:

Override theme_menu_item() (includes/menu.inc)

edit/create template.php in your themes dir.

<?php
function phptemplate_menu_item($mid, $children = '', $leaf = TRUE) {
  return
_phptemplate_callback('menu_item', array(
       
'leaf' => $leaf,
       
'mid' => $mid,
       
'children' => $children
   
));
}
?>

create a menu_item.tpl.php file

Syndicate content