Content filters!

Track: 
Coder
Experience: 
Intermediate
  • Text formats and content filters behind-the-scenes
  • How filtered content is cached by Drupal
  • hook_filter_info() and filter callbacks
  • Settings and settings forms
  • Building a filter from scratch!
  • Upgrading a Drupal 6 input format module to Drupal 7
Intended audience: 

Intermediate Drupal coders familiar with the concepts of hooks and callbacks, who want to create content filters and be able to modify the appearance or function of their content in really sweet ways.

Questions answered by this session
Question 1: 
What are text formats and content filters? How do they work behind-the-scenes?
Question 2: 
How is filtered content cached by Drupal?
Question 3: 
How can I create a simple content filter?
Question 4: 
How can I make my filter more configurable by adding settings and a settings form?
Question 5: 
How do I upgrade a Drupal 6 input format module to Drupal 7?
2.8
Your rating: None Average: 2.8 (10 votes)

Comments

Fleshed out more

Hi Garrett. Can you elaborate a bit more? The description here is rather short. Remember, this is both the sales pitch to the conference organizers and to would-be attendees for your session. :-) Try to flex out what you'll be covering and how and why someone should care more.

Larry; Yeah, making the

Larry;

Yeah, making the description a bulleted list was a mistake, especially when I later saw the "questions answered" bit.

Anyway, basically, I picture the presentation consisting of two basic halves. The first half will be an overview of the format/filter system, starting with a general overview of what text formats are, when they're run against text (so Drupal's "filter on output" philosophy and why it's a good idea), when the output is cached, etc; then get more specific and show how formats are comprised of individual filters and how each filter can have a settings form and the settings for the form are saved on a per-format basis. This half will be mostly technical and philosophical discussion with little to none actual code. However, in the second half, we start with the code samples, starting with a very basic filter that translates "foo" to "bar," then gradually making it more complex by adding a settings form and tips, and maybe even tricks like prepare callbacks and the potentially disastrous "cache" parameter.

As I've been working on Pathologic these last few years, I've seen that there's a lot of untapped power in the filtering system that could make peoples' lives better, but at the same time, the caching and filter-only-on-output behavior sometimes confounds people (I encountered this just yesterday, in fact). I intend that people coming away from the session will have a better understanding of how the filter/format system works, and, if they're coders, how they can make the system work for them.

Diamond Sponsors

 
VPS NET
Palantir.net

Platinum sponsors

 
workhabit
Trellon

Gold Sponsors

 
Microsoft
Chapter Three
Treehouse Agency
Drupal Connect
Duo
HotDrupal.com
NorthPoint