Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: usergal_alphatabs with numbers  (Read 4847 times)

0 Members and 1 Guest are viewing this topic.

mimatadero

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
usergal_alphatabs with numbers
« on: December 31, 2011, 03:26:42 pm »

hello

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

thankU
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: usergal_alphatabs with numbers
« Reply #1 on: January 04, 2012, 03:30:30 pm »

I don't understand what you're asking for, sorry.
Logged

mimatadero

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: usergal_alphatabs with numbers
« Reply #2 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: usergal_alphatabs with numbers
« Reply #3 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
Logged

mimatadero

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: usergal_alphatabs with numbers
« Reply #4 on: January 07, 2012, 03:12:36 pm »

is perfect!!

but...the 0 number dont work!!!!     (1-9 work good)
Logged

mimatadero

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: usergal_alphatabs with numbers
« Reply #5 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
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.