Hi, I wrote this little module that displays random quotes in a block:
function random_quote_block($op = 'list', $delta = 0) {
if ($op == 'list') {
$blocks[0]['info'] = t('Random Quotes Block');
return $blocks;
}
else if (user_access('access content')) {
$quotes_array = file('quotes.txt');
$quote = $quotes_array[rand(0, count($quotes_array) - 1)];
$quote = trim($quote);
$content = "<b><i>We tried to imagine our ideal boatyard...</i></b><br /><br />";
$content .= "<i>"".$quote.""</i>";
$block['subject'] = t('');
$block['content'] = $content;
return $block;
}
}
Everything went well, until I did an upgrade, whereupon all the single quotes (') in the quotes turned into question marks.
the quotes file looks like this:
We wanted a proper working boatyard with boatyard smells and activity where owners can come and go and do as much or as little on their boats as they wanted to; where there was professional advice and service on hand and expertise when it’s needed.
We wanted a quiet and peaceful location because we were going to spend a lot of time there and it was going to be holiday, care-free time to dream a little as well as to work and scrub and paint.
We wanted to feel that the yard would know us and know our boat and want to look after it and know how we wanted it to be kept and that it was safe when we left it.