vbindex integration..
in
vbindex.php (or whatever you renamed it to) find:
Code:
'vbindex_customblock_6'
and change it to:
Code:
'vbindex_customblock_6',
'randomquote'
next find:
Code:
// ## USERS IGNORE ##
if (trim($bbuserinfo['ignorelist'])) {
$ignorelist = 'AND thread.postuserid NOT IN ('.str_replace(' ', ',', $bbuserinfo['ignorelist']).')';
}
and add
BENEATH it:
Code:
$result_quote = $DB_site->query("
SELECT quotes.*,user.username AS quotename FROM quotes AS quotes
LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = quotes.userid)
ORDER BY rand() LIMIT 1
");
while ($quote = $DB_site->fetch_Array($result_quote)) {
$randomquote[quoteid] = $quote[quoteid];
$randomquote[quote] = $quote[quote];
$randomquote[author] = $quote[author];
$randomquote[userid] = $quote[userid];
$randomquote[username] = $quote[quotename];
$randomquote[approved] = $quote[approved];
}
$DB_site->free_result($result_quote);
eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');
Then edit your
VBINDEX template and place:
after:
You can actually place
$showrandomquote anywhere you`d like the quotes to show up..