Preface
Elgg is a web application for social networking. It has all the features you would expect from a social web application. It has blogging, file sharing, social bookmarking, microblogging, activity streams, groups, "friending", user profiles, and the list goes on. However, Elgg is more than just a web application. It can also be used as a development framework for creating social websites. Developers are building impressive social media sites on top of the Elgg engine through its powerful API. They are using it to add social functionality to current websites and integrating it with other popular web applications.
Elgg is open source, licensed under the GNU General Public License (GPL). You can download, install, and use it without cost. Taking advantage of its plugin architecture, there is a community of users and developers contributing plugins and themes for others to use. Open source software and an open source community are a great combination that everyone can benefit from.
Anyone can use Elgg to create a customized social networking site. Entrepreneurs are building specialized social networking sites with it. Educators are using it as an e-learning tool. Corporations are adding it to their intranets to better connect their employees. There is a wide range of applications for Elgg and with it you have complete control over your site and your data.
This book has two main objectives: help you understand what functionality Elgg provides and explain how you can customize it to make it do exactly what you want. It is not a manual for administering an active Elgg-based site, nor is it a manual for users of Elgg sites. This book is all about using and customizing Elgg to build a social website.
What this book covers
Chapter 1, Social Networking and Elgg: This chapter describes the features that drive today's social networking and social media websites. It provides an overview of Elgg along with a list of web resources focused on Elgg and its users. Also included is a discussion of common uses for Elgg that go beyond the typical Facebook-like social networking site.
Chapter 2, Installing Elgg: Before you can start using Elgg, you need to install it. This chapter guides you through the process of setting up Elgg.
Chapter 3, A Tour of Your First Elgg Site: Nothing tells you more about software than using it, and this chapter starts you on a hands-on exploration of Elgg's capabilities. Topics covered include creating user accounts, setting up user profiles, and administration.
Chapter 4, Sharing Content: Once you have your Elgg site up and running, you will learn how to share content with Elgg. Blogs, bookmarks, files, and more can all be shared using the core plugins that come with Elgg.
Chapter 5, Communities, Collaboration, and Conversation: This chapter shows you how to use the group's capability to create virtual communities on your Elgg site. It continues by describing the different tools available for users to communicate with each other.
Chapter 6, Finding and Using Plugins: After reading about all the features that Elgg has out of the box, you now get to extend it with plugins created by members of the Elgg community. The chapter has an overview of installing, configuring, and testing plugins followed by a detailed look at three major community plugins.
Chapter 7, Creating Your First Plugin: This chapter follows step-by-step as we create a "hello world" plugin and introduce many components of Elgg's plugin API. This chapter also offers advice on debugging a plugin when your code is not working like you want it to.
Chapter 8, Customization Through Plugins: Learn how to customize Elgg through creating your own plugins. This chapter is organized as nine lessons that teach you different aspects of writing plugins.
Chapter 9, Theming Elgg: One of the best ways to impress potential users is through the visual design of your site. This chapter describes how themes work and how to create your own. To get the most out of it, you will need basic knowledge of HTML and CSS.
Chapter 10, Moving to Production: Everything that you have done with your site so far has been to experiment and understand Elgg, but now you are thinking about opening it to the public. What sort of server do you need? How do you back up the data? What do you do when the spammers find you? This chapter addresses these kinds of questions.
Appendix A, Developer's Quick Start Guide: Elgg is a powerful development platform. It was designed for extensibility, and developers can be very productive building on it with a solid understanding of how Elgg works. This appendix provides an overview of Elgg as a development platform. It gives you a big picture view of how it works before you start writing code.
Appendix B, Views Catalog: This appendix is a visual catalog of Elgg's views. Along with the description and picture of the view, it includes hints for developers and themers on their uses.
What you need for this book
If you have a web hosting service that supports PHP, then you can install Elgg and start exploring its capabilities. If you do not, then you can install a package like XAMPP on any computer so that you can follow along as we use and customize Elgg. Complete information on installing Elgg is available in Chapter 2.
Who this book is for
This book is written for people interested in using Elgg to build a social networking or social media website. You may be evaluating Elgg for a possible project, in the middle of using Elgg to create a site, or simply checking out open source web applications for future use.
While the intended audience includes web developers, it is not written exclusively or even primarily for developers. Those who build sites based on Elgg come from a wide range of backgrounds and many do not have software development experience. You could be an educator, entrepreneur, scientist, student, or waitress. We do not assume that you have experience working with code, but certainly even a little experience will help you as you work through the material in this book.
Elgg can be customized through configuring options and installing plugins. If you want more control over Elgg, then it will require working with code. You will not need years of experience in web development to benefit from the chapters on writing plugins, but they will challenge those who are new to the PHP language and web development.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: " Next, we pass the content into elgg_view_layout()
through the associative array $vars
."
A block of code is set as follows:
<?php /** * Hello world plugin */ elgg_register_event_handler('init', 'system', 'hello_world_init'); function hello_world_init() { // do nothing right now }
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Enter your settings and click on Save".
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>
, and mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <suggest@packtpub.com>
.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at <questions@packtpub.com>
if you are having a problem with any aspect of the book, and we will do our best to address it.