P: 1-800-664-0966 E: contact@floatsolutions.net

Featured Desktop on Lifehacker

Posted August 28th, 2008 by Aidan McQuay, No Comments

My desktop got featured on Lifehacker, one of our favortie blogs.  Click the shot above to check it out.

A Building From my Mind

Posted August 27th, 2008 by Aidan McQuay, No Comments

Share Calendars in Outlook 2007 without Exchange

Posted June 17th, 2008 by Aidan McQuay, No Comments

I was recently asked how one might go about sharing a calendar on outlook.  Having been on Thunderbird and Google apps for a while i assumed two way synchronization would be as easy as creating a public calendar and adding it to their outlook installs.  Turns out even the newest Outlook can only really publish or subscribe to ical calendars without exchange.

Here’s a step by step guide to setting up calendar sharing in Oulook 2007 without Exchange.  I know I’m not interested in paying for exchange so here’s some advice that might help if all you need to do is share calendars.

This post assumes you have access to a open webdav directory, eg; http://webdav/dir with directories set up for all your users. eg; http://webdav/dir/firstinitiallastname/

Publish Your Calendar

Subscribe to your Co-Workers Calendars

It’s not a perfect solution and really it leaves a lot to be desired compared to some of the open source group calendaring platforms, but it might work depending on your needs.  I ivestigated a number of free and otherwise alternatives but they all lacked in some ways, the only real solution to this problem is Exchange.

Blog from a Tablet PC

Posted May 28th, 2008 by Aidan McQuay, No Comments

For more info on how to do this, check out this article:

Write In Digital Ink on Your WordPress Blog with your Tablet PC

How to Get a Nice View (in Drupal)

Posted May 28th, 2008 by Aidan McQuay, No Comments

When creating custom drupal functionality its often very handy to use the views module to retrieve information for you. This way you never have to muck around with messy old sql. To do this we need to use a couple functions; views_get_view, and views_build_view. I’ll go through a simple explanation on how to use them below.

1. Get the View

The first thing we have to do is retrieve the view we want to work with. To do that we use the views_get_view and assign its return value to a variable we will use below.

$view = views_get_view('view_name');

2. Display the View

Next we have to build the view and tell drupal how we would like it to display. If you just want to display the view you will want to use one of these options:

'block' -- Produce output as a block, sent through theme.
'embed' -- Use this if you want to embed a view onto another page, 
and don't want any block or page specific things to happen to it.

Additionally you will have to tell drupal some info on how many results and what paging options you would like to use.

@param $use_pager
If set, use a pager. 

@param $limit
Required if $use_pager is set; if $limit is set and $use_pager is not, 
this will be the maximum number of records returned. 

@param $page
$use_pager is false, and $limit is !0, $page tells it what page to start on
, in case for some reason a particular section of view is needed.

So to embed the view in an existing page with 10 results and paging enabled you would do something like this:

$viewRender = views_build_view('block', $view, $argarray, 1, 10)

3. Passing Arguments

Now presumably you are doing this to display dynamic data to say a specific user or role or circumstance. To customize the results of the view you can pass arguments using views_build_view as well. To do this you have to pass an array of arguments in the third variable. Here you can see I am passing the user id to the view:

$viewItems = views_build_view('block', $view, array(0 => $user->uid), 1, 10);

3. Retrieving Variables

Now, if you need direct access to node or cck information you are going to want to use the items display type:

'items' -- return info array, except instead of result, an array of 
objects containing the results of the query.

If you pass this display type you will have direct access to node information and can access it as shown here:

//build the view
$viewItems = views_build_view('items', $view, $argarray, 1, 10);

//get cck data
$var1 = $viewItems[items][$itemid]->node_data_field_fieldname_value;

//get normal data
$var2 = $viewItems[items][$itemid]->title;

For more information on this I would recommed checking out this page from the drupal book: Using views_build_view to control your own views. Let me know if this article was helpful for you.

Contact Us





Client Login




P: 1-800-664-0966 E: contact@floatsolutions.net