Garvin says to use a real plugin for safety and reliability. Can anyone comment on using this code which is supposed to include a trusted script in the sidebars that generates a random quote.
Since I did this myself I wanted to make sure that this wasn't way out of whack despite whether it works or not.
Thanks for any comments.
Code: Select all
<?php
class serendipity_plugin_rquote extends serendipity_plugin {
function introspect(&$propbag)
{
$propbag->add('name', 'Random Quote');
$propbag->add('description', 'Lists random quote every time page is refreshed');
}
function generate_content(&$title)
{
$title = "Quote of the day";
include ("randomquote.php");
}
}
?>