Top Rated Links for SMF Links (http://custom.simplemachines.org/mods/index.php?mod=381)
form phpbox :
add into:
global $db_prefix, $scripturl, $txt, $settings, $modSettings, $subcats_linktree;
if (!empty($modSettings['smflinks_setshowtoprate']))
{
echo '<div class="tborder" style="margin: 2%;"><div class="catbg2">' . $txt['smflinks_topfiverated'] . '</div>';
echo '<table>';
$dbresult = db_query("SELECT l.ID_LINK, l.rating, l.title,l.date, m.realName, l.ID_MEMBER, l.description,l.hits FROM {$db_prefix}links AS l LEFT JOIN {$db_prefix}members AS m ON (l.ID_MEMBER = m.ID_MEMBER) WHERE l.approved = 1 ORDER BY l.rating DESC LIMIT 5", __FILE__, __LINE__);
while($row = mysql_fetch_assoc($dbresult))
{
echo '<tr>
<td>
<a href="' . $scripturl . '?action=links;sa=visit;id=' . $row['ID_LINK'] . '" target="blank"><img src="' .$settings['tp_images_url']. '/TPdivider2.gif" alt="" />' . $row['title'] . '</a> ';
echo $txt['smflinks_rating'] . $row['rating'];
if ($editlink)
echo ' <a href="' . $scripturl . '?action=links;sa=editlink;id=' . $row['ID_LINK'] . '">' . $txt['smflinks_txtedit'] . '</a> ';
if ($deletelink)
echo '<a href="' . $scripturl . '?action=links;sa=deletelink;id=' . $row['ID_LINK'] . '">' . $txt['smflinks_txtdel'] . '</a>';
echo '</td></tr>';
}
echo '</table>';
mysql_free_result($dbresult);
echo '</div>';
}
regards... ;)
Looked at your code- it all looks to very well written and organized. Though I am unable to test it, I'm sure it works.
Good work!
Themes, code, what is next?
dear lanedres sory, I understood very little
This is basically what he said Fussilet.
Your code = good. :)
You're good at themes, and at code. So what are you going to do now? :)
Thanks for your help IchBin , I'm working on improving myself lanedres...
:))
for this mod SMFLINKS - how about the latest link blocks?