Kingsley |
|
---|---|
Hi, Finally found the time to start with php, but im kinda stuck because i do not know where to look :( I wrote a small plugin for displaying top 5 donations om the main. but it won't display the output for some reason, although the output is retreived. This is my code:
"<?PHP /* ==================== [BEGIN_SED_EXTPLUGIN] Code=recentdonations Part= File=recentdonations Hooks=standalone Tags= header.tpl {PLUGIN_RECENTDONATIONS} Order=10 [END_SED_EXTPLUGIN] ==================== */ /** * Displays top5 latest donations * * @author Kingsley * @copyright Copyright (c) Madkings.nl 2011 * @license BSD */ if (!defined('SED_CODE') || !defined('SED_PLUG')) { die('Wrong URL.'); } // table where donations are $donations ='cot_donations'; $sql1 = sed_sql_query("SELECT `donation_username`, `donation_date`, `donation_amount` FROM $donations ORDER BY donation_date DESC LIMIT 5"); $total1 = sed_sql_numrows($sql1); $html .= '<table class="cells">'; while ($row = sed_sql_fetcharray($sql1)) { $html .= '<tr><td>'. $row['donation_username'].'</td>'; $html .= '<td>'. $row['donation_date'].'</td>'; $html .= '<td>'. $row['donation_amount'].'</td></tr>'; } $html.= '</table>'; $t-> assign(array( "PLUGIN_RECENTDONATIONS" => $html, )); ?> and the setup: <?PHP /* ==================== [BEGIN_SED_EXTPLUGIN] Code=recentdonations Name=Recent Donations Description=Lists of latest donations Version=0.1 Date=2011-june-03 Author=Kingsley Copyright= Madkings.nl Notes=BSD License SQL= Auth_guests=R Lock_guests=W12345A Auth_members=R Lock_members=W12345A [END_SED_EXTPLUGIN] ==================== */ /** * Displays lists of latest donations * * @author Kingsley * @copyright Copyright (c) Madkings.nl 2011 * @license BSD */ defined('SED_CODE') or die('Wrong URL'); ?> Can some-one please tell me what I am overlooking? thank you |