Monday, November 9, 2009

More on NodeWords in Drupal

I have been working with Nodewords quite frequently of late in an effort to get some real SEO in the Drupal environment. Without the Nodewords module, this is virtually impossible.

As discussed in an earlier blog, Nodewords is a single source for customizing meta descriptions on a page-by-page basis, as well as site verification for Google Webmaster Tools, Yahoo Site Explorer and Bing Webmaster Tools. Combine this with the xmlsitemap module and you have the ground work for a good SEO system.

In doing these projects, I have stumbled across a couple reasonably common errors I'd like to make people aware of...one is the subject of Drupal caching and the other a simple issue and how to avoid.

First the simple issue...one must be careful to not ignore the front page tags of a Drupal web site. If you have a page, and "promote it to the front page" via the content management tools, the meta description, keywords, or any other Nodewords content, does not get promoted with it. The front page has specific tags for just it. These include the site verification tags, as well as it's own description, keywords, robots, return visits and whatever else your choose to use.

This is, undoubtedly, due to the fact any number of content sections may be on the front page at any given time, so to avoid the meta for each of those pieces of content, the front page has it's own tags that must be defined within the global meta tags section of the Nodewords content management tools.

The second is the subject of caching. I have had more than one site that I have enabled Nodewords in, only to go to the control panel and see now meta tag options in the lists and other vacant data. After a bit of research and trial and error, I have now found that in every case, clearing Drupal's cache has fixed it.

Drupal caches some of the content in order to increase performance, sometimes it gets in the way. In order to fix this issue, click "administer > site configuration > performance" and scroll to the bottom. There you will see a button labelled "Clear cached data". Click it, and let it do it's thing. That should clear up the issue.

Friday, November 6, 2009

Open Flash Chart Free Charting Application

For a recent project we (myself and the other developer on this team) have been told we need to build a graphical charting engine. I had used a few Flash based charting tools before, but the other developer found a new one I hadn't seen before; Open Flash Chart. This made yesterday afternoon a rather enjoyable, productive, and amusing time.

Before getting into the amusing piece, I have to say, this is one of the finest Flash based charting applications I have ever used, very functional, looks good and feature packed. It turns out it is the tool we are going to use.

Now that the disclaimer is out of the way, I have to say it's also one of the wackiest projects I have worked on.

Weirdities:
  • When we first got to the site, and read enough to know we wanted to try it, we went to the download it and found the subversions were names, not numbers, and the link to actually download was way at the bottom of a page explaining each subversion, and in some cases, the explanation behind the wacky name. As a consultant that needs to get a job done, I couldn't care less.
  • So, I get the download, unpack it and find out all the sample/demo files were broken. Paths to supporting JSON files were wrong, heck, even the path to the .swf was wrong, so, I give up on that and just go through their tutorial, follow some steps and get everything together.

  • For some pieces of the chart, a parameter of "color" is available, in other pieces, "colour" is available, and they are not forgiving to allow either in any place...which shows one of the downside of open source if not properly managed.

  • Tool tips are unpredictable and some of the variables work in some charts and not others, tool tip customization on the whole works in some and not others or each chart type has their own quirks in getting them to work properly. It's not consistent.

  • Lack of some very basic features when some very weird, outlandish ones are available.
Cool Stuff:
  • We start looking through the different reporting styles available, which is impressive; bars, lines, radar, animations, tool tips that are customizable, 2d and 3d layouts, semi-transparencies, multiple reports on a single chart, but in addition some of the wackiest animations and strangest features that I don't understand.

  • Pretty easy to use if you ignore the demo files and just use the tutorials on the web site.

  • A single .swf for all the chart types, others I have used had a .swf for bar charts, one for pipe charts, one for pie charts, etc.

  • The PHP dynamic JSON generating from database sources is very cool, and actually, better documented than using JavaScript directly, which is weird...but cool.

  • FREE! Well, not exactly, they ask you to post a picture of yourself holding a beer in their forum for the usage agreement. (eh?)
From reading documentation, seeing their forum, and their product, it's clear the developers have fun doing what they do, and have a "wacky" sense of humor, but in the end made a product that does 95% of what we need, and does it simply. Data is fed to the charts with standard JSON arrays, which is nice and charts are customizable in color and other appearance features, but the non-functional demo's was annoying as was the silly versioning convention.

Still, in the end, great product.

Thursday, November 5, 2009

Setting up Drupal 6 on GoDaddy Servers

I have recently been tasked with setting up a new web site for a client that has all their current web sites and applications housed in GoDaddy servers. I have worked within their environment before and it's always been pretty straightforward, so I had no real worries.

I chose for them, as I had frequently lately, to use Drupal as the core CMS for the project. Drupal core fit their needs well and has tools to allow them to update content quickly and easily, very few additional modules were necessary for anything other than SEO and a theme.

I quickly found out that the installer for Drupal stops cold if it sees register_globals enabled and will not allow installation to continue.

In some PHP environments you can just create a local php.ini file and disable them yourself by adding the text "register_globals = Off" to the file and uploading it to the install directory. This did not work in my case. If you are dead set on installing Drupal, register_globals not withstanding, you will need to manually run the SQL file to install tables, edit the settings.php file for MySQL access, and create the "files" directory inside the site/domain directory, and CHMOD to 0777. From that point on the site will function correctly, but, any time you are in the administration section, you will be alerted that there is a problem with the install. That problem will persist as long as register_globals is enabled.

The security issues are related to cross site scripting attacks. The attackes can be executed on theme .tpl.php files with specifically created links. So it is still in your best interest to find a way to disable these register_globals before going into production with such an install.

Drupal's .htaccess attempts to disable register_globals, but it does not work in every configuration, if php.ini and .htaccess fails, check your host's control panel, or contact your host's support team to have it disabled.

For instructions on disabling register_globals see this post on drupal.org.