Need for 1.2.1 - Album name under thumbnail on all pages Need for 1.2.1 - Album name under thumbnail on all pages
 

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

Need for 1.2.1 - Album name under thumbnail on all pages

Started by pgt96drvr, April 23, 2005, 07:27:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pgt96drvr

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!

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

pgt96drvr

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) ...

pgt96drvr

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

Joachim Müller

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.

pgt96drvr

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

Nibbler

The album name is associated with the album, not the picture. The field is 'title'.

pgt96drvr

Does that mean that it's not a simple little switch of a couple of words?  Little confused, sry Nibbler.

pgt96drvr

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!