coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: pgt96drvr on April 23, 2005, 07:27:17 PM

Title: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: pgt96drvr on April 23, 2005, 07:27:17 PM
Subjuect says it all..  Have searched for literally an hour today, and can't find it.  I'm sure this is easy as it gets, but I just can't figure out how to add it.

Thanks guys!
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: Casper on April 23, 2005, 08:27:50 PM
This is not a feature request, but a request for help.

You will be advised to upgrade to version 1.3.3, but in the meantime, I'm moving this to the 1.2 support board.
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: pgt96drvr on April 23, 2005, 09:22:02 PM
I know that I will be asked to upgrade...  I have come to accept that since I am seeing it all over the forum.

This was moved out of the feature request, but isn't this a feature?  maybe I was too vague.  I need to be able to add the album name under the thumbnails in the Last uploaded, index, etc. (all thumbnails) ...
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: pgt96drvr on April 29, 2005, 02:40:24 PM
Does anyone have information on this yet?  I've been working on this for a while, but can't get it to work...  ugh...  thanks for your help.

;D
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: Joachim Müller on April 30, 2005, 06:12:25 PM
none of the devs runs cpg1.2.x anymore, so we can't tell you. If there can be an answer, then only from the community.
If we had left it in feature requests, then there would have been no answer at all, because feature requests are what the name says: a request for a feature in future versions. You don't get answers on the feature requests board, except "will be considered for future version" or "request is turned down, because...", which is probably not what you expected.
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: pgt96drvr on May 03, 2005, 09:59:20 PM
ahhh, ok....  well...  this is what I have so far.. maybe someone can just tell me the 1 or 2 things that need changing:

I found this in another post:

//set variable and round full filesize to no decimals
           $caption .=  '<span class="thumb_title">'."filesize: ".round ($rowset[$key]['filesize']/ 1024)." KB" . '</span>';
           $rowset[$key]['caption_text'] = $caption;

After putting this in the thumbnail section of function.inc.php, I have successfully added the file size below the picture...  I should only have to change a few things here that would change it from filesize to the album name....

I tried replacing the part ['filesize'] with ['album'] ..  and some other things, and I just can't get it...   

Thanks for the reply GauGau.. hopefully another member will see this and add soemthing as well...

/bow
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: Nibbler on May 04, 2005, 01:33:32 PM
The album name is associated with the album, not the picture. The field is 'title'.
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: pgt96drvr on May 04, 2005, 08:35:28 PM
Does that mean that it's not a simple little switch of a couple of words?  Little confused, sry Nibbler.
Title: Re: Need for 1.2.1 - Album name under thumbnail on all pages
Post by: pgt96drvr on May 06, 2005, 06:28:05 AM
Ok.. Update: Almost there.. but I'm stuck.

I posted the code below to show where I put in this:


//set album name
          $caption .=  '<span class=\"thumb_aid\">'."Server: ".($album_name).'</span>';
          $rowset[$key]['caption_text'] = $caption;


Where I stand now:

When I go into the "Last Uploads" Section, it shows the Pic Title, then Date of addition, and then "Server: Last Additions"

Example:
Vixie
May 05, 2005
Server: Last additions

I have 30 or so albums, and I'd like for it to read which album the pic belongs to.


case 'lastup': // Last uploads
               if ($ALBUM_SET && $CURRENT_CAT_NAME) {
                       $album_name = $lang_meta_album_names['lastup'].' - '. $CURRENT_CAT_NAME;
               } else {
                       $album_name = $lang_meta_album_names['lastup'];
               }

               $result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $ALBUM_SET");
               $nbEnr = mysql_fetch_array($result);
               $count = $nbEnr[0];
               mysql_free_result($result);

               if($select_columns != '*' ) $select_columns .= ', 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){
                       if ($row['owner_id'] && $row['owner_name']) {
                           $user_link = '<span class="thumb_title"><a href ="profile.php?uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>';
                       } else {
                               $user_link = '';
                       }
                       $caption = $user_link.'<span class="thumb_caption">'.localised_date($row['ctime'], $lastup_date_fmt).'</span>';
                       $rowset[$key]['caption_text'] = $caption;




//set album name
          $caption .=  '<span class=\"thumb_aid\">'."Server: ".($album_name).'</span>';
          $rowset[$key]['caption_text'] = $caption;




               }
               return $rowset;
               break;




I hope that this shines more light, and that someone can help...

Thanks Guys!