Drupal 6 Ultimate Community Site Guide Now everyone can set up a community Extensive Case Study: drupalfun.com With notes for Drupal 5 DORIEN HERREMANS MSc MIS Special offer - Download Drupalfun Due to popular demand, I have decided to make the source code of drupal- fun.com available for download. Drupalfun is the showcase of this ebook, and has been updated to use the latest modules. Get your copy here: www.book.drupalfun.com/socialnetwork The Drupalfun v2.0 package contains: • all the files of the Drupalfun.com site, as it is now. • configured database (without content). • installation instructions. All modules have been updated to the latest versions (today at May 22th, 2009) and include: • Drupal 6.12 • Panel 3 beta 2 • Views 2.5 • CCK 2.2 • Gmap 1.0 • ... and many many more... WiththispackageandsomebasicknowledgeonhowtosetupaDrupalsite, you can have a site like drupalfun.com up and running in a few minutes. Copyright ©2009 Dorien Herremans Cover Design: No Frills - [email protected] All rights reserved. No part of this publication may be reproduced or transmitted, in any form or by any means, electronic, mechanical, including photocopying, recording, or by any information storage or retrieval system, without prior permission of the publisher. ISBN 978-2-8399-0490-2 The information outlined in this book is provided “as is”. Although every precaution has been taken in the preparation of this work, the author shall not have any liability to any personorentitywithrespecttoanylossordamagecausedorallegedtobecauseddirectly or indirectly by the information contained in this book. Drupal 6: Ultimate Community Site Guide Dorien Herremans MSc MIS Acknowledgements Thank you, divine universe, for guiding me on my journey. But most of all, many thanks to my partner Els for always supporting and loving me. A warm thank you to Jennifer for designing such a great cover. And many thanks to all Drupal contributors and everybody who participates in the Open Source movement. And lastly, but not least, my gratitude to the many bumps in the road, that taught me to look for creative solutions. i Overview 1 Introduction 1 2 Setting up the site 6 3 Expanding functionality 14 4 User Profiles 24 5 Expanding profiles 43 6 Content Presentation 69 7 Community features 86 8 Making an income from your site 108 9 Tidying up 116 10 Conclusion 131 About the author 132 i Contents 1 Introduction 1 2 Setting up the site 6 2.1 Drupalfun.com . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Drupal 6.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Installing Drupal . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 Expanding functionality 14 3.1 Basic configuring . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2 How to install a module . . . . . . . . . . . . . . . . . . . . . 15 3.3 How to install a theme . . . . . . . . . . . . . . . . . . . . . . 16 3.4 Invaluable modules 101 . . . . . . . . . . . . . . . . . . . . . . 18 3.4.1 DHTML menu - faster navigation menu . . . . . . . . 18 3.4.2 Captcha - avoiding spammers . . . . . . . . . . . . . . 19 3.4.3 Pathauto . . . . . . . . . . . . . . . . . . . . . . . . . 20 ii Contents iii 3.4.4 Poormanscron . . . . . . . . . . . . . . . . . . . . . . . 20 3.4.5 Tagadelic . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.5 Tips and tricks . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.6 This chapter’s Module Download List . . . . . . . . . . . . . . 23 4 User Profiles 24 4.1 What’s a profile? . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.2 Content Profile . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.2.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . 27 4.2.2 Profile fields . . . . . . . . . . . . . . . . . . . . . . . . 29 4.2.3 Avatar . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.2.4 User tags . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.3 Displaying the profile . . . . . . . . . . . . . . . . . . . . . . . 32 4.3.1 Creating a panel page . . . . . . . . . . . . . . . . . . 32 4.3.2 Showing the profile . . . . . . . . . . . . . . . . . . . . 33 4.3.3 Showing the avatar . . . . . . . . . . . . . . . . . . . . 34 4.3.4 Adding Profile Comments - aka “My wall” . . . . . . . 37 4.4 Accessing the profile . . . . . . . . . . . . . . . . . . . . . . . 38 4.4.1 Adding a nice button that links to the profile . . . . . 39 4.4.2 Menu link to my profile . . . . . . . . . . . . . . . . . 40 4.5 This chapter’s Module Download List . . . . . . . . . . . . . . 42 5 Expanding profiles 43 5.1 Image gallery . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 iii Contents iv 5.1.1 Image gallery content type . . . . . . . . . . . . . . . . 44 5.1.2 Displaying it in the profile . . . . . . . . . . . . . . . . 47 5.1.3 Configuring the node display . . . . . . . . . . . . . . . 50 5.1.4 Pictures Page . . . . . . . . . . . . . . . . . . . . . . . 51 5.1.5 Multiple Albums per User . . . . . . . . . . . . . . . . 54 5.2 Video gallery . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.2.1 Set-up . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.2.2 From pictures to media . . . . . . . . . . . . . . . . . . 56 5.3 Other galleries . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.4 Pinpointing users on a worldmap . . . . . . . . . . . . . . . . 57 5.4.1 Getting the location . . . . . . . . . . . . . . . . . . . 57 5.4.2 Displaying the location . . . . . . . . . . . . . . . . . . 60 5.5 User search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.5.1 Member search page . . . . . . . . . . . . . . . . . . . 61 5.5.2 A quick ’find a match’ block . . . . . . . . . . . . . . . 63 5.5.3 User tag cloud . . . . . . . . . . . . . . . . . . . . . . . 64 5.5.4 New Users Block . . . . . . . . . . . . . . . . . . . . . 65 5.5.5 Featured Members . . . . . . . . . . . . . . . . . . . . 66 5.5.6 Displaying search results on a map . . . . . . . . . . . 67 5.6 This chapter’s Module Download List . . . . . . . . . . . . . . 68 6 Content Presentation 69 6.1 Content types . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 iv Contents v 6.2 Over“views” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.2.1 Showcase list . . . . . . . . . . . . . . . . . . . . . . . 71 6.2.2 Blogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.2.3 My Content . . . . . . . . . . . . . . . . . . . . . . . . 72 6.2.4 View blocks . . . . . . . . . . . . . . . . . . . . . . . . 73 6.2.5 Related Content Block . . . . . . . . . . . . . . . . . . 74 6.2.6 Fixfertig . . . . . . . . . . . . . . . . . . . . . . . . . . 76 6.2.7 Putting stuff around the view . . . . . . . . . . . . . . 78 6.3 Node pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.3.1 More Panels . . . . . . . . . . . . . . . . . . . . . . . . 78 6.3.2 Voting . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.3.3 Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 6.4 Making a cool welcome page . . . . . . . . . . . . . . . . . . . 82 6.4.1 The front-page panel . . . . . . . . . . . . . . . . . . . 82 6.4.2 The front-page panes . . . . . . . . . . . . . . . . . . . 83 6.5 This chapter’s Module Download List . . . . . . . . . . . . . . 85 7 Community features 86 7.1 Forum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 7.2 Shoutbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 7.3 Friends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 7.4 Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 7.4.1 Option 1: Contact Form . . . . . . . . . . . . . . . . . 94 v
Description: