Appnovation Technologies
AppnoVision, Episode #2: top 5 hackers of all time!!
Well here we go with the release of Episode #2 of AppnoVision, our newest web show bringing you all the hottest and exciting news from the technology world!
Episode 2 takes a look at the top 5 hackers of all time which include: Kevin Paulson, Robert Tappan Morris, Jonathan James, Adrian Lamo, and the notorious Kevin Mitnick.
Also, there is some great Drupal news about NowPublic.com in the show, so make sure to check it out.
The forces of Alfresco and Drupal combined!
Recently, we have been working on developing the Appnovation Applicant Tracking System, and also looking around to find solutions to the problem on how we can formalize the processes that involve human interaction. Especially since this kind of interaction involves documents such as pdf or data entered by users and follows a "workfolw".
The basic workflow of the system is that when an Appnovation administrator posts a new job entry in the Drupal node, Alfresco CMIS API will create a job folder for the new job entry and all applicants' meta data such as: first/last name or email address, attached documents, such as resumes or cover letters will be stored in this folder. And then the application will be reviewed by Project Manager, Sr. Developer or CEO and based on each state, the applicant's data will be moved from one to the other. In every step, each user will receive proper email messages or tasks.
Get your Drupal site some traffic
First of all, in order to get lots of traffic to your site you need to design an attractive Drupal site. Spend the extra dollar for a great design and you will see your returns from the community in no time. I see a good drupal site as being a large part of SEO; if the site is not usable or does not draw attention, it won't encourage users to return to the site.
To help avoid this problem, and encourage traffic, my tip is to submit your site to design galleries. For instance, you get your website listed on some of the most popular CSS Galleries, you will be drawing in 1000+ hits on that day, which eventually spreads the word and brings more galleries to list you. This not only draws in a new crowd but it also keeps the regularers visiting your site. Some of the largest CSS galleries are http://www.cssmania.com and http://bestwebgallery.com. But not to worry, there are tons of other galleries that are great, and the best part is you can submit your website for FREE!
Now, for those drupal sites, you can get a focus audience of Drupal developers and designers. Here is a list of my favorite Drupal CMS Showcase websites that you can submit your site to:
First Ever Alfresco Event in Vancouver
On November 12th, we will be hosting Vancouver's first ever Alfresco event. Luis Sala, Alfresco's Product Evangelist, Nancy Garrity, Alfresco's Community Director and David Walker, Alfresco Channel Development will be presenting at the event. Take a look at http://www.alfresco.com/about/people/ for more information on their bio.
The event will feature sessions and demos for both the Web Content Management and Document Management side of Alfresco. There will also be a session on integrating Alfresco and Drupal, including how we use Alfresco as an applicant tracking system for managing job applicants.
Event Details:
Date: November 12th
Time: 6pm- 9pm
Address: Canvas Lounge, 99 Power St, Vancouver, Canada
Register Here: http://www.appnovation.com/register
Views preprocessors in module files
We've all used pre-processors to modify data before it reaches the template file to be printed. These pre-processors are usually defined in template.php with a corresponding template file within the themes folder. The views module is quite helpful because it allows others to use their own themeing files to design their own views.
I was working on a custom node module and wanted to implement views hooks, so that I can expose my tables data to views, and to create default views. Exposing the extra data from my table was relatively simple as I simply implemented the hook: hook_views_data. With this hook, I was able to setup my fields, filters, arguments, and sorting.
So now, with my exposed data ready to be used, I was ready to implement hook_views_default_views. I initially created the views through the user interface and then pasted the exported code in my hook_views_default_views implementation.
AppnoVision - Our New Web TV Show
About 3 months ago, our team here at Appnovation Technologies came up with the idea of a web TV show that talks about web and mobile technologies, with a segment on each episode about Drupal. After some planning and implementation, we have finally made that happen.
The first episode of AppnoVision is about web sites and web applications which can enhance public safety and public health. Some sites that have talked about in the show include:
CrimeWeb.net: A web site for sharing information about crimes and missing people.
Who is Sick: A web application for showing the heat maps of people with cold, flu and digestive infection symptoms.
For the Drupal Time section (starts at 3 minutes and 10 seconds), we talked about the Drupal 7 roadmap.
Make Life Easier: jQuery Plugins
With many of my past projects, I did have trouble adding little additions to sites to help make them more user friendly. For instance, adding help text for input boxes and/or organizing text with sliders and tabs, all make the user’s visit a lot easier. Over time I learned how to add such helpful additions with jQuery, and what can I tell you, it works like a charm! However, there are many plugins out there that offer the same things, so why reinvent the wheel?
One of these libraries I’ve come across is the Hint plugin. Basically it utilizes the title attribute of an input text box and adds the show/hide functions to the focus and blur events on the textbox for you. All you need to do is call the hint function on the selected textfield. You can also select multiple textfields and call hint to add the focus and blur events as well.
Creating nodes programmatically that have CCK image fields in Drupal 6
When creating nodes programmatically it's easy enough to give the node a
title, body, and type by using the following:
$node = new stdClass();
$node->title = 'title';
$node->body = 'body text';
$node->type = 'type';
These are simple properties that ALL nodes will have. What about nodes with CCK fields attached to them? Well for text fields we can simply use the following:
$node = new stdClass();
$node->title = 'title';
$node->body = 'body text';
$node->type = 'type';
$node->$field_name[0]['value'] = 'TEXT'
Where $field_name can take place of the internal CCK field name (field_XXX_XXX)
That covers the text fields but what about images? Here's a little background on the situation that was put infront of me. I had images on a different server which I needed to attach to an image field on one of our content types. So I used a combination of cURL and a CCK function in order to attach the images to the nodes.
Classy Captions with jQuery and FCKEditor
Let's say you have a news article content type and you use FCKEditor so your non-html savvy publisher can post a story with some basic formatting. One thing they will have difficulty doing is creating a caption for any images they insert into the body. This is not to say that they couldn't just bold some text below the photo and call that the caption, but this just isn't ideal. There is no relationship between the caption and image this way.
You could just switch off FCKEditor and stick a p tag with a class below the image, but if you've ever used FCKEditor you know how ugly and unmanageable this can be. And, still there is no real 'relationship' between these two.
Here's an elegant solution. How about re-purposing the img's "alt" attribute? After all, the "alt" attribute on an image is supposed to describe what the image is. There is no character limit, and these can make great captions. Here's how you can easily set up captions in your news articles.
First you'll want to create a class called ".caption". You can style it however you want, just be sure that it doesn't have any top margin so it stays flush to the image.
October Drupal Meetup in Vancouver
We will be hosting the October Vancouver Drupal Meetup at our office at L200-560 Beatty Street, Vancouver, BC. You can see our location on a Google map here: http://www.appnovation.com/contact. The focus of the meetup will be "Information Architecture for Drupal".
Vanessa Turke (www.vanessaturke.net) will talk about how implementing a fresh design or new CMS without giving some significant thought to the organization of the actual content of the site can be a costly mistake – a new look or a new system is not a fix for a poorly-structured website with boring content! Vanessa discuss hows how some careful planning at the beginning of the process can help.
We'll also have a small case study of VancouverObserver.com, and a general Q & A session.
For those who don't need to leave right away there's typically a more social discussion at a local pub afterwards.
For more information, please go to http://groups.drupal.org/node/28528.
Drupal and SVN
Alot of our clients tend to ask how we would manage sites across multiple servers or how we would maintain the code on the live site to make sure it is identical to the development environment. For our purposes, svn has served us very well and that is our general practice here for all our projects. Personally I find the interfaces (both gui and command line) to be quite intuitive. It is an invaluable tool in our development process and makes the job much easier, especially when clients request multiple deployments of the same site over different servers. The trick is maintaining the Drupal database but that in itself is a whole other post.
Installing svn on DEB based servers (ubuntu, Debian) uses this command
apt-get install subversion
while redhat servers use
yum install subversion
and the command to create the repository is simply
svnadmin create repository_name
Date Display in Webform Emails
In a recent project, we used the date component in webforms (http://drupal.org/project/webform) to create custom date-related fields. One problem we came across was that some of the dates were not shown correctly in the emails sent by the webform although they looked fine in web pages.
5 Things We Forget To Theme In Drupal
The more you work with clients and/or on projects, attention to details grows on you as a designer. As designers, there are times when we leave out important pages or some minor details, which make a site brilliant!!
Here are 5 things that I forget to theme, or just forgot about due to time constraints.
1. 404 Error page
There are modules such as logintoboggin out there to avoid these problems, but the way to create a custom 404 error is simple. Navigate to /admin/settings/error-reporting and point your 404 error page to a custom page.
There are some great "404 error pages" and some even put a smile on your user’s face. Here are some examples of my favourites:


Upgrading from Drupal 4 to Drupal 6 - Converting Flexinode to CCK
When I was upgrading a site from Drupal 4 to Drupal 6, I had also to convert Flexinodes to CCK nodes. Luckily, there is a module that serves this purpose, and you can find it here: http://drupal.org/project/flexiconvert. As you can see, there are 2 versions of this converter - for 4.7.x-0.3 and 5.x-0.3.
I expected that it would be easier to upgrade Flexinode module v.4 to v.5 and when the module upgrades then convert Flexinode to CCK. As recommended, I CAREFULLY read the instructions in readme.txt and converted my flexinodes to CCK. At the first glance it worked like a charm. On the second - I found out that even the new node types were nicely created, but the data itself, for image fields, was not imported (sorry, I already do not remember what exactly was lost).
Another thing to mention here is to make sure you have nice flexinodes' names. Check this: SELECT name FROM `flexinode_type` - in my case one of the names was "page + take action", and no wonder that I get SQL error during the conversion when the Converter tried to create a column name with "+" in it.
Websites that are surprisingly Drupal based
Sites that are Drupal based that you might not know about.
1. Michael Jackson’s Web Site ( http://www.michaeljackson.com/us/home )
A legend has passed but “his music will live forever.” Something that will keep his memories alive is his Drupal based website.
2. Universal Music ( http://universalmusic.com )
A big name in music, the best way to put it out is by using Drupal, one of the leading Content Management System (CMS) available.
3. Vancouver Aquarium ( http://www.vanaqua.org )
Vancouver Aquarium is one of my favorite places to visit. One day when I was checking for tickets online, I was surprised to see that their website was done in Drupal.
4. FLEX ( http://flex.org )
FLEX, what else I can say, I don`t think you even need to test if this site is really in Drupal or not because of the layout. Very familiar don’t you think? *wink wink
Upgrading Drupal 5 to Drupal 6 in Detail
I worked on a project that required me to upgrade an existing Drupal 5 website to Drupal 6. After researching on how to tackle this project, I found a great tutorial on drupal.org, http://drupal.org/videocasts/upgrading-to-6. Just like any software development, I broke this problem into managable pieces and started tackling them one by one. Before starting the upgrade, I setup a repository of this Drupal 5 instance and created a database snapshot. After each step of the process, I created a snapshot of the database and "commited" any file changes to the repository. From this, I was able to keep track of my progress, and I was able to revert to the previous state of the site in case something was to happen.
Here are the following steps to update a Drupal 5 website to Drupal 6:
1.Update your site to the latest Drupal 5 release and run update scripts, if any.
2.Go through all your contributed modules and check to see if they need to be updated to the latest Drupal 5 release before upgrading to the Drupal 6 version.
10 Must Have Drupal Modules
Drupal is great with not only its flexibility, but also with how easily it can be customized to your needs by adding a free module from drupal.org. However, it could be overwhelming for beginners to find the modules that best fit their needs. Therefore, here is a little help:
The Appnovation Must Have Modules List!
1- Administration Menu
The Administration Menu module is a great time saver! It creates a theme independent CSS-based menu on the top of the page with quick access to the most important administrative tasks.
2- FCKeditor - WYSIWYG HTML editor
Chances are that your client won’t want to be adding html tags to its content. Most people would rather use any sort of visual text editor then adding tags manually. FCKeditor is a great solution for those cases! It replaces Drupal's text areas with a user friendly WYSIWYG HTML editor.
The Drupal Quiz Module
My first experience with the Quiz module was amusing, to say the least. A project, which I had just finished, required registered users to be able to take different quizzes and successfully complete them in order to receive a certificate. I turned to the quiz module to avoid any custom coding. Overall, I was able to do what I needed. However, below I have listed three issues I had ran into:
1. No import/export of quizzes.
Webform Pagebreaks Infringing on Salesforce Submissions
For a recent Drupal 6 project, we used Webform (http://drupal.org/project/webform), Salesforce (http://drupal.org/project/salesforce), and Salesforce Webform Integration (http://drupal.org/project/sf_webform) modules to create a custom form to send user data to Salesforce.com. Since the form was too long, we used the pagebreak component in webform to break the form into multiple pages. This not only improves the visual effects of a long form but it's also more clear when the form is made up of different sections.
On the other hand, we found that the form would try to submit partial data to Salesforce when we would click the 'Next Page' button. This was not what we were expecting.
Due to this problem, we had to turn to javascript to create the same 'Next Page' effect in a webform. We used JQuery to show and hide particular parts of the form when 'Next Page' (which can be a markup) was clicked. The javascript code was added to the form using the 'drupal_add_js' method. This way, the whole form data would be sent to Salesforce when a user clicks the 'Submit' button at the end of the form.
Building File Management Site with Drupal
I recently came across an article about 16 Different Clones you can Build with Drupal. I have seen most of the clones on the list such as Digg clones and Facebook clones. The one clone that I have not seen is a file management web site clone.
In the past we have built a lot of projects using Amazon S3 and the Media Mover module mentions in the post. We have however only used that for basic document management to support content editing, as oppose to building a complete site like Box.net.
This article reminds me of a recent email discussion in the IT mailing list of the University of Chicago where there is a question about a Drupal theme to build a file management site. Back then the discussion pointed towards using Alfresco as the document manager.



