1
mouacy
PDdownloads function for alphabetical letter not working right
  • 2007/3/5 5:50

  • mouacy

  • Not too shy to talk

  • Posts: 138

  • Since: 2002/11/2


Original code:

function PDd_letters()
{
    global 
$xoopsModule;
    if (empty(
$mydirname)){
        include 
'mydirname.php';
    }

    
$letterchoice "
_MD_PDD_BROWSETOTOPIC "
"
;
    
$letterchoice .= "[  ";
    
$alphabet PDd_getLetters();
    
$num count($alphabet) - 1;
    
$counter 0;
    while (list(, 
$ltr) = each($alphabet))
    {
        
$letterchoice .= "XOOPS_URL "/modules/[b]$mydirname[/b]/viewcat.php?list=$ltr'>$ltr";
        if (
$counter == round($num 2))
        
$letterchoice .= " ][ ";
        elseif (
$counter != $num)
        
$letterchoice .= " | ";
        
$counter++;
    }
    
$letterchoice .= " ]";
    return 
$letterchoice;
}


Link on alphabet shows: http://www.mydomain.com/modules//viewcat.php?list=alphabet

The module name does not show.

So I have to hardcode in the module name PDdownloads to make it work.

$letterchoice .= "XOOPS_URL "/modules/[b]PDdownloads[/b]/viewcat.php?list=$ltr'>$ltr";


Any other idea on how to fix this?

Login

Who's Online

397 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 397


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits