Listening to In Strict Confidence - Seven Lives

Thanks Dora!

Drupal - print an "Add as a friend" link

If you are usign the user relationship module in Drupal and want to print an "Add as a friend" link somewhere in the theme, views, etc and you want to preserve the AJAX goodness this is how you do it.

[syntaxhighlighter] <?php print l(t('Add as a friend'),'relationship/'.$friend->uid.'/request/1',array('html'=> true, 'query'=> drupal_get_destination(), 'attributes'=> array('class'=>'user_relationships_popup_link'))); ?>[/syntaxhighlighter]

 

The AJAX magic is done by the class "user_relationships_popup_link'.

You should make some checks to see if the user is already a friend or if the user is logged in to see the "add friend" link. And check to see if you're not looking at your own profile, so you don't add the link for you to become your own friend.

To check if you already have a relantionship with an user use this:

if ($relationships = user_relationships_load(array('between' => array($user->uid, $friend->uid),'approved' => 0))) {
        print '<div class="user-flags">'.t('You have a pending friend request with this user').'</div>';
}

if ($relationships = user_relationships_load(array('between' => array($user->uid, $friend->uid),'approved' => 1))) {
            print '<div class="user-flags">'.t('This is a friend').'</div>';
}

$friend->uid is the UID of the user you are trying to add as a friend.

Finished Typo3 project - Waterstillar.com

I've finished working on a Typo3 project. It's online at www.waterstillar.com. I'll post more about this when I'm done working on the portfolio page.

A quick summary. It's built on Typo3 4.2.6, has 2 main templates, frontpage and a 2 column one. Most content is text and images, but also has two custom built modules. One is for the Library section, displays term definitions order by letters and the other is a gallery plugin with a jQuery 3D carousel.

The company owning the site, based in Denmark, sells Waterstillar products that help you clean the water you drink. Here's what the product does:

“A simple and effective solar distillation solution, primarily for domestic use. Can be placed on (or in) a roof and the drinking water will flow directly into the kitchen. A solar collector with a WaterStillar® unit integrated. 1 m2 will give app 20-25 litres pr day”.

Read more on Waterstillar website.

Waterstillar.com website

 

Black Strobe - I'm a man

Opera 10

Opera launched version 10 of their browsers. I like this one. Runs well, looks well and doesn't slow down like Firefox which has become almost impossible to use.

The only thing making me start Firefox now it's Firebug.

Safari and Opera perform much better. Hope DragonFly matures and becomes as easy to use as Firebug.

Canale TV romanesti online

Alta adresa unde se pot vedea posturi tv online: http://www.televiziuni-online.110mb.com

Seven sins of usability

Here is a list of seven usability mistakes:

  1. Inconsistent and confusing site navigation
  2. Difficult to scan content
  3. Misidentified and unidentified links
  4. Too much industry jargon
  5. Hidden or absent contact information
  6. Not allowing user browser control
  7. Content that looks like advertising

You can read more on NetImperator

User registration with picture in Drupal

If you want to enable user registration with picture, allowing the users to upload pictures during registration, use Register with picture module.

Simple and easy :) Just the way we like it

Typo3 - Real URL "... was not a keyword for a postVarSet as expected!"

I've just encountered a problem when trying to enable RealURL extension on a Typo3 website. I've installed the extension, links where generating ok, but I would get a "... was not a keyword for a postVarSet as expected!".

Four hours later, after countless configurations tried and modules and other stuff, I found the problem.

DJ Shadow feat. Mos Def - Six Days (remix)

I still like the song and the lyrics