C

ContentVampire

By Aaron Ladage (aladage)


A WYSIWYG is a black hole of content. Images, files and links added to a rich text editor by your site editors are traditionally very hard to work with programmatically -- until now!

Whenever a page is saved, ContentVampire scans through the page's content section, finds all image and link tags in the HTML, and then compiles all of those tags' attributes into a structured JSON string. The JSON string is then saved to the "vampireValues" template variable, making it very easy to programmatically work with your site editors' content (think image galleries, file lists, etc.).

For example, a page containing a single placekitten image, and a link to icanhazcheezburger.com, would be saved to a TV like this:

{"images":[{"iteration":0,"src":"http:\/\/placekitten.com\/g\/200\/300","alt":"Placekitten","title":"This is a cat"}],"links":[{"iteration":0,"href":"http:\/\/www.icanhazcheezburger.com","target":"_blank","name":null,"title":"I Can Haz Cheezburger!"}]}

This is the initial release (and my first plugin attempt, so be gentle). Future versions will include support for scanning Rich Text TVs, too.

Aaron Ladage


New in ContentVampire 1.0.1-beta

1.0.1beta: updated description. Nobody had a clue what the hell this plugin did ;-)

1.0.0beta: Initial release

More

Information

Released
June 19, 2012
Supported Versions
2.2 – 2.2
Downloads
1,141
License
GPLv2

More from Aaron Ladage

InstantAPI

InstantAPI is a plugin that automatically turns any page on your…

View
Spotify for MODX

Spotify for MODX brings the popular streaming music service to your…

View
PageLocker

PageLocker provides simple front-end password protection for individual…

View