Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Thumbs o index (latest images)  (Read 4739 times)

0 Members and 1 Guest are viewing this topic.

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Thumbs o index (latest images)
« on: January 27, 2005, 09:13:56 pm »

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
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Thumbs o index (latest images)
« Reply #1 on: January 28, 2005, 03:22:06 pm »

Anyone please? Is it possible?  :(
Logged

Nibbler

  • Guest
Re: Thumbs o index (latest images)
« Reply #2 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.
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Thumbs o index (latest images)
« Reply #3 on: January 28, 2005, 03:28:46 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbs o index (latest images)
« Reply #4 on: January 28, 2005, 04:31:09 pm »

By clicking here
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Thumbs o index (latest images)
« Reply #5 on: January 28, 2005, 05:01:15 pm »

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbs o index (latest images)
« Reply #6 on: January 29, 2005, 06:35:06 pm »

haven't tested, but should be in include/functions.inc.php:
Find
Code: [Select]
$rowset[$key]['caption_text'] = $caption; after the
Code: [Select]
case 'lastup': // Last uploads-section (around line 620) and add the album name there.
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Thumbs o index (latest images)
« Reply #7 on: January 30, 2005, 12:23:30 pm »

haven't tested, but should be in include/functions.inc.php:
Find
Code: [Select]
$rowset[$key]['caption_text'] = $caption; after the
Code: [Select]
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?
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Thumbs o index (latest images)
« Reply #8 on: February 01, 2005, 01:23:14 pm »

Please help a stupid noob  :-[
Logged

Nibbler

  • Guest
Re: Thumbs o index (latest images)
« Reply #9 on: February 01, 2005, 01:36:29 pm »

Change

Code: [Select]
                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


Code: [Select]
               $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;
                }
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Thumbs o index (latest images)
« Reply #10 on: February 01, 2005, 05:00:56 pm »

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  :)
« Last Edit: February 01, 2005, 07:19:48 pm by Michael-CGC »
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Thumbs o index (latest images)
« Reply #11 on: February 07, 2005, 02:36:41 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.041 seconds with 20 queries.