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!
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.
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>
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/