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

How to Build Your Own Social Network with Elgg?

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