# sfSocialPlugin ## Overview This plugin adds social network capabilities to your project's users. So, in example, your users will be able to mutually add as contact, send and receive messages, create groups, manage events, receive notifications about all this stuff, and so on. ## Demo A working demo is online at [http://social.garak.it/](http://social.garak.it/) ![Screenshot](http://symfony.altervista.org/_altervista_ht/sfSocial.png "Screenshot") ## Installation To install (from your project's root): cd plugins; svn co http://svn.symfony-project.com/plugins/sfSocialPlugin/trunk sfSocialPlugin The package depends on sfGuardPlugin, as users are managed by it. There's also an optional dependance from sfThumbnailPlugin (to create thumbnails for profile pictures) ## Usage Enable plugins in your `ProjectConfiguration` class [php] // config/ProjectConfiguration.class.php public function setup() { // possibly add other plugins here... $this->enablePlugins(array('sfGuardPlugin', 'sfThumbnailPlugin', 'sfSocialPlugin')); } Enable modules in your application settings [yml] # apps/frontend/config/settings.yml enabled_modules: [sfGuardAuth, sfSocialMessage, sfSocialEvent, sfSocialContact, sfSocialNotify, sfSocialUser, sfSocialGroup] # this list is not complete: customize on your needs In you application's `lib/myUser.class.php`, set class to extend `sfSocialSecurityUser` Edit `plugins/sfGuardPlugin/lib/model/sfGuardUser.php` and set class to extend `sfSocialGuardUser` instead of `PluginsfGuardUser` Note that plugin comes with full modules templates. To use customized templates, just create under your application a module with the same name as the module you want to customize, then add your custom templates inside. If you prefer to use default templates, be aware that all forms inside are based on list formatter (tables are ugly!), so you must add this code: [php] // lib/form/BaseFormPropel.class.php public function setup() { // default formatter to list (instead of table) $this->widgetSchema->setDefaultFormFormatterName('list'); // i18n $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('sfSocial'); } ## Roadmap Currently Contact, Message, Event, and User modules are working, with functional tests. The project aims to fully implement: * **Contact** system (aka friends system): search for other users, request contact, accept/deny contact request, see list of your contacts, categorize contacts in groups, see contacts of other users, see contact shared with other users, see "degrees of separation" * **Message** system: send a message, read received messages, reply to a message. * **Group** system: create a group, invite users to join, manage groups. * **Event** system: create an event, invite users to partecipate, confirm partecipation (yes/no/maybe) * **Comment** system: write commments, reply to comments. For groups, events and maybe for something else. * **Notification** system: a glue for all other systems. Notify your contacts when you do an action (add a contact, create an event, etc.)