Displaying album description on thumbnail page Displaying album description on thumbnail page
 

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]

Main Menu

Displaying album description on thumbnail page

Started by fennell, April 22, 2004, 07:37:31 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

fennell

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

kguske

I'd like to be able to do this, too.  Any ideas?
XP Pro, Apache 2.0.46, PHP 4.3.2, MySQL 4.0.13, phpNuke 6.5, Coppermine for CMS 1.30a, ImageMajick 5.5.7

Tarique Sani

Will post a hack soon after the final release of 1.3.... Till then wait :)
SANIsoft PHP applications for E Biz

kguske

#3
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...
XP Pro, Apache 2.0.46, PHP 4.3.2, MySQL 4.0.13, phpNuke 6.5, Coppermine for CMS 1.30a, ImageMajick 5.5.7

MLKE

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