Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How to Build Your Own Social Network with Elgg?

A technical perspective to custom made social networking with Elgg.

Related Books

Free with a 30 day trial from Scribd

See all

How to Build Your Own Social Network with Elgg?

  1. 1. Jaakko Naakka Intunex Ltd. @naakka How to Build Your Own Social Network? Custom made social networking with Elgg - A technical perspective
  2. 2. Jaakko Naakka
  3. 3. I really like the idea of Facebook and Twitter , but I need more privacy . How can I build a private social networking site?
  4. 4. With Elgg you can!  
  5. 5. I want to build a public social community with thousands of users. Is that possible?
  6. 6. It sure is! It's been done already <ul><li>  </li></ul>
  7. 7. What is Elgg? <ul><li>An open source social networking engine  </li></ul><ul><li>You can create your own </li></ul><ul><ul><li>Private social networking for your organisation, </li></ul></ul><ul><ul><li>Public world wide social networking sites </li></ul></ul>
  8. 8. Still not convinced? Here's some more details why Elgg rocks...
  9. 9. Elgg Highlights in TLA's <ul><li>*AMP </li></ul><ul><li>PHP </li></ul><ul><li>SQL </li></ul><ul><li>MVC </li></ul><ul><li>ORM </li></ul><ul><li>XML </li></ul><ul><li>RPC </li></ul><ul><li>GPL / MIT </li></ul>OMG!
  10. 10. Elgg is an easily extendable platform to build your custom social networking site
  11. 11. Extendability <ul><li>Not just the way you can extend and modify any Open Source project </li></ul><ul><li>Very effective plugin system </li></ul><ul><li>Plugins can modify , extend and disable </li></ul><ul><ul><li>core features , </li></ul></ul><ul><ul><li>features added by other plugins </li></ul></ul>
  12. 12.   Lets take a closer look at the plugins
  13. 13. Plugins can add new features to Elgg Elgg Core Blog User profile Groups Plugin Plugin Plugin
  14. 14. Plugins can modify Elgg core features Elgg Core Blog Groups Email validation Plugin Plugin User profile Plugin Plugin
  15. 15. Plugins can modify other plugins Groups Elgg Core Blog Group members Plugin Plugin User profile Plugin Email validation Plugin Plugin
  16. 16. You can do practically anything without modifying Elgg core or losing upgradeability
  17. 17. How is that possible?
  18. 18. Ways to Extend and Modify Elgg <ul><li>You can replace or extend any view in Elgg </li></ul><ul><li>A plugin can replace page handlers and actions </li></ul><ul><li>Add functionality through events and plugin hooks </li></ul>
  19. 19. Elgg is built on MVC architecture <ul><li>Plugins can modify views and change the way things look like. You can </li></ul><ul><ul><li>Add new views, </li></ul></ul><ul><ul><li>Replace any core view, </li></ul></ul><ul><ul><li>Replace any view added by another plugin, </li></ul></ul><ul><ul><li>Extend any existing view </li></ul></ul>
  20. 20. Actions and page handlers <ul><li>You can add new or replace existing actions and page handlers </li></ul><ul><ul><li>Actions handle user actions (e.g. log in, save a blog post, update user profile) </li></ul></ul><ul><ul><li>Page handlers handle the calls to URL's </li></ul></ul>
  21. 21. Events and plugin hooks <ul><li>Events and plugin hooks are an easy way to add new features </li></ul><ul><li>By registering an event handler you can, for instance </li></ul><ul><ul><li>Add a new authentication method, </li></ul></ul><ul><ul><li>Execute some code every time a user updates their profile, </li></ul></ul><ul><ul><li>Send an email to administrators every time a new user is registered </li></ul></ul>
  22. 22. What about the database and saving data?
  23. 23. Elgg Datamodel <ul><li>Everything is saved as entities , metadata , annotations , and relationships </li></ul><ul><li>You don't need to </li></ul><ul><ul><li>Know any SQL at all, </li></ul></ul><ul><ul><li>Create your own plugin specific tables </li></ul></ul>
  24. 24. How does that work exactly?
  25. 25. <ul><li>This is all the code you need to save a blog post title and contents </li></ul>Example, saving a blog post // Get the form input $title = get_input('title'); $body = get_input('body'); // Create a new blog post object $blogpost = new ElggObject(); $blogpost->title = $title; $blogpost->description = $body; $blogpost->subtype = &quot;blogpost&quot;; // Save to database. // This is where the magic happens ! $blogpost->save();
  26. 26. Cool! What about reading the database?
  27. 27. Example, reading the database <ul><li>This is what you need to get the latest 10 blog entries </li></ul>$options = array( 'type' => 'object', 'subtype' => 'blogpost', 'limit' => 10 ); $blogposts = elgg_get_entities($options);
  28. 28. That sounds cool! Where do I start? 
  29. 29. Elgg Community <ul><li>  </li></ul><ul><li>Hundreds of free plugins </li></ul><ul><li>Active discussion forums </li></ul><ul><li>Friendly and helpful members </li></ul>
  30. 30. Need something custom made? <ul><li>Don't hesitate to contact me! </li></ul><ul><li>[email_address] </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li>@naakka / @intunex </li></ul><ul><li> </li></ul>