更新时间:2021-04-09 21:13:40
封面
版权信息
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
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
Using Smarty to create a color set in your stylesheet
Using Smarty to do the math in your stylesheet
Chapter 3. Getting the Most out of Tags and User-Defined Tags
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
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
Chapter 5. Using the Database API
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
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
Chapter 7. Your Module and the Community
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
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
Attaching a User-Defined Tag to an event
Finding what parameters an event passes using a User Defined Tag
Chapter 10. Advanced Module Tricks and SEO
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
Index