forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Searching => Topic started by: jtorral 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
-
Like this (http://www.ic-gallery.com/index.php?cat=1) ?
Are you running bridged or unbridged installation of coppermine ?
-
exact thing I am looking for. I am runing bridge with vbulletin.
-
I only have this available for 1.4, although it could be adapted for 1.3
udb_base.inc.php
find
// 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
// 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
} 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
} 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
$rowset = $cpg_udb->list_users_query($user_count);
add
// 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
-
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 ,
-
This mod is now deprecated in favour of the plugin version (http://forum.coppermine-gallery.net/index.php?topic=25556.msg117575#msg117575).