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 7973 times)

0 Members and 1 Guest are viewing this topic.

Jack76

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Displaying album description on thumbnail page
« on: August 16, 2004, 02:43:57 pm »

I would like to display the album description on the thumpnails page.
There was one topic about this problem but nobody posted working solution:
http://forum.coppermine-gallery.net/index.php?topic=5618.0
Could anybody help me? I tried to edit theme.php to do this but without success.

P.S. I have CPG 1.3.0
« Last Edit: August 17, 2004, 09:00:33 am by Jack76 »
Logged

Jack76

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Displaying album description on thumbnail page
« Reply #1 on: August 17, 2004, 11:20:38 pm »

I just figured out how to do it.
I used the code of kguske from the old topic and modified it because there is no /themes/myfavoritetheme/thumb_view_title_row.inc file in CPG 1.3.0.
So 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/theme.php just after:
Code: [Select]
// HTML template for title row of the thumbnail view (album title + sort options)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. But there is a BIG problem: bbcodes don't work in the album description displayed on thumbnail page >:(
Could anyone help me? How to enable bbcodes now?
It's really important to me :-\\
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Displaying album description on thumbnail page
« Reply #2 on: August 18, 2004, 08:46:16 am »

The function make_clickable is your friend ;D

GauGau
Logged

Jack76

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Displaying album description on thumbnail page
« Reply #3 on: August 18, 2004, 09:49:33 am »

The function make_clickable is your friend ;D
Could you exlpain?
I'm not good in php :-[
Logged

myprado

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Displaying album description on thumbnail page
« Reply #4 on: December 04, 2004, 10:10:08 pm »

I solved that problem using by function bb_decode($album_desc); (from file include/functions.inc.php).

Now I have album description on thumbnail page with bbcode.

Edit the theme.php
Code: [Select]
function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb') {
//................
//.................
    if ($mode == 'thumb') {
        starttable('100%', $title, $thumbcols);
    } else {
        starttable('100%');
    }

    echo $header;
    echo bb_decode($album_desc);
//....................
//....................

}

Coders, Dont forget to make steps above posted by Jack76.
Regards.
Logged

PandaSorn

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Displaying album description on thumbnail page
« Reply #5 on: April 30, 2005, 06:07:28 pm »

Quote
Then, wherever you want the description to appear, you can insert the $album_desc variable. But there is a BIG problem: bbcodes don't work in the album description displayed on thumbnail page >:(

I've done the two changes on functions.inc and theme.php, but I don't understand how to display the album description in the thumbnail page between the title of the ambum ad the images.
Also I don't want the album description on the categori page.

Can you help me?
Logged

MLKE

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Displaying album description on thumbnail page
« Reply #6 on: July 18, 2005, 07:37:18 am »

i've done the steps, and i can display the description, but the bbcode is not working
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Displaying album description on thumbnail page
« Reply #7 on: July 18, 2005, 07:59:13 am »

This thread has originally been posted on the "feature requests" board. Moving it to the support board, as it contains a solution and is not a real feature request.
Logged

anajka

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Displaying album description on thumbnail page
« Reply #8 on: August 02, 2005, 11:34:43 am »

Have anyone a working solution for this problem?

best regards anajka
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: Displaying album description on thumbnail page
« Reply #9 on: May 07, 2006, 04:08:24 pm »

I solved that problem using by function bb_decode($album_desc); (from file include/functions.inc.php).

Now I have album description on thumbnail page with bbcode.

Edit the theme.php
Code: [Select]
function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb') {
//................
//.................
    if ($mode == 'thumb') {
        starttable('100%', $title, $thumbcols);
    } else {
        starttable('100%');
    }

    echo $header;
    echo bb_decode($album_desc);
//....................
//....................

}

Coders, Dont forget to make steps above posted by Jack76.
Regards.

The above is not the correct way to do this.

Instead use the code of Jack76 and change  the part:

Code: [Select]
return $row['description'];
by:

Code: [Select]
return bb_decode ($row['description']);
That will solve all problems
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.
Pages: [1]   Go Up
 

Page created in 0.037 seconds with 20 queries.