Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Displaying album description on thumbnail page  (Read 3968 times)

0 Members and 1 Guest are viewing this topic.

fennell

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Displaying album description on thumbnail page
« 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
Logged

kguske

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Displaying album description on thumbnail page
« Reply #1 on: June 10, 2004, 01:30:13 pm »

I'd like to be able to do this, too.  Any ideas?
Logged
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

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Displaying album description on thumbnail page
« Reply #2 on: June 10, 2004, 01:52:39 pm »

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

kguske

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Displaying album description on thumbnail page
« Reply #3 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

Code: [Select]
// Return the name of a user
function get_username($uid)
Add:
Code: [Select]
// 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:
Code: [Select]
global $name;

add:
Code: [Select]
$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...
« Last Edit: June 11, 2004, 12:51:10 pm by kguske »
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Displaying album description on thumbnail page
« Reply #4 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
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 18 queries.