For those of us who customize our modules, this is a different layout of the alphabet navigation menu for wfdownloads. It is more of a square and fits nicely in a narrow column.
The changes must be made to this code from "/modules/wfdownloads/include/functions.php"
function wfd_letters()
{
global $xoopsModule;
$letterchoice = "<div>" . _MD_WFD_BROWSETOTOPIC . "</div>";
$letterchoice .= "[ ";
$alphabet = array ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
$num = count($alphabet) - 1;
$counter = 0;
while (list(, $ltr) = each($alphabet))
{
$letterchoice .= "<a href='" . XOOPS_URL . "/modules/wfdownloads/viewcat.php?list=$ltr'>$ltr</a>";
if ($counter == round($num / 2))
$letterchoice .= " ]<br />[ ";
elseif ($counter != $num)
$letterchoice .= " | ";
$counter++;
}
$letterchoice .= " ]";
return $letterchoice;
}
Now replace it with this code
function wfd_letters()
{
global $xoopsModule;
$alphabet = array_merge(range('A', 'Z'), range('0', '9'));
$letterchoice = "<b>" . _MD_WFD_BROWSETOTOPIC . "</b>";
for ($i = 0, $cnt = count($alphabet); $i < $cnt; $i++)
{
if (0 == ($i % 9) && (strlen($letterchoice) > 2))
$letterchoice .= '<br>|';
$letterchoice .= " <a href='" . XOOPS_URL . "/modules/wfdownloads/viewcat.php?list={$alphabet[$i]}'>{$alphabet[$i]}</a> |";
}
return $letterchoice;
}
It works like a charm! This is what it should look like.
Quote:
Browse Downloads by alphabetical listing
| A | B | C | D | E | F | G | H | I |
| J | K | L | M | N | O | P | Q | R |
| S | T | U | V | W | X | Y | Z | 0 |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Enjoy!