Building Websites with e107 A step-by-step tutorial to getting your e107 website up and running fast Theodore S Boomer BIRMINGHAM - MUMBAI Building Websites with e107 Copyright © 2007 Packt 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, Packt Publishing, nor its dealers or 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 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: February 2007 Production Reference: 1160207 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-904811-31-2 www.packtpub.com Cover Image by www.visionwt.com [ FM-2 ] Credits Author Project Coordinator Theodore S. Boomer Abhijeet Deobhakta Reviewer Indexer Eric Vanderfeesten Bhushan Pangaonkar Development Editor Proofreader Nanda Padmanabhan Chris Smith Technical Editor Layouts and Illustrations Viraj Joshi Shantanu Zagade Editorial Manager Cover Designer Dipali Chittar Shantanu Zagade Project Manager Patricia Weir [ FM-3 ] About the Author Theodore S. Boomer was born in Catskill, NY. From an early age he showed a propensity for science and mechanics as well as for art and music. When the personal computers became available he knew then that he was going to be working with them in one form or another when he grew up. Currently he is running Connetek Business Technologies, http://www.connetek. com, his own small business-technology company specializing in consulting, small business-technology assessment, web presence, web design and web hosting with a focus on entrepreneurs, small office/home office, small business, non-profit, and small government contracts. His technical knowledge and ability to communicate effectively has garnered him clients from around the world. Tad started writing technical manuals and conducting instruction regarding the use of software while employed with the US military and US federal government and has been a technical reviewer for the books—osCommerce Beginners Edition (ISBN-1886), osCommerce Professional Edition (ISBN-1145), Open VPN (ISBN-185X), and cPanel (ISBN-1923). [ FM-4 ] Acknowledgement A huge thanks to Trish Weir, Nanda Padmanabhan, Abhijeet Deobhakta, and Viraj Joshi at Packt Publishing for providing me an opportunity to write my first book and for their guidance, patience, and encouragement. I would also like to thank Eric and Cameron at e107.org for not only supporting the book idea but for taking part in the reviewing team. To all the plugin developers for the plugins used in this book, thank you so much and please continue your outstanding work. I am grateful to Dr. Padgett at Cuddle Care Animal Hospital for allowing me to use her business site as test site for this book and to Pets911 and Vetcentric for allowing the use of their banners. I would like to thank Roger, Nellie, Jerry, and Rusty for putting up with my working at all hours of the day and night on this project and to Boomer and Judy who sacrificed a summer of hiking and playing while this book was being written. My thanks to Gary who rescued me when I was faltering, taught me how to focus, and gave the will to get this project completed and also to my friends Jason, Jeff, Bob, Vladi, and Klara for their support and encouragement. Finally my special thanks to my mom who kept telling me over the years that I should write a book. Thank you for having faith in me when it seemed like I would never get focused on any one thing longer than a day and for your love and encouragement. [ FM-5 ] About the Reviewer Eric Vanderfeesten was born in the Netherlands and currently is one of the main developers for e107. He has been using e107 for about 4 years and started off as an interested user in content management systems. He soon discovered the overwhelming possibilities for code enhancements to the system and also found a need to create his own plugins for a number of websites. After releasing several plugins he was asked to join the beta test team, for which he contributed ideas to the main developers and delivered fixes and enhancements to the core system. Soon after that period he joined the main developers team of which he has been a member for about two and a half years now. Although he has been coding for a long time, programming is not his educational skill. He is an architect and working in the architectural domain as his main profession. Since computer science has been a field of interest to him he has taken this interest into the domain of architectural design and graduated on a project involving generative architecture using a parametric script to produce architectural environments based on favela structures that can be found in Brazil. Besides his work as a main developer for e107 he is also the chairperson of an architectural foundation 'Eindhovenseschool.net' and has several freelance activities besides his daytime job. [ FM-6 ] Table of Contents Preface 1 Chapter 1: An Introduction to e107 7 History of Content Management Systems 8 How a Content Management System Works 10 Brief History of e107 11 The People Who Make e107 Possible 12 Summary 12 Chapter 2: Installing e107 13 Requirements 13 Operating System Requirements 14 Installing e107 15 Uploading e107 to Your Server 16 No Command-Line Access 16 Command-Line (Shell) Access 17 Setting File Permissions 17 Core Permissions 19 Plug-in Permissions 20 Content Management Plugin 20 Links Page 21 Statistic Logging 21 Running the Installation Script 21 Stage 1 21 Stage 2 22 Root Access 22 No Root Access 24 Stage 3 26 Stage 4 26 Table of Contents Stage 5 27 Stage 6 28 Stage 7 29 Securing Your Installation 31 Upgrading an Existing e107 Installation 31 Database Updates 33 Troubleshooting Common Installation Problems 33 Summary 34 Chapter 3: Setting Site Preferences 35 The e107 Front End 35 Creating a Username and Password 37 Activating Your Registration 40 The User or Member Welcome Page 41 The e107 Back End 42 Setting Site Preferences 44 Site Information 46 Display Information 48 Admin Display Options 48 Date Display Options 48 User Registration/Posting Option 48 Signup Page Options 50 Text Rendering 51 Security & Protection 53 Comments 56 Advanced Features 57 Emoticons 57 Creating the Front Page 58 Creating a Dynamic Front Page 58 Creating a Static Front Page 61 Creating Different Front Pages by User Class 62 Summary 64 Chapter 4: Customizing the Look and Feel of Your Site 65 What is a Theme? 65 Understanding the Theme Layout 66 Psychology of Color 68 Selecting a Theme 68 Core Themes 68 Additional Themes 70 Custom Themes 71 Deleting Themes 72 Customizing Layout 73 The WYSIWYG Editor 74 [ ii ] Table of Contents The File Upload Manager 74 Creating Menu Items Using the Custom Page/Menu Tool 75 Deleting a Custom Menu Item 79 Changing Views by Membership Level 79 Customizing Our Site 82 Internationalization—Using a Custom Language File 86 Summary 92 Chapter 5: Customizing Your Site for e-Commerce with Plugins 93 Introduction to Plugins 93 How to Install Plugins 94 Core Plugin Installation 94 Installing a Non-Core Plugin 95 Plugin Manager Upload Plugin Option 96 Uninstalling a Plugin 97 Banner Plugin 98 Adding the Banner Shortcode to a Theme 98 Creating a Banner Ad Campaign 103 Activating the Ad Campaign 105 Shopping Cart Plugin 106 Main ZoGo-Shop Settings 107 Manage Store Categories 110 Adding Store Categories 110 Editing and Deleting Categories 110 Manage Store Products 111 Adding Store Products 111 Editing and Deleting Products 114 Manage Gateways 114 Managing Orders 117 FAQ (Frequently Asked Questions) Plugin 118 Adding Categories 118 Adding Sub-Categories 119 Setting Preferences 121 Entering Sample FAQs 122 Summary 123 Chapter 6: Customizing Your Site for Business with Plugins 125 User Class 125 Creating a User Class 126 Attaching a User Class to a User 126 Deleting a User from a User Class 127 Assigning Admin User Class to a User or Removing It 127 [ iii ]