Suche auf www.schulpastoral.de
Bibliothek auf www.rpi-virtuell.de
rpi-virtuell - Suche

Login
Mitgliedsname:

Passwort:


Password vergessen?
Neu anmelden!
  Home >> RSS Center >> ?Browse in alphabetical order? in the lexicon and national characters

RSS Center

  Haupt  |  Einfache Schlagzeilen  

link XOOPS.org XOOPS.org (07.12.2025 04:39)

feed ?Browse in alphabetical order? in the lexicon and national characters (08.01.2010 16:20)
If you want the module "Lexicon" show national characters in the block ?Browse in alphabetical order?, you have a problem. The solution is simple:

In file INCLUDE/FUNCTION.PHP search:


function  lx_alphaArray  ()
    {
    global 
$xoopsUser $xoopsDB $xoopsModule ;
    
$alpha  = array();
    for (
$a  65 $a  < ( 65 + 26 );  $a ++ )
        {
        
$letterlinks  = array();
        
$initial  chr ( $a );
        
$sql  $xoopsDB  ->  query  "SELECT * FROM "  $xoopsDB  ->  prefix  "lxentries" ) .  " WHERE init = '$initial' "  );
        
$howmany  $xoopsDB  ->  getRowsNum $sql  );
        
$letterlinks [ 'total' ] =  $howmany ;
        
$letterlinks [ 'id' ] =  chr ( $a );
        
$letterlinks [ 'linktext' ] =  chr ( $a );

        
$alpha [ 'initial' ][] =  $letterlinks ;
        }
    return 
$alpha ;
    }


And replace:


function  lx_alphaArray  (){

        global 
$xoopsUser $xoopsDB $xoopsModule ;
        
$pismenka  = array( "A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" , "CH" , "I" , "J" , "K" , "L" , "M" , "N" , "O" , "P" , "Q" , "R" , "S" , "T" , "U" , "V" , "W" , "X" , "Y" , "Z" );
        
$alpha  = array();

    for (
$a  0 $a  count ( $pismenka );  $a ++ )
       {
                                                                     
        
$letterlinks  = array();
        
$initial  =   $pismenka [ $a ];
        
$sql  $xoopsDB  ->  query  "SELECT * FROM "  $xoopsDB  ->  prefix  "lxentries" ) .  " WHERE init = '$initial' "  );
        
$howmany  $xoopsDB  ->  getRowsNum $sql  );
        
$letterlinks [ 'total' ] =  $howmany ;
        
$letterlinks [ 'id' ] =   $pismenka [ $a ];
        
$letterlinks [ 'linktext' ] =   $pismenka [ $a ];

        
$alpha [ 'initial' ][] =  $letterlinks ;
        }


    return 
$alpha ;
    }



Array $pismenka[] include list of characters, who module use, simply use your national characters.

Hack is tested in Xoops 2.4.2 and 2.4.2 in UTF-8.

That?s all, Happy Xoopsing


execution time : 0.026 sec