Social Networking
Total Page:16
File Type:pdf, Size:1020Kb
www.allitebooks.com Drupal 7 Social Networking Build a social or community website with friends lists, groups, custom user profiles, and much more Michael Peacock BIRMINGHAM - MUMBAI www.allitebooks.com Drupal 7 Social Networking Copyright © 2011Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: October 2011 Production Reference:1150911 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B32PB, UK. ISBN 978-1-849516-00-6 www.packtpub.com Cover Image by Asher Wishkerman ([email protected]) www.allitebooks.com Credits Author Project Coordinator Michael Peacock Joel Goveya Reviewers Proofreader Kazi Ataul Bari Aaron Nash Nedo Laanen Ronald J. Simon Indexer Hemangini Bari Acquisition Editor Sarah Cullington Graphics Valentina D'silva Development Editors Kartikey Pandey Production Coordinator Aparna Bhagat Hithesh Uchil Cover Work Technical Editors Aparna Bhagat Pramila Balan Joyslita D'souza www.allitebooks.com About the Author Michael Peacock (www.michaelpeacock.co.uk) is a web developer and Zend Certified Engineer from Newcastle, UK with a degree in Software Engineering from the University of Durham. After working as Managing Director and Lead Developer overseeing the development team at the web agency he co-founded almost five years ago, Michael stepped back from the business and now acts as Senior/Lead Web Developer on the telemetry project for Smith Electric Vehicles. In October 2010, Michael presented his thoughts on specific web application architectures at the popular PHP North West conference, and has presented to the PHP North East user group on automated deployment systems and to North East technical community group Super Mondays on Jenkins Continuous Integration. Michael loves working on web related projects, and is currently incubating a number of ideas for launch through his latest venture, Central Apps Limited (www.centralapps.co.uk). He is the author of Drupal 7 Social Networking, PHP 5 Social Networking, PHP 5 E-Commerce Development, Drupal 6 Social Networking, Selling online with Drupal e-Commerce and Building Websites with TYPO3. Michael acted as technical reviewer for other publications like Mobile Web Development and Drupal for Education and E-Learning. You can follow Michael on Twitter: www.twitter.com/michaelpeacock or find out more about him through his blog: www.michaelpeacock.co.uk. www.allitebooks.com Acknowledgement I'd like to thank all the staff at Packt Publishing, in particular: Douglas Paterson, for working with me to develop my first book ideas; Sarah Cullington for working with me on developing this book; Joel Goveya, the Project Co-ordinator for helping keep the project on track and Karthikey Pandey, the Development Editor. Thanks are also due to the Technical Reviewers: Kazi Ataul Bari, Nedo Laanen, and Ronald J. Simon, who helped ensure the technical quality of the book was up to scratch. I'd also like to thank everyone who left feedback about Drupal 6 Social Networking; their feedback really helped shape this book, so that as well as being updated to cover Drupal 7, it is more relevant, more interesting, and builds a more powerful Social Networking site. My thanks also go to my friends and family, in particular my fiancée Emma for her support while working on the book. Finally, I'd like to thank you, the reader; I hope you enjoy this book and produce a fantastic social network of your own. I look forward to seeing what you come up with, and hope you will provide me with your feedback so that Drupal 8 Social Networking can be even better still! www.allitebooks.com About the Reviewers Kazi Ataul Bari was born in Comilla, Bangladesh. He has been working on PHP and MySQL, JavaScript, jQuery,CMS (Joomla, Drupal), Adobe Photoshop, Adobe Flash, and Action Script 3.0 for three years. Currently, he is working for GraphicPeople | Enfatico | WPP as Web Developer. He also worked at BRACNet Limited, and GoldenHash Technology as a Software Engineer and Quality Assurance Officer. I would like to thank Hithesh Uchil, Joel Goveya, my grand father for giving me the encouragement to explore new opportunities, and my friend Fatema Akter Puspo for supporting me to work hard. Also, I would like to thank my Mom and Dad. Nedo Laanen graduated in 2003, where he studied Applied Mathematics and Computer Science. He then started working for a large company in the computer industry. There he worked for several clients as a Novell System Administrator. Soon he developed a keen interest in Linux and Open Source software and started to pursue a career as a Linux professional at a Utrecht based company. Nedo has worked for companies like the Dutch department of the World Wide Fund in Zeist and the Dutch Council for Refugees in Amsterdam, as well as for several different Dutch Hospitals. He was also involved in the 'Antonius Open' project at the Antonius Hospital in Utrecht/Nieuwegein, a prestigious project of the Antonius hospital to cut back costs by implementing Linux and Open Source software in their computer network, replacing expensive proprietary software and eliminating vendor lock-in. In 2011, Nedo started his own business as an all-round Linux engineer, providing Open Source solutions for other businesses: http://www.laanen-ict.nl. www.allitebooks.com Next to Linux and Open Source he is also an enthusiastic photographer (http://www.nedolaanen.nl). In 2009, he therefore started the website http:// www.opensourcephotography.org to promote Open Source photography. Nedo has also been a reviewer for Packt Publishing on the book GIMP 2.6 Cookbook. Ronald J. Simon has been working with the development of shared information and database design dating back to the days before the Internet and has worked in many different areas of information management and writing documentation to support users. Ron is also an Adjunct Instructor for Grand Valley State University and has worked in the legal field in Document management and security. He is also an owner of RJS Designs, which is a small business consulting company. I would like to thank my Coffee Machine for always being by my side. www.allitebooks.com www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? • Fully searchable across every book published by Packt • Copy and paste, print and bookmark content • On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. www.allitebooks.com Table of Contents Preface 1 Chapter 1: Drupal and Social Networking 7 Social Networking: An introduction 7 Business logic to social networks 9 Examples: Businesses making use of existing social networks and their own social networks 9 Why not join or use an existing social network? 10 Provide a service 11 Improve business 11 Improve communications 12 Existing social networks 12 Facebook 12 LinkedIn 13 MySpace 13 Twitter 13 Drupal 14 What is a CMS? 14 What is Drupal? 15 Drupal as a social networking platform 16 Alternatives to Drupal 17 Roll your own 17 Elgg 17 Hybrid approaches 18 DinoSpace! 18 Installing Drupal 19 Requirements 19 Download 20 Installation 20 Extracting the Drupal files 20 Creating the database 21 Running the Drupal installer 21 www.allitebooks.com Table of Contents Configuring Drupal 27 People: Account settings 28 System: Site information 32 Other configuration options 34 Summary 36 Chapter 2: Preparing Drupal for a Social Networking Site 37 How Drupal works 37 An abstract framework 37 Nodes 38 Modules and themes 39 Administering Drupal—An overview 39 Logging in 40 Dashboard 40 Content 43 Content statuses 44 Creating content 45 Comments 48 Structure 48 Blocks 49 Content types 51 Menus 51 Taxonomy 53 Appearance 54 People 56 Permissions 56 Roles 58 Modules 58 Configuration