Placing custom fields below Title in thumbnails Placing custom fields below Title in thumbnails
 

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

Placing custom fields below Title in thumbnails

Started by Mixblender, February 22, 2007, 12:57:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mixblender

I'll be frank. And please let me thank you in advance for looking to try and help me out

I'm using Coppermine 1.4.10 stable

I've been working some time on a website for another gentleman (http://downsangels.openswarm.com/main) and I'm nearly finished (thank goodness) but what he would like is a big thing I can not seem to find an accurate response to by searching.

I found the hard mod that adds any amount of additional user fields for image discription. Currently, and hopefully permenantly, I am using 9. I didn't want to go double digits because that usually spells trouble.

Anywho, The gentleman is looking for all 9 of those beautiful custom user fields to be placed right beneath the Title of the image but before the file description. I'm assuming he wants the same font info as the Title, but all the info directly avalible at the thumbnails as well as when you click the appropriate image

now I found something reguarding adding
$caption .= "<span class=\"thumb_caption\">".bb_decode(($rowset[$key]['user1']))."</span>";
underneath the Title for the tumbnails, but im a bit worried because with the mod i added, it removes most mentions of user1, user2, user3, user4.

Would I be able to use something like this and go up to user9 underneath the title? or would that cause mean stuff. as well, which files would I add it for just thumbnails, leaving everything else the way it is.

again thanks so much for anyone able to help me out on this. if theres a link to a thread which can help me, please share :)

Mixblender

I think i solved it

Inside functions.inc.php I went down to
if($select_columns != '*') $select_columns .= ', title, caption,hits';

I changed it to
if($select_columns != '*') $select_columns .= ', title, caption,hits,user1,user2,user3,user4,user5,user6,user7,user8,user9';

As well, I added
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user1'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user2'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user3'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user4'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user5'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user6'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user7'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user8'] . "</span>";
        $caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user9'] . "</span>";


Right underneath
if ($CONFIG['views_in_thumbview'] || in_array('hits',$must_have)) {
            $caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?" ":"")."</span>" : '';


It's not dynamic, so if i ever had to increase the number of user fields, this would have to be updated manually, but it's pretty flawless for what i wanted it to do.

Thanks to Nibbler and http://forum.coppermine-gallery.net/index.php?topic=5163.0 for pointing out what I needed