Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Alphabetical user galleries search  (Read 13129 times)

0 Members and 1 Guest are viewing this topic.

jtorral

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 10
Alphabetical user galleries search
« on: April 25, 2005, 07:08:40 pm »

I have 1800 albums with 1800 members. in photopost you can search for members albums by selecting the letter of the alphabet which corresponds to their name. I dont see that in CPG. Am I missing it?  Is there a way to look for a members album without scrolling through 300 pages of albums?

Thanks
« Last Edit: April 25, 2005, 09:55:11 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: album . member search
« Reply #1 on: April 25, 2005, 08:51:22 pm »

Like this ?

Are you running bridged or unbridged installation of coppermine ?
Logged

jtorral

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 10
Re: album . member search
« Reply #2 on: April 25, 2005, 09:12:09 pm »

exact thing I am looking for. I am runing bridge with vbulletin.
Logged

Nibbler

  • Guest
Re: album . member search
« Reply #3 on: April 25, 2005, 09:54:34 pm »

I only have this available for 1.4, although it could be adapted for 1.3

udb_base.inc.php

find

Code: [Select]
        // Get the total number of users with albums
        $sql  = "select null ";
        $sql .= "from {$CONFIG['TABLE_ALBUMS']} as p ";
        $sql .= "where ( category>".FIRST_USER_CAT." $forbidden) ";
        $sql .= "group by category;";

change to

Code: [Select]
        // Get the total number of users with albums
        $sql  = "select null ";
        $sql .= "from {$CONFIG['TABLE_ALBUMS']} AS alb, {$this->usertable} LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = alb.aid WHERE (category - ".FIRST_USER_CAT.")  = {$f['user_id']} ";
        $sql .= "AND ( category>".FIRST_USER_CAT." $forbidden) ";
        if ($l = $_GET['letter']) $sql .= "AND {$f['username']} LIKE '$l%' ";
$sql .= " $forbidden_with_icon group by category;";

themes.inc.php, find

Code: [Select]
    } else {
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
        $theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
        $theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
    }

change to

Code: [Select]
    } else {
$pl =  $_GET['letter'] ? ('&letter=' . $_GET['letter']) : '';
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d' . $pl));
        $theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d' . $pl));
        $theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d' . $pl));
    }

index.php, under

Code: [Select]
    $rowset = $cpg_udb->list_users_query($user_count);
add

Code: [Select]

// jump box extras begin
starttable('100%', '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();
// jump box extras end
Logged

Konstantinos

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 120
Re: Alphabetical user galleries search
« Reply #4 on: December 25, 2005, 09:11:32 am »

it looks it aint working for 1.4.2. for example when i press the letter w it sais there are no user galleries which is correct but when i press the letter b instead of showing only the albums that the user name starts with b it shows from many different letters ,
« Last Edit: December 25, 2005, 09:17:40 am by Konstantinos »
Logged

Nibbler

  • Guest
Re: Alphabetical user galleries search
« Reply #5 on: December 26, 2005, 04:29:14 pm »

This mod is now deprecated in favour of the plugin version.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 21 queries.