To make this more "plug and play" for people using this module with inline images added via a WYSIWYG editor, I wrote a quick input filter which adds the class "adaptive" to each img tag. Presto chango, your existing site is now (more) adaptive!
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ais-input-filter-2146299-4.patch | 2.52 KB | mvc |
Comments
Comment #1
mvcComment #2
mvcoops, forgot to properly handle the character set of the html snippet. fixed based on example from http://php.net/manual/en/domdocument.loadhtml.php
Comment #3
spotzero commentedThe function and hook implementations are incorrectly named. They should be named after the module to be correctly namespaced.
i.e.
ccdmd_filter_info() should be ais_filter_info()
_ccdmd_filter_adaptive_image_styles_process() should be _ais_filter_process().
_ccdmd_filter_adaptive_image_styles_tips() should be _ais_filter_tips().
Comment #4
mvcheh, oops. i was copying the code from a custom module written for a client :)