forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: mimatadero on December 31, 2011, 03:26:42 pm

Title: usergal_alphatabs with numbers
Post by: mimatadero on December 31, 2011, 03:26:42 pm
hello

is possible that the usergal_alphatabs plugin show the numbers for search in gallery?

thankU
Title: Re: usergal_alphatabs with numbers
Post by: Αndré on January 04, 2012, 03:30:30 pm
I don't understand what you're asking for, sorry.
Title: Re: usergal_alphatabs with numbers
Post by: mimatadero on January 05, 2012, 11:40:11 am
hello

i have a user gallery with the plugin "jump by username" like:

http://www.cienciaengalego.org/Coppermine/index.php?cat=1

I will also appear the numbers 0 through 9 for the users that their names start with numbers

thank you
Title: Re: usergal_alphatabs with numbers
Post by: Αndré on January 05, 2012, 01:55:04 pm
Open codebase.php, find
Code: [Select]
    function makejumpbox(){
        global $lang_plugin_php;
        starttable('100%', $lang_plugin_php['usergal_alphatabs_jump_by_username'], 26);
        echo '<tr>';
        foreach (range('A', 'Z') as $letter){
            echo '<td width="'.(100/26).'%" align="center"><a href="index.php?cat=1&letter='.$letter.'"> '.$letter.' </a></td>';
        }
        echo '</tr>';
        endtable();
    }
and replace with
Code: [Select]
    function makejumpbox(){
        global $lang_plugin_php;
        starttable('100%', $lang_plugin_php['usergal_alphatabs_jump_by_username'], 36);
        echo '<tr>';
        foreach (array_merge(range(0, 9), range('A', 'Z')) as $letter){
            echo '<td width="'.(100/36).'%" align="center"><a href="index.php?cat=1&letter='.$letter.'"> '.$letter.' </a></td>';
        }
        echo '</tr>';
        endtable();
    }

additionally, replace all occurrences of
Code: [Select]
$superCage->get->getAlphawith
Code: [Select]
$superCage->get->getAlNum
Title: Re: usergal_alphatabs with numbers
Post by: mimatadero on January 07, 2012, 03:12:36 pm
is perfect!!

but...the 0 number dont work!!!!     (1-9 work good)
Title: Re: usergal_alphatabs with numbers
Post by: mimatadero on January 07, 2012, 06:22:20 pm
i found the error. in line 300 replace
if ($l = $getLetter) $sql .= "AND UPPER({$f[\'username\']}) LIKE \'$l%\' ";
by
if ($l == $getLetter) $sql .= "AND UPPER({$f[\'username\']}) LIKE \'$l%\' ";

thnak you again