Blogs

By Daniel Truninger 15th May 2013 Business

Our Managing Director Greg welcomed a class of Bachelor students from HEC Montréal. They came to learn how the cookie crumbles in Switzerland's web development industry and fork up some entrepreneurial spirit. Merci pour la visite and good luck with the completion of your academic path!

By Boris Baldinger 8th May 2013 Drupal

Views is a great module and as you'll probably know it is the most downloaded module in Drupal's history. The possibilities which Views provides you with are almost endless but there is one limitation. The generated output of a view is by default static. What if you want to have a dynamic activity stream as you know it from Twitter or Facebook?

Allow Drupal's unofficial slogan to answer that question: There is a module for that! The module in question is "Views Hacks" and contains another module called "Views Auto-Refresh". There is a blog post about how to implement this module in order to get it to work as you want to, but it seems like this post doesn't cover all of the aspects that are implemented in the "dev"-version. A follow up blog post offers a little more insight, but still not everything I needed.

On a side note: In this tutorial we will use the "dev"-version of "Views Hacks", because the alpha was buggy at the time, and the implementation of the JavaScript part is not in the Drupal way anymore.

Preparation

Views autorefreshb

Let's get started with the implementation. I assume that you have downloaded, installed and activated Views, Views UI, Views Hacks and Views Auto-Refresh. Further I assume that you have created a view for which you want to use the auto-refresh feature.

I will demonstrate the implementation of Views Auto-Refresh by showing screenshots of the actual project.

Implementation

Views autorefresh

Make the following configurations:

  • First of all, you need to duplicate your actual view as a view page. Give it a semantic name like "autorefresh".
  • Give the page a unique path as displayed in the screenshot above.
  • Also give an easy-to-remember machine name.
  • Make sure that the view is using AJAX.
  • Add the Content: Post date (with operator) or any other timestamp as a contextual filter (we used the "Content: Updated date"). Views Auto-Refresh will provide the timestamp needed.

Now head over to your view and add a "Global: Text area" with the text format "PHP Code" and add following code:

<?php
print theme('views_autorefresh', array('interval' => '30000', 'incremental'=> array(
  'view_base_path' => 'frontpage/autorefresh',
  'view_display_id' => 'autorefresh',
  'view_name' => 'articles',
  'sourceSelector' => '.view-content',
  'targetSelector' => '.view-content',
  'firstClass' => 'views-row-first',
  'lastClass' => 'views-row-last',
  'oddClass' => 'views-row-odd',
  'evenClass' => 'views-row-even',
)));
?>
Views autorefresh
 
As you can see, there is a base path and a display ID.
The base path equals your defined page path, and the display ID equals the Machine name of the auto-refresh View.
"interval" defines how often the auto-refresh View is being called while "view_name" is the machine name of the actual view.

The additional settings are the selectors and classes which will be addressed by the JavaScript of Views Auto-Refresh. I don't want to dig too deep since they should be self describing.

Now you might think that everything is done. But no, wait, we have to add the same code to the header of your original view. So do the same thing there as I have described it above. Please make sure that this view also uses AJAX, else it wouldn't work.

Further possibilities

In our project we use the jQuery library Isotope which sorts all the posts dynamically on loading or resizing. But you have to trigger the re-layout of the page if the Views Auto-Refresh has delivered some new posts. This is really simple and straight forward. You just have to add a Drupal behavior in your JavaScript like this:

/**
 * Add functionality to trigger reloadItems after an autorefresh
 */
  Drupal.behaviors.triggerIsotopeAfterAutorefresh = {
    attach: function(context, settings){
      $('.view-id-articles').bind('autorefresh.incremental', function() {
          //getting the content/context
          $isotope = $('.view-id-articles .view-content');
          //reload all items by original order
          $isotope.isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });
      });
   }
  }

As you can see, you can just bind the event 'autorefresh.incremental' to execute your own code. 'autorefresh.incremental' is fired every time the Views Auto-Refresh module loads the designated view.

Conclusion

After a few trial and error attempts, I finally figured out how Views Auto-Refresh really worked. There is a lot more to this module that isn't documented. So it is much more powerful than I can describe in only one blog post. So go on and give it a go.

Update 9.5.2013: As pointed out by Phil Dodd in his comment the Views Auto Refresh module has been moved to its own home at http://drupal.org/project/views_autorefresh.

 

This week's edition takes a look at the following subjects: What life is like without the internet, Switzerland's new top-level domain and interesting mobile related sessions at the forthcoming DrupalCon. Enjoy!

Food for thought

The Verge: I’m still here: back online after a year without the internet
Paul Miller, a Senior Editor at the Verge, decided twelve months ago to leave the internet for a year. This week he reflects on his experiences.

Switzerland

admin.ch: Green light for implementation of .swiss internet domain names
The Swiss Government announced its outlook on the handling of the .swiss top-level domain. You can expect to see it in the wild in late 2014.

Little Helper

Responsive Inspector
If Chrome is your browser of choice this plugin promises to be quite handy while developing responsive websites.

Drupal

Four Kitchens: DrupalCon Portland: Mobile Roundup
DrupalCon Portland is only a few weeks away. To get the most out of the mobile and responsive design topics at the conference, Four Kitchens' Ian Carrico has created an overview of the sessions you shouldn not  miss. 

Tweets that cut through the noise

Usability testing 101 one would assume.

Stay in touch – join our newsletter!

 

 

Please note: The Essence of a web week series will take a fortnight's break.

By Daniel Truninger 2nd May 2013 Business, Team

Diligent followers of our social media activities will have noticed that we moved out of Technopark. The meticulous planned conversion of the location, it used to be a Restaurant, went to plan and we are pleased to share some impressions of our new home at Förrlibuckstrasse 30

We hope you like it. We are head over heels in love with it.
 

Further images can be found on our Facebook page

Besides moving to our new office these additional four things caught our attention. Enjoy!

Drupal

Forum One: Drupal is Among the Big Boys in Open Source Communities
A recent survey by Black Duck Software concluded that Drupal doesn't have to be modest when comparing itself with other open source communities. With 25,146 contributes it easily outnumbers projects like Apache and Mozilla.

Opinion

.net magazine: 5 reasons why the web tracking debate matters
Keith Butters gives his view on why the web tracking debate is relevant to a broader audience than you might think.

Design

Smashing Magazine: Repurposing Photoshop For The Web
Dan Rose might have found a middle way in the dogmatic battle between designing in the browser and designing in Photoshop.

Tweets that cut through the noise

 

Behind the Scenes

We moved in to our new office on Friday. This photo by our developer Boris Baldinger captured the calm before the storm.

By Daniel Truninger 23rd April 2013 Events


(Photo: Pedro Lozano)

The 2nd edition of Switzerland's trade fair for Internet, e-commerce, social media and online marketing ONE will take place on the 15 and 16 of May in Zurich. Like last year there will be a technology conference simultaneously taking place.  At this conference our Head Technology Michael Schmid will be presenting in the Thursday afternoon slot.

With a further year's experience under his belt he will follow up on last year's "Responsive Web Design: Implementierung Dos & Don'ts" presentation. Having successfully released several responsive sites in the last twelve months, he will be able to provide valuable information on what to expect when launching a device agnostic site.

The other three presentations feature subjects like usability and esthetics, mobile first and what users love and hate.

If you want to attend his and the other presentations in that slot you can either purchase a ticket or try your luck in our giveaway.

For your chance to win a free admission (worth CHF 295) to the "Mobile Trends Konferenz" simply subscribe for our newsletter. The winner will be picked among all Newsletter subscribers by Monday 13 May at lunch time (CET). Good luck!

Subscribe to newsletter

 

This week the following stories caught our attention. Enjoy!

Marketing

Mashable: 'Epicurious' Enrages Followers With Boston Bombings Tweets
In the aftermath of Monday's horrific events at the Boston Marathon one brand managed to outsmart itself. It just makes you wonder why showing poor taste during tragedies repeatedly appears to be a "great opportunity" to spread you message.

Design

.net magazine: Hover is dead, long live hover
Advancement in technology can mean the decline of a trusted friend. This article takes a look at destiny of hover states.

Medium: Why you should move that button 3px to the left
Braden Kowitz argues that as fussy as pointing out minor design bugs might appear, in the big picture it can make a difference. Nevertheless it has to be a long-term mindset and not just about pothole fixing.

Drupal

Cafuego: Sponsorship Success Metric
Peter Lieverdink, a Melbourne based Drupal contributor, gives an alternative view why sponsoring a DrupalCon isn't a waste of money.

Behind the Scenes

Less than one week to go...

Stay in touch – join our newsletter!

 

 

By Kathryn McClintock 13th April 2013 Drupal

This past weekend (April 13th & 14th) was the 2nd-annual Frontend United Conference. Last year it was held in Amsterdam — this year in London (at a hip, laid-back venue called Cargo). And as the Brits would say: It was brilliant!

Frontend United is geared towards frontend devs looking to sharpen their theming skills and learn new technologies in the frontend world of Drupal.

The conference has a different feel than a typical DrupalCon, despite a similar scheduling format. Because the event is smaller and narrowly focused, attendees share many interests and questions pertaining to their jobs. The talks are extra-relevant and timely. And because the conference is tailored to a very specific type of "Drupalista," the sessions are more conceptual, innovative, and advanced.

The following images are a few nice visuals taken from the conference:

Above, Lewis Nyman begins his presentation on Responsive Web Design, during which he suggests, "Split individual page design into manageable areas: layout, content, and aesthetics."

This dark and moody shot is from @MortenDK's "Angry Themer" session, although Morten admits he has become less "angry" with the introduction of Twig in Drupal 8. Yeah, it is going to be THAT awesome. :)

Here, Leisa Reichelt shares the workflow changes she's instated during her career working alongside organizations to help improve their online customer experiences. This session was especially inspiring as she made some excellent, real-world cases for re-evaulating your company's current project processes. She concludes a frontend developer can be a real asset to an information architect during the wire-framing and design phase.

And just for fun, here are a few more photographic take-aways:

Rosemary Lane, a fantastic dining experience and Saturday evening full of wonderful company and new friends.

Graffiti outside Cargo — the full text reads "SCARY." :)

For more pictures of the weekend make sure to check out the Flickr-set, while other media of the event can be found here. And for any news related to next year's conference... I suggest you keep an eye on the Frontend United website.

This week's five stories stem from the world of finance, technology and marketing. Hopefully something down your lane. Enjoy!

Finance

If you didn't get the buzz surrounding Bitcoin this week, Duncan Elms' excellent explanation will bring you up to date. For the ones new to the financial markets we'd like to add this article on the Tulip Mania.

Zurich

Züri wie neu
In late 2010 Zurich's city council launched an e-participation contest where all citizens were invited to contribute their ideas. This week one of the winning project suggestions, a "FixMyStreet" for Zurich, was released.  

Technology

Google Street View Hyperlapse
Hyperlapse videos, an evolution out of the traditional time lapse video, are certainly a growing trend. The guys from Teehan+Lax tried to merge the technique with Google Street View and clearly succeeded in doing so. Try it, it's fun.

Opinion

.net Magazine: What the new TLDs mean for brands and consumers
Later this year a bunch of new top-level domains (TLD) make their public appearance on the world wide web. Roland LaPlante, Chief Marketing Officer at Afilias, gives his view on the significance of the possibilities.

Tweets that cut through the noise

Spot on, Sir!

 

Stay in touch – join our newsletter!

 

 

By Daniel Truninger 12th April 2013 Business, Drupal

We're happy to announce the launch of a new client project: Switzerland Global Enterprise.

Despite the successful partnership we have barely shed any light into the work we have done for this great organization. Formerly known as OSEC, the organization represents the interests of Switzerland's export industry, import program and in a third function manages the country's location promotion efforts. In order to streamline the public appearance of these units, the organization opted to rebrand.

From a technical point of view the trusted foundation of Drupal 6 only underwent minor changes, since the focus of this release lays on the necessary adjustments to meet the organization's new corporate design.

Since the page's initial release, a blog with enhanced community features, it has grown to handle 35,000 nodes in four different languages. In the meantime it has incorporated the organization's old web site in order to become their main presence on the world wide web. This makes Switzerland Global Enterprise the perfect show case to illustrate the versatility which Drupal possesses.

Pages

Subscribe to Amazee Labs Blog

Latest comments

  • home business software programs's picture

    Good day! I simply wish to give a huge thumbs up for the nice info
    you have got here on this post. I will probably be coming again to your weblog for more soon.

    home business s...
  • Agentur Typo3 Programmierung at Steilstarter's picture

    Hello,

    I must say that you are going great. you are sharing your information with us so thanks for that.

    Agentur Typo3 P...
  • Daniel's picture

    By the way, by "no documentation" I´m referring to Views Autorefresh. It is either not complete or conflicting.

    Daniel