Archive

Author Archive

How to add a custom login box into your Drupal theme

February 8th, 2010

This is a guest post by Nathan, our resident Drupal expert. With luck, it will be the first of a series of posts with a more technical nature than we usually write about here. You can read more of Nathan’s work here: http://bomshteyn.com.

We are starting a new series called Drupal hacks and solutions. This is going to be a useful collection of how-to’s and code examples, based on our experiences.

I am sure every Drupal developer out there has his own ways of styling Drupal (which as http://bomshteyn.com/2010/01/03/should-you-use-wordpress-or-drupal/ discussed is not always an easy task), we are just going to write up the cases that we encountered and solutions we used.

As always there is an easy way to do something and a proper Drupal way of doing the exact same thing. Whenever possible we try to do it the Drupal way, and would advise you to do the same, but i have to admit thats not always the case, and i would sometimes insert a SQL query into a template instead of properly using a drupal function of some sort.

It’s almost a year now since I started working on our first Drupal site; over time I have learned, and continue to learn, new “proper” ways of programming in Drupal and working “with it” versus “around it”.

As you work on a project you have a problem and find a solution, but by the time you get around to the next project and encounter a similar or even same problem (the latest project we were working on was approximately 400 of programming hours) you no longer remember how you solved it last time. In theory you could just open the last project’s code and find the solution, but sometimes its easier said then done, first you have to remember in which project you had this issue and second since an issue in Drupal could be fixed on so many levels (core, theme, modules….), where to look becomes an issue by-itself.

So here we are faced with a case of our own that needs a solution.

Our first urge was to create an internal wiki where we would write down this type of stuff for future use – knowing first hand how hard it is to find an up-to-date solution to some very common problems in theming Drupal. Plus the fact that we always wanted to give back to the open source community of Drupal. We decided to do it as a blog category on our site so that it would be searchable – not just internally but by the whole ever growing Drupal community. As a starting point we will give you an example post, so that you know what to expect.

How to add a custom login box into your Drupal theme

You will probably want to show this only for non logged in users so here is an example of the code you would use:

<?php
if($logged_in){?>
// put some code here
<?php } else {?>
<?php  global $user; ?>
<form action=”<?php print $front_page.’user/login/?’.drupal_get_destination();?>” method=”post” id=”user-login”>
<label for=”edit-name”>username</label>
<input type=”text” name=”name” id=”edit-name” value=”" tabindex=”1″/>
<label for=”edit-pass”>password</label>
<input type=”password” name=”pass” id=”edit-pass” tabindex=”2″/>
<input type=”hidden” name=”form_id” id=”edit-user-login” value=”user_login” />
<input type=”submit” name=”op” id=”edit-submit” tabindex=”3″ value=”Submit” alt=”Submit” />
<p>Forgot <a href=”/user/password”>password</a>? &nbsp; Or <a href=”/user/register”>Create New Account</a></p>
</form>
<?php }?>

If you like this article, please share it with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • MySpace
Author: Jeremy Lichtman Categories: Drupal Tags:

Business Lessons From Farmville – Part 3

January 18th, 2010

Continued from Part 2 – http://lichtman.ca/articles/business-lessons-from-farmville-%E2%80%93-part-2.  In Part 2 we discussed the publicity and communal aspects of building a successful viral application, with examples from Zynga’s Farmville game.

3. Manage Scalability

Like all rapidly growing applications, Farmville has scalability issues – as of this writing, they are working on a serious issue pertaining to how the application loads.

Any rapidly growing application has a tendency to run up against physical limits to both the design of the application and also the underlying hardware on which it is running. The result is that at each order of magnitude of growth in traffic, significant work may be required in order to redesign the application. In the meantime, it isn’t uncommon for these kinds of apps to have outages, extreme slowness, or bizarre and unscripted behaviour.

What Zynga has done is to appropriately deal with user expectations: firstly be explaining what the situation is, and secondly by compensating users (in this case via free game items) for the irritation. It is surprising how many companies will try to either hide or deny outages due to scalability issues.

4. Make Money

Making money out of a busy website or application is harder than it may seem.

The “throw something up on the web and put ads on it” model hasn’t worked well in a number of years (yes, I also know a few people still successfully doing this – just try duplicating it from scratch now).

This means that a company that is successfully making money online is worth analyzing in more detail. I don’t know how much Zynga is making (they’re a private company), but from what I’ve read they’re profitable.

Say what you want about the morality of selling virtual items via micropayments, the model appears to work well – at least for the most addictive of online games.

Farmville has two types of internal “currency” for purchasing items in the game:

One type of currency is easily earned within the game, and can be used to purchase the most common items.

The “premium” currency – which is usually obtained through a micropayment (although small quantities of it now circulate within the game as well) – can be used to purchase a variety of premium items that either make game play easier, or convey some form of status.

This model allows people to play the game without having to buy anything, while allowing the most enthusiastic players to essentially subsidize everyone else.

This “freemium” business model works at a similar psychological level to the old “shareware” software licenses – people can use it for free, but also feel like there is some level of obligation to pay, based on their own perceived value of the app.

5. Multiply

On a fickle internet, success may be fleeting.

If a website attracts significant traffic – and money – they need to immediately start planning the next step.

It appears that Zynga realizes that there may be inherent limits to how big a specific web game can get, and that their approach also includes the notion of continually duplicating their success with new games – particularly using cross-pollination approaches such as using familiar characters.

Duplicating a successful methodology over and over can be a useful means of sustaining viral success – particularly if one is skilled at redirecting existing “customers” to the next big thing. By building all of their games around a standard platform – in this case Facebook – the development time to create new apps is reduced. There is also a consistant user interface between the apps, allowing for faster user adoption.

If you play Farmville, you will quickly notice that Zynga has posted advertising at the top of each page for their other games. The objective is to “cross-pollinate” the user list from their various games (my understanding is that they are now running a large number of games on Facebook and other platforms).

One trick – which they don’t seem to be using right now – would be to allow users to utilize the same game currency across all of the games on their platform. I’ve seen this used in practice elsewhere.

Two last things that they appear to be doing well: a)  Zynga developed certain iconic characters for Farmville (i.e. the cartoon animals), and they have used these animals (and similar characters) in other apps that are directly marketed to the users of Farmville. In addition, b) they rapidly create competing products whenever another development team builds a game that could move into their marketspace – and they make an effort to improve on the original. The second company into a market can do very nicely indeed – just think of the Beta vs VHS wars.

In the final part of this article, I will wrap things up and provide some other examples from other businesses. To be continued…

If you like this article, please share it with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • MySpace
Author: Jeremy Lichtman Categories: Articles, Social Media Tags:

Business Lessons From Farmville – Part 2

January 14th, 2010

Continued from Part 1 – http://lichtman.ca/articles/business-lessons-from-farmville-part-1. In Part 1 we discussed the idea that there are business lessons that can be learned from viral games such as Zynga’s Farmville.

2. Let Everybody Know

If you’re on Facebook, you are familiar with the extent to which Farmville pesters people who aren’t already playing it. I had actually blocked the application at one point, and only logged in after reading about how it had attracted 70 million users on a mainstream press website – which actually proves the idea that in advertising, repeating your message ad nauseum actually does pay off. Eventually.

What Zynga have done with Farmville is create a system that provides an immense number of opportunities for people who are already using the game to gain by telling other people about it. In addition to bugging people who aren’t already playing, it also provides – as mentioned above – innumerable ways of reminding people who are already playing it about its existence. This can be irritating, but it is clearly an exceedingly effective methodology for growing traffic.

A small number of the methods that they use to spread the news include:

  • Constantly requesting users to post announcements to their “streams” – every time a user achieves a milestone in the game – no matter how small – Farmville asks the user if they want to place a post on their stream (the list of updates shared between “friends” on Facebook). These announcements are essentially sales referrals – if somebody not playing the game sees hundreds of such announcements from their friends, possibly it may pique their interest.
  • Many posts from Farmville contain image “snapshots” of what a user’s farm looks like. These follow the notion of “show me, don’t tell me” – a picture is worth a whole lot of verbiage.

3. Build a Community

As mentioned briefly in Part 1, the notion of a community is very powerful in social networking applications. If the people that you are friendly with are all involved in a particular community, not only are you more likely to join, but you’re also much less likely to leave. Real world examples include religious institutions, multi-level marketing organizations, social clubs, charities etc etc. Many such organizations fulfill a social role in addition to any other role they may play, and for their participants this can be a powerful motivator.

The vast majority of online social applications pay lip service to the communal role – but in actuality they provide little incentive (or supportive functionality for that matter) for people to actually interact with each other.

One of the key reasons why Farmville has been so successful is that the communal aspect has been so well thought out – not only are there endless ways for people to interact in the game – it is difficult to progress without doing so. A few examples (and there are probably dozens of others) follow:

  • Neighbours – the game plays up the folksy notion of farmers chatting over a picket fence. Members can add other players as virtual neighbours in the game, and thereafter the game visually renders the neighbouring farms next to the player’s farm. Players are encouraged to visit their neighbour’s farms, and to participate in building up those farms via simple tasks (fertilizing their crops), for which they score points.
  • Many items in the game cannot be purchased from the “market” directly – they can only be given as gifts. Players are encouraged to give such gifts to their neighbours, and the receipt of such items triggers a polite request to send something back.
  • An interesting recent feature – barn raising. A player wishing to build a “barn” with which to store items can pay for the barn directly – or get it for free if ten of their neighbours are willing to help them. The process involves a large amount of voluntary messaging being posted to streams – and people’s in-boxes.

[To be continued in Part 3...]

If you like this article, please share it with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • MySpace

Business Lessons From Farmville – Part 1

January 10th, 2010

Day 312/365 - 8 Nov - FarmVille
Image by anshu_si via Flickr

I’m not generally recommending that you drop everything and play Farmville, but there are some interesting business lessons to be learned from the game. Possibly this blog entry will save you massive amounts of time – i.e. you can simply read on, rather than playing.

If you’re on Facebook, you’ve probably already been pestered by notifications from a game called Farmville, created by a company called Zynga. Possibly you’re already playing the game yourself. Over the past few months, the number of people playing the game has exceeded 70 million – for comparison’s sake, this is roughly the same as the total number of people using Twitter. Clearly they’re doing something interesting.

Generally speaking, Farmville falls under the category of “viral applications”. A viral app is one that seems to spread uncontrollably – just like a cold or flu bug does.

The key to “virality” has been documented elsewhere to great effect (just visit your local library or favourite guerrilla  marketing blog):

  • create something that is going to keep people interested (what’s usually called “stickiness”).
  • make sure that using it will work even better if the user tells their friends about it.
  • seed the application, website, or whatever with an initial set of users – probably friends of the owner.
  • watch it grow.
  • deal with scalability issues
  • figure out how to make money (!)
  • reproduce / duplicate the effect elsewhere

Very few applications make it to the final step, and there is definitely at least some element of luck involved – I’ve seen some great ideas fall flat for no apparent reason.

What Zynga has done though is a very interesting example of a successful viral application, and there are a number of attributes that can be used elsewhere – not necessarily for games either.

1. Keep People Interested

The notion of keeping people constantly interested in an application is very helpful in building a virally marketed website or game. The longer a person’s attention is on something, the more opportunities the makers have to get them to tell other people about it, as well as there being more likelihood of selling the user something. Keeping people interested is not conceptually hard, but can be difficult to implement in practice; I’m seen a great many websites fall short in this regard. “Viral” without “sticky” often equals “flop”.

Zynga have done a few interesting things with regards to holding people’s attention. Some of them are general rules from the game builder’s playbook, and thus aren’t transferable to all products or services.

Some of the tactics include constantly changing items, seasonally based differences in the appearance of the game, new functionality as a user progresses in level, randomization (things like animals moving around on their own) – these are all things common to many successful online games. Maintaining a stream of new activity is actually quite difficult to carry out – as I’ve discovered in the past while working on other games. There’s a certain level of perseverance involved, along with rallying the developers – most of whom are probably feeling burned out at this point (again, past experience) and keeping the creative juices flowing.

Other interest-enhancing features include their gift exchange system – I’ll talk more about this in Part 2 – which a) ensures that certain things can only be accomplished with the help of friends, and b) provides a stream of requests to players inboxes to entice them to come back repeatedly.

Two last things of note:

By building a community, where players cooperate in longer term development with each other, Farmville makes it less likely that somebody will drop out. Community formation is a powerful tool to keep people coming back over and over.

Farmville also relies on people’s nostalgia for “the simple life” – not that farming is particularly simple in actuality.  The nostalgia factor can be a powerful tool for marketing to particular market segments.

[To Be Continued...]

Reblog this post [with Zemanta]

If you like this article, please share it with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • MySpace

Services

  • Software Development
  • Web Development
  • Social Media
  • Search Engine Optimization

Partner Companies

Follow Us of Twitter