CMS Made Simple Development Cookbook


CMS Made Simple Development Cookbook
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Build new modules and tags, and use the built-in capabilities of CMS Made Simple to their fullest
  • Provides complete examples as well as educational starting points for your own projects
  • Designed to give you an understanding of the entire system
  • Covers CMS Made Simple version 1.9x
  • Step-by-step “recipes” along with detailed explanations

Book Details

Language : English
Paperback : 340 pages [ 235mm x 191mm ]
Release Date : April 2011
ISBN : 1849514682
ISBN 13 : 9781849514682
Author(s) : Samuel Goldstein
Topics and Technologies : All Books, CMS and eCommerce, Cookbooks, Content Management (CMS), Open Source

Table of Contents

Preface
Chapter 1: Understanding CMS Extensions
Chapter 2: Programming with Smarty and Core Modules
Chapter 3: Getting the Most out of Tags and User-Defined Tags
Chapter 4: Getting Started with Modules
Chapter 5: Using the Database API
Chapter 6: Using the Module Form API
Chapter 7: Your Module and the Community
Chapter 8: Creating Useful Admin Panels
Chapter 9: Using Events
Chapter 10: Advanced Module Tricks and SEO
Index
  • Chapter 1: Understanding CMS Extensions
    • Introduction
    • Will a User-Defined Tag solve my problem?
    • Will a Tag Solve My Problem?
    • Will a Module solve my problem?
    • Create a "Hello World" User-Defined Tag
    • Create a "Hello World" Tag
    • Create a "Hello World" Module
    • Using CMS in Debug Mode
    • Chapter 2: Programming with Smarty and Core Modules
      • Introduction
      • Using Smarty to create a color set in your stylesheet
      • Using Smarty to do the math in your stylesheet
      • Renaming the "Extra Page Attributes" in the CMS Admin
      • Creating a personnel directory using Menu Manage
      • Creating a basic Google Sitemap with Menu Manager and mod_rewrite
      • Embedding JavaScript in your template without causing Smarty to throw a fit
      • Using Smarty loops to generate similar stylesheet constructs
      • Displaying a block only for the Home page
      • Using Smarty "Capture" and conditionals to hide empty content blocks
      • Seeing what Smarty variables are available to your template
      • Chapter 3: Getting the Most out of Tags and User-Defined Tags
        • Introduction
        • Displaying the User's IP address from a User-Defined Tag
        • Using the CmsObject and the current content object in a User-Defined Tag
        • Making a variable available to Smarty
        • Displaying the number of pages in the CMS using a User-Defined Tag
        • Using URL parameters safely in a User-Defined Tag
        • Using Smarty values as inputs in a User-Defined Tag
        • Displaying stock prices from Yahoo with a User-Defined Tag
        • Displaying a translation of the current page using Babelfish with a User-Defined Tag
        • Posting an article to the News Module when the Admin adds a new Group
        • Reversing a string in two ways using a Smarty Modifier
        • Adding registered trademark symbols to a name automatically
        • Chapter 4: Getting Started with Modules
          • Introduction
          • Creating the file structure for a module
          • Creating a new module stub using the Skeleton module
          • Creating a new module stub using the ModuleMaker module
          • Breaking a module into multiple files
          • Making a module localizable
          • Using Smarty variables and templates with a module
          • Calling methods on other modules and specifying module dependencies
          • Chapter 5: Using the Database API
            • Introduction
            • Creating a database table when a module gets installed
            • Creating a database index when creating a table
            • Making a database query from a module
            • Creating and using a database sequence
            • Altering a database table when a module gets upgraded
            • Cleaning up when a module is uninstalled
            • Chapter 6: Using the Module Form API
              • Introduction
              • Creating a basic form in a module
              • Restricting and sanitizing parameters to a module
              • Using debug_display or error_log to see what parameters your module is receiving
              • Making your module display its output without disrupting the rest of the page
              • Embedding your module output in a different page after a form submission
              • Creating checkboxes that always submit a value
              • Chapter 7: Your Module and the Community
                • Introduction
                • Creating an account on the CMS Made
                • Simple Developer's Forge
                • Adding your module to the Forge
                • Creating your Subversion Repository
                • Using Subversion while developing your module
                • Publishing a module release
                • Creating your Git repository
                • Using Git while developing your module
                • Deciding on Git versus Subversion
                • Chapter 8: Creating Useful Admin Panels
                  • Introduction
                  • Creating an admin panel for your module
                  • Creating multiple tabs for your admin module
                  • Creating and enforcing new permissions for your module's administration
                  • Displaying a page in the CMS Admin without the surrounding theme
                  • Writing a line to the CMS Admin Log
                  • Displaying a message after installation
                  • Creating an admin-side input element from your module using a ContentModule block
                  • Hiding your module from Administrators who don't have permission to use it
                  • Creating a module-specific preference and admin panel to set it
                  • Displaying an alert in the CMS Admin from a module
                  • Chapter 9: Using Events
                    • Introduction
                    • Attaching a User-Defined Tag to an event
                    • Finding what parameters an event passes using a User Defined Tag
                    • Generating an Event from a module
                    • Handling an Event with a module
                    • Use an event to send an e-mail when an Administrator Account is added or deleted
                    • Chapter 10: Advanced Module Tricks and SEO
                      • Introduction
                      • Overriding Module strings or layout
                      • Making your module's data available to CMS Site Search
                      • Outputting a downloadable CSV file from your module
                      • Setting special diagnostic messages for debug mode
                      • Using Pretty URLs in your module
                      • Custom URLs for module records in CMS
                      • Made Simple version 1.9+

                      Samuel Goldstein

                      Samuel received a TRS-80 computer for his 12th birthday, and has been programming ever since. Today, he is a principal at 1969 Communications (http://www.1969web.com), a Los Angeles-based web development firm. 1969 Communications builds and maintains web-based business tools for clients which include national brands like Isuzu Commercial Vehicles and Bioness Medical Inc. 1969 Communications specializes in e-commerce, integrating web applications with back-end / legacy systems, complex workflows, content management solutions, and troubleshooting complex issues. Before coming to 1969, Samuel served as Vice President of Technology at Magnet Interactive in Los Angeles, Director of Engineering at COW, and Lead of the Programming Department at BoxTop Interactive. Projects at these companies included development of reusable frameworks, web-based applications, and data-driven systems. Clients ranged from dot-coms to well-known companies such as Nissan/Infiniti, Quiksilver, National Lampoon, Stanford University, Guess?, USC, Kahlúa (Allied Domecq), UPN, UCLA, Major League Soccer, and SegaSoft. Prior to focusing on Internet technology, Samuel worked as a member of the technical staff at The Aerospace Corporation, where he researched distributed systems and database technologies. He holds a Bachelor of Arts in Physics from Pomona College in Claremont, California and a Master of Science in Computer Engineering from the University of Southern California.
                      Sorry, we don't have any reviews for this title yet.

                      Code Downloads

                      Download the code and support files for this book.


                      Submit Errata

                      Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                      Errata

                      - 2 submitted: last submission 31 Oct 2012

                      Page 179-181 | Errata Type: Version update

                      The user can skip steps 10-14. Then, to test module parameters, they should replace the URLs shown in step 15 with the following:

                      http://www.yoursite.com/index.php?mact=Armor,cntnt01,default,0&cntnt01int_param=1
                      http://www.yoursite.com/index.php?mact=Armor,cntnt01,default,0&cntnt01int_param=test
                      http://www.yoursite.com/index.php?mact=Armor,cntnt01,default,0&cntnt01int_param=1&cntnt01string_param=
                      http://www.yoursite.com/index.php?mact=Armor,cntnt01,default,0&cntnt01anyfloat1_param=1.5&cntnt01none_param=

                      Page 18 and 21&22 | Errata type: Code

                      The greater-than and less-than symbols in the output on page 18 should be escaped to > and < respectively. The code on pages 21 and 22 appears to have lost a space after each instance of the word "function"

                      Sample chapters

                      You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                      Frequently bought together

                      CMS Made Simple Development Cookbook +    Enterprise Application Development with Ext JS and Spring =
                      50% Off
                      the second eBook
                      Price for both: €30.90

                      Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                      What you will learn from this book

                      • Use template logic to achieve complex functionality without installing anything beyond the CMS Made Simple core
                      • Create tags to achieve such varied tasks as filtering content and interacting with web services
                      • Write fully-localizable modules in a maintainable and memory-efficient fashion
                      • Interact with the underlying database using the API for safe, platform-independent access
                      • Render and process complex forms and user interfaces with the Form API
                      • Share your work with the community via the Developer's Forge and shared source-control repositories
                      • Build admin-side panels so site administrators can manage and configure your module
                      • Trigger and handle events for complex interactions with tags and modules

                      In Detail

                      CMS Made Simple has great capabilities “out of the box,” but one of its great strengths is the ease of extending those capabilities. You can add a surprising amount of functionality just by customizing the core modules, but once you learn to write your own tags and modules, your ability to add features is virtually limitless.

                      CMS Made Simple Development Cookbook will show you how to use custom PHP code to extend the power and features of CMS Made Simple, and make it do exactly what you want. This easy to use guide contains clear recipes that introduce the key concepts behind each approach to extending the CMS, while also providing examples of solutions to real-world problems.

                      You will learn the differences between the various kinds of tags and modules in the CMS Made Simple environment, and to which purposes each is best fit. Each technology is then explored in detail with a series of practical recipes and examples.You will not only learn the basics of creating tags and modules, but you will explore the underlying APIs that you will use to solve real-world website problems. You will become proficient with the database and form APIs, so that the code you write is portable and maintainable. You'll learn to localize your code and use templates to add its flexibility. You'll master the safe handling of parameters and the creation of secure code. You’ll be familiar with the CMS Made Simple Developer's Forge, and how you can use it in conjunction with revision control as a community-focused code management system, complete with web-based bug tracking and feature requests. You will learn to code complex interactions between modules, both directly and via the creation and handling of events. You will gain exposure to an array of advanced tips and tricks, along with commentary from the distilled experience of someone who has written dozens of modules. The CMS Made Simple Developer's Cookbook offers an amazing wealth of knowledge in approachable, bite-sized recipes. Whether you're new to the CMS or an old hand, you're sure to find valuable tips and information that will have you creating a richer CMS.

                      A hands-on collection of recipes for extending CMS Made Simple, with detailed explanations – useful for beginners and experts alike!

                      Approach

                      This is a cookbook, with practical recipes providing tips and tricks to the most common problems and scenarios faced with CMS Made Simple Development.

                      Who this book is for

                      If you are a CMS Made Simple user wanting to expand your skill set, or a programmer who wants to develop for CMS Made Simple, this book is for you. You will need working knowledge of PHP, HTML, and SQL. Some experience with CMS Made Simple is recommended.

                      Code Download and Errata
                      Packt Anytime, Anywhere
                      Register Books
                      Print Upgrades
                      eBook Downloads
                      Video Support
                      Contact Us
                      Awards Voting Nominations Previous Winners
                      Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                      Resources
                      Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software