coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: fennell on April 22, 2004, 07:37:31 AM

Title: Displaying album description on thumbnail page
Post by: fennell on April 22, 2004, 07:37:31 AM
Just looking for a heads up on how to display the album description on the thumpnails page.

Wading ones way through that HUGE template file, wow.

Thanks heaps
Title: Re: Displaying album description on thumbnail page
Post by: kguske on June 10, 2004, 01:30:13 PM
I'd like to be able to do this, too.  Any ideas?
Title: Re: Displaying album description on thumbnail page
Post by: Tarique Sani on June 10, 2004, 01:52:39 PM
Will post a hack soon after the final release of 1.3.... Till then wait :)
Title: Re: Displaying album description on thumbnail page
Post by: kguske on June 11, 2004, 06:31:10 AM
If you can't or don't want to wait (I couldn't!  :)) , you could add a function to the /include/functions.inc, just before

// Return the name of a user
function get_username($uid)

Add:
// Get the name of an album
function get_album_desc($aid)
{
    global $CONFIG;
    global $lang_errors;
    $result = db_query("SELECT description from {$CONFIG['TABLE_ALBUMS']} WHERE aid='$aid'");
    $count = mysql_num_rows($result);
    if ($count > 0) {
        $row = mysql_fetch_array($result);
        return $row['description'];
    } else {
        return "Album not found";
    }
}


Then, in /themes/myfavoritetheme/thumb_view_title_row.inc, just after:
global $name;


add:
$album_desc = get_album_desc($_GET[album]);


Then, wherever you want the description to appear, you can insert the $album_desc variable (also in the themes/yourtheme/thumb_view_title_row.inc).  For example, after the $album_name variable, you could add <BR>$album_desc.

I'm using Coppermine for CMS (voted the best phpNuke photo gallery!), so it might not work exactly the same for regular Coppermine, and there's probably a more elegant solution.  But this is great software (thanks!) and this tweak worked for me...
Title: Re: Displaying album description on thumbnail page
Post by: MLKE on July 25, 2004, 05:25:29 PM
i tried messing around with this on regular coppermine... and its not working..

if someone that actually knows php... (i dont) can give this a try.. it would be great.. quite a few people are requesting this..

;D