New Module: quotefilter

drinkypoo - August 25, 2006 - 01:12

Hi there, I have a rather ghetto-looking drupal site (but it's getting better all the time, honest) and I decided I wanted those pretty quotes around blockquotes, like there are here on drupal.org. A pure css solution doesn't work for obvious reasons, and I could have worked it into the template like this site has apparently done, but instead I elected to produce a module. I'm no php guy, and I'm certainly no expert with drupal, but I was able to whack it out of the codefilter module pretty easily. All this module does is look for blockquote tags (opening and closing) and slips a div into them, surrounding their contents; it's also got a CSS file, and a couple of quotation graphics.

Anyway, it's not going to win any awards, and I don't really want to maintain it so I'd be glad to hand it over to someone else if they wanted to do that. I'd like to add some options to it but I'm not in a hurry. If your blockquote tags are styled or have any other properties (like cite) then they won't be recognized, so don't do that :)

You can find my little module at http://www.hyperlogos.org/page/a_quotefilter_for_drupal.

...

amnon - August 25, 2006 - 01:46

A pure css solution doesn't work for obvious reasons

I'm curious. What are these "obvious reasons"?

I myself have done that with just CSS.

May I ask, then, how you did

drinkypoo - August 25, 2006 - 16:20

May I ask, then, how you did it? This site is not doing it with just CSS, there is a div embedded inside the blockquote opening and closing tags in order to provide the right-hand quote marks. The after psuedo-element shouldn't be up to the job, because it's rendered after styles are applied. I have been assuming that this site is doing it by using a preg_replace in the template, since it doesn't seem to be a filter (and the quote marks are stored in the theme directory - I used them for testing, then made my own for distribution.)

--
You are what you do when it counts.

 
 

Drupal is a registered trademark of Dries Buytaert.