ive added 2 images for you to view so heres how it works first to make the sections retract..
find your TableHeader statements and change them so from
Code: Select all
TableHeader("Modules to upgrade");
Code: Select all
TableHeader(Translate("Modules To Upgrade"), true, true);
Now to add the Freebie section..
Code: Select all
if (count($availableModules) > 0)
{
TableHeader(Translate("Free Modules Available"), true, true);
if (count($availableModules) > 5)
echo "<div style='height: 150px; overflow: auto;'>";
echo "<table class='plainTable'>";
echo "<tr class='titleLine'>";
echo "<td colspan='2'> </td>";
echo "<td>" . Translate('Name') . "</td>";
echo "<td>" . Translate('Author') . "</td>";
echo "<td>" . Translate('Type') . "</td>";
echo "<td>" . Translate('Price') . "</td>";
echo "</tr>";
$row = 0;
foreach ($availableModules as $m)
{
if ($row % 2 == 0)
echo "<tr class='evenLine' valign='top'>";
else
echo "<tr class='oddLine' valign='top'>";
if ($m[3] == 0) {
echo "<td width='1%'>";
LinkButton("Ignore", "index.php?p=admin_module_manager&ignore=" . urlencode($m[1]), "return confirm(unescape('" . rawurlencode(Translate("Are you sure you don't want to see this module in this list anymore?")) . "'));");
echo "</td>";
}
if ($m[3] == 0)
{
echo "<td width='1%'>";
LinkButton("Install", "index.php?p=admin_module_manager&install=" . urlencode($m[1]));
echo "</td>";
}
elseif ($m[3] < 0)
{
echo "<td width='1%'>";
LinkButton("Check", "http://nwe.funmayhem.com/index.php?c=modules&m=" . $m[0], null, "NW-SHOP");
echo "</td>";
}
if ($m[3] == 0) {
echo "<td><a href='http://nwe.funmayhem.com/index.php?c=modules&m={$m[0]}' target='NW-SHOP'>{$m[1]}</a></td>";
}
if ($m[3] == 0) {
echo "<td>{$m[5]}</td>";
}
if ($m[3] == 0)
echo "<td>{$m[2]}</td>";
if ($m[3] == 0)
echo "<td align='right'><b>" . Translate("free") . "</b> </td>";
elseif ($m[3] < 0)
echo "<td align='right'>{$m[3]} TEST</td>";
echo "</tr>";
$row ++;
}
echo "</table>";
if (count($availableModules) > 5)
echo "</div>";
TableFooter();
}
Code: Select all
if (count($availableModules) > 0)
{
TableHeader(Translate("Available Paid Modules"), true, true);
if (count($availableModules) > 5)
echo "<div style='height: 150px; overflow: auto;'>";
echo "<table class='plainTable'>";
echo "<tr class='titleLine'>";
echo "<td colspan='2'> </td>";
echo "<td>" . Translate('Name') . "</td>";
echo "<td>" . Translate('Author') . "</td>";
echo "<td>" . Translate('Type') . "</td>";
echo "<td>" . Translate('Price') . "</td>";
echo "</tr>";
$row = 0;
foreach ($availableModules as $m)
{
if ($row % 2 == 0)
echo "<tr class='evenLine' valign='top'>";
else
echo "<tr class='oddLine' valign='top'>";
if ($m[3] > 1) {
echo "<td width='1%'>";
LinkButton("Ignore", "index.php?p=admin_module_manager&ignore=" . urlencode($m[1]), "return confirm(unescape('" . rawurlencode(Translate("Are you sure you don't want to see this module in this list anymore?")) . "'));");
echo "</td>";
}
if ($m[3] > 1)
{
echo "<td width='1%'>";
LinkButton("Install", "index.php?p=admin_module_manager&install=" . urlencode($m[1]));
echo "</td>";
}
elseif ($m[3] < 0)
{
echo "<td width='1%'>";
LinkButton("Check", "http://nwe.funmayhem.com/index.php?c=modules&m=" . $m[0], null, "NW-SHOP");
echo "</td>";
}
if ($m[3] > 1) {
echo "<td><a href='http://nwe.funmayhem.com/index.php?c=modules&m={$m[0]}' target='NW-SHOP'>{$m[1]}</a></td>";
}
if ($m[3] > 1) {
echo "<td>{$m[5]}</td>";
}
if ($m[3] > 1)
echo "<td>{$m[2]}</td>";
if ($m[3] > 1)
echo "<td align='right'>{$m[3]} </td>";
//echo "<td>" . GetModuleVersion($m) . "</td>";
echo "</tr>";
$row ++;
}
echo "</table>";
if (count($availableModules) > 5)
echo "</div>";
TableFooter();
}