Archive for février, 2010

Facebook Connect friend selector jquery plugin – première version!

fév 15 2010 Published by admin under Non classé

Suite à l’article précédent sur mes problèmes pour créer un widget permettant de sélectionner un ami facebook sur un site facebook connect, j’ai finalement créer un plugin jquery.

Vous pouvez downloader le plugin sur github.com.

Des infos (sommaires pour l’instant) sont disponibles ici. J’espère que vous allez apprécier!

One response so far

Traduction fr_FR pour le thème wordpress « Life is Simple »

fév 15 2010 Published by admin under Non classé

J’ai fait une traduction rapide du thème « life is simple » en français (fr_FR) mais certainement plus fr_CA…

Vous pouvez le télécharger ici.

À utiliser/modifier selon vos besoins!!

Ah oui, j’ai utilisé poedit pour créer les fichiers de traductions.

No responses yet

J’aime ça…

fév 12 2010 Published by admin under Non classé

500 error - foursquare

No responses yet

.htpasswd Apache Tips

fév 05 2010 Published by admin under Non classé

To create the file

sudo htpasswd -c  .htpassword.CLIENT.PROJECT USERNAME

To add users to it

sudo htpasswd  .thenameofthefile USERNAME2

to configure a website (vhost) to use that file

 <Directory "/var/www/staging/PATH/TO/CLIENT/PROJECT/web">
        Options -Indexes
        AuthName "TD Staging Server"
        AuthType Basic
        AuthUserFile /var/www/staging/td/.htpassword.CLIENT.PROJECT
        Require valid-user
        AllowOverride All
        Allow from All

    </Directory>

No responses yet

Symfony, forms and widgets tips

fév 03 2010 Published by admin under Non classé

Howto get the user object in a form

Solution to get to user object in an sfForm object: use the 2nd $option parameter while creating the form object and retrieve it.

// In your actions.class.php
$this->form = new myForm(array(), array("currentUser" => $this->getUser()));

// In your form class

// ...
if (!is_object($this->getOption("currentUser")) || !($this->getOption("currentUser") instanceof sfUser))
{
throw new InvalidArgumentException("You must pass a user object as an option to this form!);
}

Source: http://eatmymonkeydust.com/2009/08/symfony-forms-flexible-widgets-based-on-user-credentials/

No responses yet