See title.
the html-tags blockquote and cite are for citations. I think it's better to use them instead of div. blockquote is a block-element (like div), cite is an inline-element like strong or em.
you only need to make small changes in the quote.module (sorry i dont know how to contribute patch-files)
line 274 - renew the theme_quote function with:
<?php
function theme_quote($quote_content, $quote_author) {
$quote_output = '<blockquote>';
if ($quote_author != '') {
$quote_output .= '<cite>'. t('%name wrote:', array('%name' => $quote_author)) .'</cite>';
}
else {
$quote_output .= '<cite>'. t('Quote:') .'<cite>';
}
$quote_output .= '<p>'. $quote_content .'</p>'; // <p> necessary for <blockquote> w3c-validation
$quote_output .= '</blockquote>';
return $quote_output;
}
?>
After this you need to edit the css-file to
blockquote {
margin: 1em 2em 1em 2em;
padding: 1em;
border: 1px solid #DDD;
background-color: #F6F6F6;
}
cite {
font-weight: bold;
margin: 0 0 1em 0;
}
Advantage:
You don't need to allow div-tags in your html-filter!
Comments
Comment #1
ichderfisch commentedComment #2
Zen commentedThe theme function can be overridden for this purpose if you so wish. The reason why this is not already being used is that nested quotes with blockquote tags do not validate most of the time.
-K
Comment #3
ElleKitty commentedSlightly different but related query: I wonder if it's possible to have as an option the function of the Quote module that adds the links and buttons, but uses the < blockquote > or < cite > tag instead of [ quote ]. It's just a personal peeve of mine having an artifact of BB Code formatting in place when everything else is using HTML filters (and editor gui plugins make up the gap for other users). As long as it renders nicely I'd take it as a fair trade for a little bit of W3C validity.