I use:Treasury 2.08 with smf2.0 rc4
i use it with simple portal.
the marquee gets the name of all your members that have donated in the month and says thank you to them like
***Thank you Ares for your Donation******Thank you qdawg for your Donation***
up to 10 member. can be changed to what ever here
$limit = 10; // Amount of donors to retrieve. (default: last 10)
please post something if you are going to use it or even try it so i will know if i should share more or not.
just a ty or thank you will do even
open notepad and past this code save as donation-marquee.php upload to sources
<?php
if (!defined('SMF'))
die ('Hacking Attempt...');
function retreiveDonors()
{
global $context, $smcFunc;
$limit = 10; // Amount of donors to retrieve. (default: last 10)
$results = $smcFunc['db_query']('', '
SELECT *
FROM smf_treas_donations
ORDER BY smfi7_treas_donations.id DESC
LIMIT {int:limit}',
array(
'limit' => !empty($limit) ? $limit : '0',
)
);
$context['donors']['list'] = array();
$month = strftime('%m', forum_time());
while ($row = $smcFunc['db_fetch_assoc']($results))
{
if(strftime('%m', $row['payment_date']) == $month)
{
$context['donors']['list'][$row['id']] = array(
'id' => $row['id'],
'name' => $row['custom'],
'date' => $row['payment_date'],
);
}
}
}
?>
simple portal php block code
<?php
global $sourcedir, $context;
require_once($sourcedir. '/donation-marquee.php');
retreiveDonors();
echo '<marquee>';
foreach ($context['donors']['list'] as $donor)
echo '***Thank you<span style="color: #ff0000;"> ', $donor['name'], ' </span>for your Donation***';
echo '</marquee>';
?>