Introduction to Elgg

1,977 views

Published on

An introduction to Elgg, presented at Barcamp, New Delhi

Published in: Technology
1 Comment
1 Like
Statistics
Notes
  • this is good thanks
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
1,977
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
29
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to Elgg

  1. 1. An Introduction to Nitesh Nandy @Barcamp, Delhi [email_address]
  2. 2. What is Elgg ? <ul><li>Elgg built on LAMP and is open source </li></ul><ul><li>Roll out your own social network </li></ul><ul><li>Bundles social networking components </li></ul><ul><li>Building on Elgg is easy </li></ul>
  3. 3. Components Pages RSS Files Tags Comment Blog Messages Widgets Friends/Groups Forum
  4. 4. Features <ul><li>Advanced user management and administration </li></ul><ul><li>Cross-site tagging </li></ul><ul><li>Powerful access control list </li></ul><ul><li>Internationalization support </li></ul><ul><li>Multiple view support (eg. cell phone, iPhone) </li></ul><ul><li>Advanced templating engine </li></ul><ul><li>Widget framework </li></ul><ul><li>Opensocial support </li></ul>
  5. 5. Customize Page
  6. 6. Elgg Data Model
  7. 7. Events <ul><li>Events triggered when certain things happen </li></ul><ul><ul><li>User Action </li></ul></ul><ul><ul><li>Callbacks </li></ul></ul><ul><ul><li>Special Events (Boot, Init) </li></ul></ul><ul><li>Hook has to be registered to handle the specific events </li></ul>register_elgg_event_handler('init','system','entities_init');
  8. 8. Views <ul><li>Elgg site can support different interface pages </li></ul><ul><ul><li>Standard HTML </li></ul></ul><ul><ul><li>HTML optimised for accessibility </li></ul></ul><ul><ul><li>Mobile Internet </li></ul></ul><ul><ul><li>iPhone </li></ul></ul><ul><ul><li>Embeddable widget </li></ul></ul>
  9. 9. Plugins <ul><li>Most of the end user functionality in Elgg comes from plugins </li></ul><ul><li>Plugins reside under /mod folder </li></ul><ul><ul><li>start.php : control hub of a plugin </li></ul></ul><ul><ul><li>Register plugin inside Elgg init event </li></ul></ul>register_elgg_event_handler('init','system','entities_init');
  10. 10. Creating a Simple Blog Plugin <ul><li>Create Form </li></ul><ul><li>Create Object View </li></ul><h1><?php echo $vars['entity']->title; ?></h1>   <p><?php echo $vars['entity']->body; ?></p>   <?php echo elgg_view('output/tags', array('tags' => $vars['entity']->tags)); ?> <form action=&quot;<?php echo $vars['url']; ?>action/blog/save&quot; method=&quot;post&quot;>   <?php echo elgg_echo(&quot;title&quot;); ?><br /> <?php echo elgg_view('input/text',array('internalname' => 'title')); ?> <?php echo elgg_echo(&quot;body&quot;); ?><br /> <?php echo elgg_view('input/longtext',array('internalname' => 'body')); ?> <p><?php echo elgg_echo(&quot;tags&quot;); ?><br /> <?php echo elgg_view('input/tags',array('internalname' => 'tags')); ?></p>   <p><input type=&quot;submit&quot; value=&quot;<?php echo elgg_echo('save'); ?>&quot; /></p>   </form>
  11. 11. Contd… <ul><li>Create Save File </li></ul>$blogpost = new ElggObject();   $blogpost->title = get_input('title');   $blogpost->description = $description; $blogpost->access_id = ACCESS_PUBLIC; $blogpost->owner_guid = $_SESSION['user']->getGUID(); $blogpost->save();   $blogpost->tags = string_to_tag_array(get_input('tags')); forward($blogpost->getURL()); <ul><li>Display Blog </li></ul>require_once(dirname(dirname(dirname(__FILE__))).engine/start.php&quot;); $body = list_entities('object','blog',0,10,false); $body = elgg_view_layout('one_column', $body); page_draw(&quot;Our Blog&quot;,$body);
  12. 12. Business Opportunities in Elgg <ul><li>Education (Social E-learning) </li></ul><ul><ul><li>Universities </li></ul></ul><ul><ul><li>Schools </li></ul></ul><ul><li>Social Intranet for organizations </li></ul><ul><ul><li>Employee activities </li></ul></ul><ul><ul><li>Knowledge base </li></ul></ul><ul><ul><li>Company events </li></ul></ul><ul><li>Custom Social Networks </li></ul>
  13. 13. Profile
  14. 14. Groups
  15. 15. Dashboard
  16. 16. Files
  17. 17. <ul><li>Thanks </li></ul>

×