Hi there
I've tried serching but couldn't find what I'm looking for :-[
I have 2 rows showing 'Latest additions' (6 images) on my index. Under every thumb there's 2 lines: Image uploader (username) and date added.
Here's my quastion. Is it possible to add 2 extra line that shows which album and category the thumb belong?
In advance thank you
Michael
Anyone please? Is it possible? :(
It's possible yes, and I'm 90% sure it has been posted before, or something very similar.
Quote from: Nibbler on January 28, 2005, 03:25:30 PM
It's possible yes, and I'm 90% sure it has been posted before, or something very similar.
Hi Nibbler
Thank you for your reply :) Do you know I can get the code?
By clicking here (http://forum.coppermine-gallery.net/index.php?action=search)
Hi GAUGAU
I've tried searching I don't know how many time. I just can't find what I'm searching for :-[ Please help me?
haven't tested, but should be in include/functions.inc.php:
Find $rowset[$key]['caption_text'] = $caption;
after the case 'lastup': // Last uploads
-section (around line 620) and add the album name there.
Quote from: GauGau on January 29, 2005, 06:35:06 PM
haven't tested, but should be in include/functions.inc.php:
Find $rowset[$key]['caption_text'] = $caption;
after the case 'lastup': // Last uploads
-section (around line 620) and add the album name there.
Hi Gau Gau
I'm not goog at coding :-[ What should I add (code) after where you mentioned?
Please help a stupid noob :-[
Change
if($select_columns != '*' ) $select_columns .= ',title, caption, owner_id, owner_name, aid';
$result = db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $ALBUM_SET ORDER BY pid DESC $limit");
$rowset = db_fetch_rowset($result);
mysql_free_result($result);
if ($set_caption) foreach ($rowset as $key => $row){
$user_link = ($CONFIG['display_uploader'] && $row['owner_id'] && $row['owner_name']) ? '<span class="thumb_title"><a href ="profile.php?uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>' : '';
$caption = $user_link.'<span class="thumb_caption">'.localised_date($row['ctime'], $lastup_date_fmt).'</span>';
$rowset[$key]['caption_text'] = $caption;
}
to
$select_columns = '*';
$result = db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} AS p, {$CONFIG['TABLE_ALBUMS']} as a, {$CONFIG['TABLE_CATEGORIES']} AS c WHERE p.aid =a.aid AND a.category = c.cid AND approved = 'YES' $ALBUM_SET ORDER BY pid DESC $limit");
$rowset = db_fetch_rowset($result);
mysql_free_result($result);
if ($set_caption) foreach ($rowset as $key => $row){
$user_link = ($CONFIG['display_uploader'] && $row['owner_id'] && $row['owner_name']) ? '<span class="thumb_title"><a href ="profile.php?uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>' : '';
$caption = $user_link.'<span class="thumb_caption">'.localised_date($row['ctime'], $lastup_date_fmt).'</span>';
$caption .= '<span class="thumb_caption">'.$row['title'].'</span>';
$caption .= '<span class="thumb_caption">'.$row['name'].'</span>';
$rowset[$key]['caption_text'] = $caption;
}
Hi Nibbler
I did what you suggested, but I'm getting database errror in the categories :( Beside that category and album is now showing under new images on index :)
The error seems to be the categories :-\\ How to I remove the category part from the code, so it only show album name ? One other thing. I like to have the album name under random pictures. Where can I add the code and what's the code for it ? Is it the same as above ?
Thx
Michael