Quote of the Day module voor Joomla!
Yet Another Quote Module:-)
Shows a random quote. Was originally developed to reuse the quotes in my Postnuke site, but adapted to use an internal joomla! table, managed by the existing equotes component by Ron Liskey .
Defaults to the internal database, but this can be changed in the module parameters.
mod_qotd.php
<?phpinclude “mod_qotd.config.php”;$connection=mysql_connect($host,$user,$pw);
mysql_select_db($db, $connection);
$count=mysql_query(“select count(*) from $tb”, $connection);
$countrow=mysql_fetch_row($count);
$total=$countrow[0];
$p = mt_rand(0,($total – 1));
$quotes=mysql_query(“select $fq,$fa from $tb”, $connection);
mysql_data_seek($quotes, $p);
$q=mysql_fetch_array($quotes);
echo rtrim($q[0]);
if (strlen($q[1])>0) {
echo “<br>
– “;
echo rtrim($q[1]);
}
echo ”
“;
mysql_close($connection);
?>
mod_qotd.xml
<?xml version=”1.0″ ?><mosinstall type=”module”>
<name>Quote of the Day</name>
<creationDate>15 June 2006</creationDate>
<author>Peter Hasperhoven</author>
<copyright>This template is released under the GNU/GPL License</copyright>
<authorEmail>peter(at)hasperhoven.net</authorEmail>
<authorUrl>http://www.hasperhoven.org</authorUrl>
<version>1.0</version>
<description>Toont een random citaat (uit de Postnuke database:-)</description>
<files>
<filename module=”mod_qotd”>mod_qotd.php</filename>
<filename module=”mod_qotd”>mod_qotd.config.php</filename>
</files>
</mosinstall>

7 november 2008 at 00:06
[...] Als je de module wilt gebruiken, download hem dan hier [...]